using Sog; using ProtoCSStruct; namespace Battle { internal static class BattleCreateSvc { public static void StartBattle(BattleObj battle) { TraceLog.Trace("BattleCreateSvc.StartBattle battleId {0}", battle.battleInfo.BattleId); } public static void DeleteAllPlayerInBattle(BattleObj battle) { // foreach (var player in battle.playerList) // { // BattleServerUtils.GetPlayerTableOp().RemovePlayer(player); // } } public static void OnBattleDestroy(BattleObj battle) { TraceLog.Trace("BattleCreateSvc.OnBattleDestroy battleId {0} destroy", battle.BattleId); SSBattleDestroyNotify notify = new SSBattleDestroyNotify(); notify.BattleId = battle.BattleId; //BattleServerUtils.GetPacketSender().SendToInstanceServer((int)SSGameMsgID.BattleDestroyNotify, ref notify, 0); DeleteAllPlayerInBattle(battle); BattleMatchNotify.NotifyAllPlayerCancelBattle(battle); } } }