@@ -102,7 +102,7 @@ private delegate bool NativeGetAchievement(
102102 IntPtr name ,
103103 [ MarshalAs ( UnmanagedType . I1 ) ] out bool isAchieved ) ;
104104
105- public bool GetAchievementState ( string name , out bool isAchieved )
105+ public bool GetAchievement ( string name , out bool isAchieved )
106106 {
107107 using ( var nativeName = NativeStrings . StringToStringHandle ( name ) )
108108 {
@@ -112,7 +112,7 @@ public bool GetAchievementState(string name, out bool isAchieved)
112112 }
113113 #endregion
114114
115- #region SetAchievementState
115+ #region SetAchievement
116116 [ UnmanagedFunctionPointer ( CallingConvention . ThisCall ) ]
117117 [ return : MarshalAs ( UnmanagedType . I1 ) ]
118118 private delegate bool NativeSetAchievement ( IntPtr self , IntPtr name ) ;
@@ -141,6 +141,25 @@ public bool SetAchievement(string name, bool state)
141141 }
142142 #endregion
143143
144+ #region GetAchievementAndUnlockTime
145+ [ UnmanagedFunctionPointer ( CallingConvention . ThisCall ) ]
146+ [ return : MarshalAs ( UnmanagedType . I1 ) ]
147+ private delegate bool NativeGetAchievementAndUnlockTime (
148+ IntPtr self ,
149+ IntPtr name ,
150+ [ MarshalAs ( UnmanagedType . I1 ) ] out bool isAchieved ,
151+ out uint unlockTime ) ;
152+
153+ public bool GetAchievementAndUnlockTime ( string name , out bool isAchieved , out uint unlockTime )
154+ {
155+ using ( var nativeName = NativeStrings . StringToStringHandle ( name ) )
156+ {
157+ var call = this . GetFunction < NativeGetAchievementAndUnlockTime > ( this . Functions . GetAchievementAndUnlockTime ) ;
158+ return call ( this . ObjectAddress , nativeName . Handle , out isAchieved , out unlockTime ) ;
159+ }
160+ }
161+ #endregion
162+
144163 #region StoreStats
145164 [ UnmanagedFunctionPointer ( CallingConvention . ThisCall ) ]
146165 [ return : MarshalAs ( UnmanagedType . I1 ) ]
0 commit comments