fix bug
This commit is contained in:
parent
fc7b9a734b
commit
2f23de0ef2
@ -647,7 +647,7 @@ function GFunc.addRewards(rewards, itemGetType)
|
|||||||
if v.type == GConst.REWARD_TYPE.ITEM then
|
if v.type == GConst.REWARD_TYPE.ITEM then
|
||||||
DataManager.BagData.ItemData:addItem(v.item, itemGetType)
|
DataManager.BagData.ItemData:addItem(v.item, itemGetType)
|
||||||
elseif v.type == GConst.REWARD_TYPE.EQUIP then
|
elseif v.type == GConst.REWARD_TYPE.EQUIP then
|
||||||
DataManager.EquipData:addEquipCountById(v.equip.id, v.equip.count, itemGetType)
|
DataManager.EquipData:addEquip(v.equip, itemGetType, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GETED_REWARD_SUCCESS, newRewards)
|
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GETED_REWARD_SUCCESS, newRewards)
|
||||||
|
|||||||
@ -165,7 +165,7 @@ end
|
|||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
--@region 装备基础
|
--@region 装备基础
|
||||||
function EquipData:addEquip(equip, itemGetType)
|
function EquipData:addEquip(equip, itemGetType, noDirty)
|
||||||
if equip == nil then
|
if equip == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -176,7 +176,9 @@ function EquipData:addEquip(equip, itemGetType)
|
|||||||
if itemGetType then
|
if itemGetType then
|
||||||
BIReport:postEquipGet(equip.uid, equip.cfg_id, itemGetType)
|
BIReport:postEquipGet(equip.uid, equip.cfg_id, itemGetType)
|
||||||
end
|
end
|
||||||
self:setDirty()
|
if not noDirty then
|
||||||
|
self:setDirty()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function EquipData:createEquipEntity(equip)
|
function EquipData:createEquipEntity(equip)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user