增加容错
This commit is contained in:
parent
5a7249a545
commit
0fd125dcfc
@ -763,6 +763,9 @@ function UIPrefabObject:addRedPoint(offsetX, offsetY, scale, iconName, count, na
|
||||
if not self.redPoint then
|
||||
if not self.loadRpOver then
|
||||
self.loadRpOver = true
|
||||
if self:isDestroyed() or CS.BF.Utils.IsNull(self:getGameObject()) then
|
||||
return
|
||||
end
|
||||
UIPrefabManager:loadUIWidgetAsync("assets/prefabs/ui/common/red_point_cell.prefab", self, function(prefabObject)
|
||||
self.redPoint = prefabObject
|
||||
prefabObject:initPrefabHelper()
|
||||
|
||||
@ -95,6 +95,10 @@ function HeroCell:refreshRedPoint()
|
||||
return
|
||||
end
|
||||
|
||||
if not self.selfNode or self.selfNode:isDestroyed() or CS.BF.Utils.IsNull(self.selfNode:getGameObject()) then
|
||||
return
|
||||
end
|
||||
|
||||
if DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) and DataManager.EquipData:canUpgradeEquip(self.heroEntity:getCfgId()) then
|
||||
self.selfNode:addRedPoint(55, -35, 0.64)
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user