|
BUG反馈
引擎版本号: |
0320 |
登陆器版本号: |
0903 |
BUG描述: |
c.item.getMyEquipPos(i)
c.item.getHeroEquipPos(i)
c.item.getUser1EquipPos(i)
客户端LUA获取主体、英雄、物品对象,当主动脱装备后物品对象依然存在,即使身上装备位为空依然还是脱装备之前的物品对象,只有小退或者替换装备该物品对象才会变更! |
BUG重现方式: |
c.item.getMyEquipPos(i)
c.item.getHeroEquipPos(i)
c.item.getUser1EquipPos(i)
客户端LUA获取主体、英雄、物品对象,当主动脱装备后物品对象依然存在,即使身上装备位为空依然还是脱装备之前的物品对象,只有小退或者替换装备该物品对象才会变更! |
修复后应达到的效果: |
主动脱装备该对象应为nil |
联系QQ: |
隐藏内容 |
服务端LUA
for i=17,28 do
DBitem_ = nil
if itemFrom == const.ift_state then
DBitem_ = c.item.getMyEquipPos(i)
elseif itemFrom == const.ift_herostate then
DBitem_ = c.item.getHeroEquipPos(i)
elseif itemFrom == const.ift_user1state then
DBitem_ = c.item.getUser1EquipPos(i)
end
if DBitem_ ~= nil then
for t=1,6 do
c.event.sendNetMsg(99,serialize(DBitem_:getExt(t)))
end
end
end
客户端LUA
function TESTmsgFunc(actor, smsg)
svmsg = deserialize(smsg)--反序列化
print(svmsg)
end
打印结果
2023-09-30 15:17:33 4558
2023-09-30 15:17:33 4513
2023-09-30 15:17:33 4539
2023-09-30 15:17:33 4542
2023-09-30 15:17:33 4523
当主动脱掉装备后,该装备位为空!
但是依然会print出脱装备前该所属装备位的物品变量值!
|
|