fix(ObjectConvert): 在读写攻击信息时重置blob指针位置
修复在读取和写入攻击信息时未重置blob指针位置的问题,确保数据读写正确
This commit is contained in:
parent
1194db30b3
commit
d0822165e6
|
|
@ -58,6 +58,7 @@ function sq_GetCurrentAttackInfoDamage(attackInfo) {
|
|||
local Res = MemoryTool.DecodeMemoryData(AtkC + 0x0);
|
||||
local B = blob();
|
||||
B.writen(Res, 'i');
|
||||
B.seek(0);
|
||||
return B.readn('f');
|
||||
}
|
||||
|
||||
|
|
@ -65,5 +66,6 @@ function sq_SetCurrentAttackInfoDamage(attackInfo, damage) {
|
|||
local AtkC = L_sq_P2I(attackInfo["__ot"][28259608]);
|
||||
local B = blob();
|
||||
B.writen(damage, 'f');
|
||||
B.seek(0);
|
||||
MemoryTool.EncodeMemoryData(AtkC + 0x0, B.readn('i'));
|
||||
}
|
||||
Loading…
Reference in New Issue