| | |
| | | |
| | | public RectTransform GetTeamNode(BattleCamp battleCamp, BattleObject target) |
| | | { |
| | | int index = target.teamHero.positionNum; |
| | | int index = target.GetPositionNum(); |
| | | return GetTeamNode(battleCamp, index); |
| | | } |
| | | |
| | |
| | | |
| | | public RectTransform GetTeamNode(BattleCamp battleCamp, int index) |
| | | { |
| | | if (index < 0 || index >= battleRootNode.redTeamNodeList.Count) |
| | | if (index == 99) |
| | | { |
| | | return battleCamp == BattleCamp.Red ? battleRootNode.redTeamNodeList[0].transform as RectTransform |
| | | : battleRootNode.blueTeamNodeList[0].transform as RectTransform; |
| | | } |
| | | |
| | | if (index < 0 || index >= battleRootNode.redTeamNodeList.Count ) |
| | | { |
| | | Debug.LogError($"GetTeamNode: Index {index} is out of range for {battleCamp} camp."); |
| | | return null; |
| | |
| | | BattleObject battleObj = battleObjMgr.GetBattleObject((int)vNetData.ObjID); |
| | | if (null != battleObj) |
| | | { |
| | | battleObj.buffMgr.RefreshBuff(vNetData); |
| | | var buffMgr = battleObj.GetBuffMgr(); |
| | | if (buffMgr != null) // 命格不有 buff 管理器 |
| | | { |
| | | buffMgr.RefreshBuff(vNetData); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | BattleObject battleObj = battleObjMgr.GetBattleObject((int)vNetData.ObjID); |
| | | if (null != battleObj) |
| | | { |
| | | battleObj.buffMgr.RemoveBuff(vNetData); |
| | | var buffMgr = battleObj.GetBuffMgr(); |
| | | if (buffMgr != null) // 命格不有 buff 管理器 |
| | | { |
| | | buffMgr.RemoveBuff(vNetData); |
| | | } |
| | | } |
| | | } |
| | | |