public Common(DalamudPluginInterface pluginInterface) { PluginInterface = pluginInterface; var gameAllocPtr = pluginInterface.TargetModuleScanner.ScanText("E8 ?? ?? ?? ?? 45 8D 67 23"); var getGameAllocatorPtr = pluginInterface.TargetModuleScanner.ScanText("E8 ?? ?? ?? ?? 8B 75 08"); PlayerStaticAddress = pluginInterface.TargetModuleScanner.GetStaticAddressFromSig("8B D7 48 8D 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 0F B7 E8"); _gameAlloc = Marshal.GetDelegateForFunctionPointer <GameAlloc>(gameAllocPtr); _getGameAllocator = Marshal.GetDelegateForFunctionPointer <GetGameAllocator>(getGameAllocatorPtr); }
public Common() { var gameAllocPtr = Scanner.ScanText("E8 ?? ?? ?? ?? 49 83 CF FF 4C 8B F0"); var getGameAllocatorPtr = Scanner.ScanText("E8 ?? ?? ?? ?? 8B 75 08"); InventoryManagerAddress = Scanner.GetStaticAddressFromSig("BA ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B F8 48 85 C0"); var getInventoryContainerPtr = Scanner.ScanText("E8 ?? ?? ?? ?? 8B 55 BB"); var getContainerSlotPtr = Scanner.ScanText("E8 ?? ?? ?? ?? 8B 5B 0C"); PlayerStaticAddress = Scanner.GetStaticAddressFromSig("8B D7 48 8D 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 0F B7 E8"); LastCommandAddress = Scanner.GetStaticAddressFromSig("4C 8D 05 ?? ?? ?? ?? 41 B1 01 49 8B D4 E8 ?? ?? ?? ?? 83 EB 06"); LastCommand = (Utf8String *)(LastCommandAddress); _gameAlloc = Marshal.GetDelegateForFunctionPointer <GameAlloc>(gameAllocPtr); _getGameAllocator = Marshal.GetDelegateForFunctionPointer <GetGameAllocator>(getGameAllocatorPtr); _getInventoryContainer = Marshal.GetDelegateForFunctionPointer <GetInventoryContainer>(getInventoryContainerPtr); _getContainerSlot = Marshal.GetDelegateForFunctionPointer <GetContainerSlot>(getContainerSlotPtr); }