|
@@ -54,24 +54,23 @@ namespace ET.Server
|
|
|
{
|
|
|
Map map = self.GetParent<Map>();
|
|
|
map.CurBattleIndex = 1;
|
|
|
- self.TransferUnitsToNewTower();
|
|
|
+ map.TransferUnitsToNewTower();
|
|
|
return;
|
|
|
}
|
|
|
else if ("Tower2".Equals(parames[1]))
|
|
|
{
|
|
|
Log.Debug($"塔2死亡事件...");
|
|
|
- Map map = self.GetParent<Map>();
|
|
|
- map.CurBattleIndex = 2;
|
|
|
- self.TransferUnitsToNewTower();
|
|
|
-
|
|
|
- return;
|
|
|
+ Map map = self.GetParent<Map>();
|
|
|
+ map.CurBattleIndex = 2;
|
|
|
+ map.TransferUnitsToNewTower();
|
|
|
+ return;
|
|
|
}
|
|
|
else if ("Tower3".Equals(parames[1]))
|
|
|
{
|
|
|
Log.Debug($"塔3死亡事件...");
|
|
|
Map map = self.GetParent<Map>();
|
|
|
map.CurBattleIndex = 3;
|
|
|
- self.TransferUnitsToNewTower();
|
|
|
+ map.TransferUnitsToNewTower();
|
|
|
return;
|
|
|
}
|
|
|
else
|
|
@@ -112,18 +111,6 @@ namespace ET.Server
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private static void TransferUnitsToNewTower(this MapEventComponent self)
|
|
|
- {
|
|
|
- Map map = self.GetParent<Map>();
|
|
|
-
|
|
|
- foreach(Struct.UnitPlayerData player in map.UnitPlayers.Values)
|
|
|
- {
|
|
|
- var pos = map.GetRandomPlayerPos();
|
|
|
- map.GetXmdsManager().transferUnit(map.Id.ToString(), player.ObjId, pos.X, pos.Y);
|
|
|
- }
|
|
|
- Log.Debug($"transfer unit: {map.UnitPlayers.Count}");
|
|
|
- }
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 场景结算事件
|
|
|
/// </summary>
|
|
@@ -138,7 +125,7 @@ namespace ET.Server
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
- // 场景结束逻辑
|
|
|
+ // 场景结束排行榜逻辑
|
|
|
map.GetComponent<MapRankComponent>().OnGameOver();
|
|
|
// 记录玩家历史
|
|
|
map.SyncPlayerHistoryData(map.Player);
|