internal void Trigger_OnRoundEnd(BotListing botListing, PlayerListing playerListing, GameEventLog gameLog, string userToken) { PlayerSession session = (PlayerSession)PlayerRegistry.GetClientSession(userToken); if (session != null) { IGameServerController_Callback callback = session.CallbackChannel; if (callback != null) { try { callback.GameServer_OnRoundEnd(botListing, playerListing, gameLog); } catch (CommunicationException ex) { Console.WriteLine("> Failed trigger event (CommunicationException): OnRoundEnd\n" + ex.Message); } catch (TimeoutException ex) { Console.WriteLine("> Failed trigger event (TimeoutException): OnRoundEnd\n" + ex.Message); } } else { Console.WriteLine("> Failed trigger event: OnRoundEnd\n" + "callback object null!"); } } else { Console.WriteLine("> Failed trigger event: OnRoundEnd\n" + "PlayerSession not found!"); } }
public BotListing GetBotListing() { BotListing botList = new BotListing(); botList.BotDetailList.Add(new BotDetail(Boss.PUID, GameBoss)); return(botList); }
internal void BroadcastToPlayers_RoundEnd(BotListing botListing, PlayerListing playerListing, GameEventLog gameLog) { Console.WriteLine("> Broadcasting to Players: RoundEnd"); foreach (KeyValuePair <string, ClientSession> kvp in PlayerRegistry) { Trigger_OnRoundEnd(botListing, playerListing, gameLog, kvp.Key); } }
public void GameServer_OnRoundEnd(BotListing botListing, PlayerListing playerListing, GameEventLog gameLog) { BotList = botListing; PlayerList = playerListing; if (gameLog != null) { gameLog.GameEventList.AddRange(GameLog.GameEventList); GameLog.GameEventList = gameLog.GameEventList; } }
public BotListing GetBotListing() { BotListing botlist = null; if (Game != null) { botlist = Game.GetBotListing(); } return(botlist); }