|
@@ -56,6 +56,21 @@ namespace ET.Server
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public static void Init(this Map self)
|
|
|
+ {
|
|
|
+ self.UnitPlayers = new Dictionary<string, Struct.UnitPlayerData>();
|
|
|
+ self.TotalLikeNum = 0;
|
|
|
+ self.ConfigNum = 0;
|
|
|
+ self.DeadUnits = new List<int>();
|
|
|
+ self.DeadUnitPlayer = new List<int>();
|
|
|
+ self.IsGameOver = false;
|
|
|
+ self.CurBattleIndex = 0;
|
|
|
+ }
|
|
|
+
|
|
|
public static ZoneManagerPrx GetZoneManager(this Map self)
|
|
|
{
|
|
|
return self.DomainScene().GetComponent<BattleIceAgentComponent>().IceZoneManager;
|
|
@@ -66,7 +81,13 @@ namespace ET.Server
|
|
|
return self.DomainScene().GetComponent<BattleIceAgentComponent>().IceXmdsManager;
|
|
|
}
|
|
|
|
|
|
- public static GetPlayerData GetPlayerData(this Map self, long playerId)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private static GetPlayerData GetBattleServerPlayerData(this Map self, long playerId)
|
|
|
{
|
|
|
string result = self.GetXmdsManager().getPlayerData(playerId.ToString().Trim(), true);
|
|
|
return string.IsNullOrEmpty(result)? null : JsonConvert.DeserializeObject<GetPlayerData>(result);
|
|
@@ -79,7 +100,7 @@ namespace ET.Server
|
|
|
|
|
|
public static void SyncPlayerHistoryData(this Map self, WNPlayer player)
|
|
|
{
|
|
|
- GetPlayerData result = self.GetPlayerData(player.GetId());
|
|
|
+ GetPlayerData result = self.GetBattleServerPlayerData(player.GetId());
|
|
|
if (result == null)
|
|
|
{
|
|
|
return;
|