防具升级刷新不及时fix
This commit is contained in:
parent
678a8fbd4c
commit
4bc9f441a5
@ -68,9 +68,6 @@ end
|
|||||||
function ArmorInfoComp:setHeroData(heroEntity)
|
function ArmorInfoComp:setHeroData(heroEntity)
|
||||||
self.heroEntity = heroEntity
|
self.heroEntity = heroEntity
|
||||||
self.selectPart = self.selectPart or GConst.EquipConst.PART_TYPE.HAT
|
self.selectPart = self.selectPart or GConst.EquipConst.PART_TYPE.HAT
|
||||||
self:bind(DataManager.EquipData:getEquip(self.heroEntity:getCfgId(), self.selectPart), "isDirty", function()
|
|
||||||
self:refresh()
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function ArmorInfoComp:refresh()
|
function ArmorInfoComp:refresh()
|
||||||
@ -79,6 +76,10 @@ end
|
|||||||
|
|
||||||
function ArmorInfoComp:onSelectIdx(index)
|
function ArmorInfoComp:onSelectIdx(index)
|
||||||
self.selectPart = ARMOR_PART_INDEX[index]
|
self.selectPart = ARMOR_PART_INDEX[index]
|
||||||
|
self:bind(DataManager.EquipData:getEquip(self.heroEntity:getCfgId(), self.selectPart), "isDirty", function()
|
||||||
|
self:refresh()
|
||||||
|
end)
|
||||||
|
|
||||||
self:refreshSelectArmor()
|
self:refreshSelectArmor()
|
||||||
|
|
||||||
for index, value in ipairs(self.armor) do
|
for index, value in ipairs(self.armor) do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user