yyl
2025-08-05 06da72770c641fabf980816ed466a2280dac2be7
Main/System/Team/TeamHero.cs
@@ -14,7 +14,7 @@
    {
        get; private set;
    }
    public int positionNum;
    public int positionNum; //注意服务端的1号位是1,客户端在使用时是0,通信和策划沟通用1
//  战场数据
    public int ObjID = 0;// 战斗单位唯一ID
@@ -37,18 +37,20 @@
        // 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)
    {
@@ -59,7 +61,7 @@
        teamBase = _teamBase;
        ObjID = 0;
        ObjID = --DecreasingObjID;
        NPCID = 0;
        curHp = heroInfo.hp;
@@ -76,12 +78,7 @@
    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();
    }