From bae41593e19d32046f77ed1f036089e015380b99 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期三, 30 七月 2025 22:25:18 +0800 Subject: [PATCH] 117 【武将】武将系统 - 布阵临时版 --- Main/System/Team/TeamHero.cs | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Main/System/Team/TeamHero.cs b/Main/System/Team/TeamHero.cs index 0e2a2cd..0597344 100644 --- a/Main/System/Team/TeamHero.cs +++ b/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 @@ -41,7 +41,7 @@ maxHp = (long)fightObj.MaxHPEx * GeneralDefine.HundredMillion + (long)fightObj.MaxHP; rage = (int)fightObj.AngreXP; - positionNum = fightObj.PosNum; + positionNum = fightObj.PosNum - 1; // 銆愰噸瑕併�戞垬鏂楁瀯鎴愰噷娌℃湁鍗$墝鐨刧uid guid = string.Empty; @@ -76,12 +76,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(); } -- Gitblit v1.8.0