| | |
| | | { |
| | | get; private set; |
| | | } |
| | | public int positionNum; |
| | | public int positionNum; //注意服务端的1号位是1,客户端在使用时是0,通信和策划沟通用1 |
| | | |
| | | // 战场数据 |
| | | public int ObjID = 0;// 战斗单位唯一ID |
| | |
| | | |
| | | // HPEx * 1亿 + HP |
| | | |
| | | curHp = (long)fightObj.HPEx * GeneralDefine.HundredMillion + (long)fightObj.HP; |
| | | maxHp = (long)fightObj.MaxHPEx * GeneralDefine.HundredMillion + (long)fightObj.MaxHP; |
| | | curHp = (long)fightObj.HPEx * (long)Constants.ExpPointValue + (long)fightObj.HP; |
| | | maxHp = (long)fightObj.MaxHPEx * (long)Constants.ExpPointValue + (long)fightObj.MaxHP; |
| | | rage = (int)fightObj.AngreXP; |
| | | |
| | | positionNum = fightObj.PosNum; |
| | | positionNum = fightObj.PosNum - 1; |
| | | |
| | | // 【重要】战斗构成里没有卡牌的guid |
| | | guid = string.Empty; |
| | | |
| | | Update(); |
| | | } |
| | | |
| | | |
| | | private static int DecreasingObjID = 0; |
| | | |
| | | // 布阵时的构造 |
| | | public TeamHero(HeroInfo heroInfo, int posNum, TeamBase _teamBase) |
| | | { |
| | |
| | | |
| | | teamBase = _teamBase; |
| | | |
| | | ObjID = 0; |
| | | ObjID = --DecreasingObjID; |
| | | NPCID = 0; |
| | | |
| | | curHp = heroInfo.hp; |
| | |
| | | |
| | | public void OnSwapPosition(TeamHero teamHero) |
| | | { |
| | | int tempPosNum = positionNum; |
| | | positionNum = teamHero.positionNum; |
| | | teamHero.positionNum = tempPosNum; |
| | | |
| | | teamBase.tempHeroes[positionNum] = this; |
| | | teamBase.tempHeroes[teamHero.positionNum] = teamHero; |
| | | teamBase.SwapPosition(positionNum, teamHero.positionNum); |
| | | |
| | | Update(); |
| | | } |