Esempio n. 1
0
        UInt64 FactUpdate_Hooked(
            Int64 unknown,
            IntPtr factNamePtr,
            Int32 factValue,
            Int64 unknown2,
            Int64 validity)
        {
            FactUpdateHook update = Marshal.GetDelegateForFunctionPointer <FactUpdateHook>(factUpdateOrigPtr);

            int len = Marshal.ReadInt32(factNamePtr + 8) - 1;

            _server.ReportMessage("factNamePtr => " + factNamePtr);
            _server.ReportMessage("len => " + len);
            String factName = Marshal.PtrToStringUni(new IntPtr(Marshal.ReadInt64(factNamePtr)), len);


            _server.ReportMessage("called FactUpdate(factName=\"" + factName + "\",factValue=" + factValue + ",validity=" + validity + ")");

            _server.FactChanged(factName, factValue);

            return(update(unknown, factNamePtr, factValue, unknown2, validity));
        }