コード例 #1
0
 public static IntPtr JassStringIndexToJassStringHandle(Int32 jassStringIndex)
 {
     unsafe
     {
         return((IntPtr)((Int32)Marshal.ReadIntPtr(Marshal.ReadIntPtr(Marshal.ReadIntPtr(Marshal.ReadIntPtr(GameFunctions.GetThreadLocalStorage().Jass.AsIntPtr(), 0x0C)), 0x2874), 0x0008) + 0x10 * jassStringIndex));
     }
     // the above code may be a bit confusing, but we're essentially doing the following, without needing to
     // find the function every patch, and avoid the convoluted class hierarchy.
     // return Jass->VirtualMachine->StringManager->Table[jassStringIndex];
     // sub_6F6B1CA0 in 1.21b
     // sub_6F459640 in 1.26.0.6401
     // TODO: Future proof this.
 }