Natsukage / PostNamazu

鲶鱼精邮差,最终幻想14 触发器拓展
355 stars 48 forks source link

国际服环境下若重启游戏,则部分功能异常 #64

Closed Souma-Sumire closed 3 months ago

Souma-Sumire commented 3 months ago
[07:28:27] 插件版本:1.3.3.1
[07:28:27] 没有找到Triggernometry
[07:28:27] 绑定OverlayPlugin
[07:28:27] Getting Offsets......
[07:28:27] 已找到FFXIV进程 70428
[07:28:38] {"A":{"X":100,"Y":0,"Z":87.5,"ID":0,"Active":true},"B":{"X":100,"Y":0,"Z":102.5,"ID":1,"Active":true},"C":{"X":94.5,"Y":0,"Z":77.8,"ID":2,"Active":true},"D":{"X":100,"Y":0,"Z":117.5,"ID":3,"Active":true},"One":{"X":100,"Y":0,"Z":95,"ID":4,"Active":true},"Two":{"X":100,"Y":0,"Z":110,"ID":5,"Active":true},"Three":{"X":105.5,"Y":0,"Z":77.8,"ID":6,"Active":true},"Four":{"X":100,"Y":0,"Z":125,"ID":7,"Active":true},"MapID":1201,"Name":"Slot1"}
// 此处重新启动游戏
[07:33:24] Getting Offsets......
[07:33:24] 已找到FFXIV进程 72832
[07:33:32] ReadWriteMemoryException: Error while reading memory! 仅完成部分的 ReadProcessMemory 或 WriteProcessMemory 请求。, at addr: 0, Size: 8
   在 GreyMagic.ExternalProcessMemory.ReadByteBuffer(IntPtr addr, Void* buffer, Int32 count, Boolean bypassCache)
   在 GreyMagic.MemoryBase.Read[T](IntPtr addr)
   在 PostNamazu.Actions.Command.GetOffsets()
   在 PostNamazu.Actions.NamazuModule.Setup()

此时测试功能:

在ACT中重新启用dll后,可以正常初始化,且全部功能正常。

Natsukage commented 3 months ago

确实是可能存在这个问题,上次的pr修改中,在方法初始化时初始化了RaptureModule和UiModulePtr 但是之前的邮差中RaptureModule和UiModule是在用到的当时计算的,因为UiModule在每次角色登录后才可以获取,而且重新登录角色后会改变。 所以原本的GetOffsets只是将关键地址读取并记录,在需要用到RaptureModule和UiModule时根据前面记录的关键地址来获取当时的RaptureModule和UiModule 这个也 @zfxsquare 提醒一下吧233 你先试试这个临时修复版是否正常工作 PostNamazu.zip