public override void OnReceiveSessionMessage(ServerSessionMessage message) { switch (message.GetMessageType()) { case ServerMessageType.START_SERVER_SESSION_FAILED: ProxyMessageManager.OnStartServerSessionFailedMessageReceived((StartServerSessionFailedMessage)message); break; case ServerMessageType.STOP_SESSION: ProxyMessageManager.OnStopSessionMessageReceived((StopSessionMessage)message); break; case ServerMessageType.STOP_SERVER_SESSION: ProxyMessageManager.OnStopServerSessionMessageReceived((StopServerSessionMessage)message); break; case ServerMessageType.STOP_SPECIFIED_SERVER_SESSION: ProxyMessageManager.OnStopSpecifiedServerSessionMessageReceived((StopSpecifiedServerSessionMessage)message); break; case ServerMessageType.FORWARD_LOGIC_MESSAGE: ProxyMessageManager.OnForwardLogicMessageReceived((ForwardLogicMessage)message); break; } }
public static void ReceiveMessage(ServerSessionMessage message) { if (GameModeClusterManager.m_sessionClusters.TryGetValue(message.SessionId, out GameModeCluster cluster)) { cluster.SendMessage(message); } }
public override void OnReceiveSessionMessage(ServerSessionMessage message) { switch (message.GetMessageType()) { case ServerMessageType.START_SERVER_SESSION: AllianceSessionManager.OnStartServerSessionMessageReceived((StartServerSessionMessage)message); break; case ServerMessageType.STOP_SERVER_SESSION: AllianceSessionManager.OnStopServerSessionMessageReceived((StopServerSessionMessage)message); break; case ServerMessageType.UPDATE_SOCKET_SERVER_SESSION: StreamMessageManager.OnUpdateSocketServerSessionMessageReceived((UpdateSocketServerSessionMessage)message); break; case ServerMessageType.FORWARD_LOGIC_MESSAGE: StreamMessageManager.OnForwardLogicMessageReceived((ForwardLogicMessage)message); break; case ServerMessageType.FORWARD_LOGIC_REQUEST_MESSAGE: StreamMessageManager.OnForwardLogicMessageRequestMessageReceived((ForwardLogicRequestMessage)message); break; case ServerMessageType.SEND_AVATAR_STREAMS_TO_CLIENT: StreamMessageManager.OnSendAvatarStreamsToClientMessageReceived((SendAvatarStreamsToClientMessage)message); break; } }
public void SendMessage(ServerSessionMessage message, int serverType) { message.SessionId = this.Id; if (this.m_sockets[serverType] != null) { ServerMessageManager.SendMessage(message, this.m_sockets[serverType]); } }
public override void OnReceiveSessionMessage(ServerSessionMessage message) { switch (message.GetMessageType()) { case ServerMessageType.FORWARD_LOGIC_REQUEST_MESSAGE: ScoringMessageManager.OnForwardLogicRequestMessageReceived((ForwardLogicRequestMessage)message); break; } }
public override void OnReceiveSessionMessage(ServerSessionMessage message) { switch (message.GetMessageType()) { case ServerMessageType.FORWARD_LOGIC_REQUEST_MESSAGE: SearchMessageManager.OnForwardLogicRequestMessageReceived((ForwardLogicRequestMessage)message); break; case ServerMessageType.SEND_ALLIANCE_BOOKMARKS_FULL_DATA_TO_CLIENT: SearchMessageManager.OnSendAllianceBookmarksFullDataToClientMessageReceived((SendAllianceBookmarksFullDataToClientMessage)message); break; } }
public override void OnReceiveSessionMessage(ServerSessionMessage message) { switch (message.GetMessageType()) { case ServerMessageType.START_SERVER_SESSION: GameSessionManager.OnStartServerSessionMessageReceived((StartServerSessionMessage)message); break; case ServerMessageType.STOP_SERVER_SESSION: GameSessionManager.OnStopServerSessionMessageReceived((StopServerSessionMessage)message); break; case ServerMessageType.UPDATE_SOCKET_SERVER_SESSION: GameMessageManager.OnUpdateSocketServerSessionMessageReceived((UpdateSocketServerSessionMessage)message); break; case ServerMessageType.FORWARD_LOGIC_MESSAGE: GameMessageManager.OnForwardLogicMessageReceived((ForwardLogicMessage)message); break; case ServerMessageType.FORWARD_LOGIC_REQUEST_MESSAGE: GameMessageManager.OnForwardLogicMessageRequestMessageReceived((ForwardLogicRequestMessage)message); break; case ServerMessageType.CHANGE_GAME_STATE: GameMessageManager.OnChangeGameStateMessageReceived((ChangeGameStateMessage)message); break; case ServerMessageType.GAME_MATCHMAKING: GameMessageManager.OnGameMatchmakingMessageReceived((GameMatchmakingMessage)message); break; case ServerMessageType.GAME_MATCHMAKING_RESULT: GameMatchmakingManager.OnGameMatchmakingResultMessageReceived((GameMatchmakingResultMessage)message); break; case ServerMessageType.GAME_START_FAKE_ATTACK: GameMessageManager.OnGameStartFakeAttackMessageReceived((GameStartFakeAttackMessage)message); break; case ServerMessageType.GAME_FRIENDLY_SCOUT: GameMessageManager.OnGameFriendlyScoutMessageReceived((GameFriendlyScoutMessage)message); break; case ServerMessageType.GAME_SPECTATE_LIVE_REPLAY: GameMessageManager.OnGameSpectateLiveReplayMessageReceived((GameSpectateLiveReplayMessage)message); break; } }
public override void OnReceiveSessionMessage(ServerSessionMessage message) { switch (message.GetMessageType()) { case ServerMessageType.START_SERVER_SESSION: GameModeClusterManager.OnStartServerSessionMessageReceived((StartServerSessionMessage)message); break; case ServerMessageType.STOP_SERVER_SESSION: GameModeClusterManager.OnStopServerSessionMessageReceived((StopServerSessionMessage)message); break; default: GameModeClusterManager.ReceiveMessage(message); break; } }
public override void OnReceiveSessionMessage(ServerSessionMessage message) { switch (message.GetMessageType()) { case ServerMessageType.START_SERVER_SESSION: ChatSessionManager.OnStartServerSessionMessageReceived((StartServerSessionMessage)message); break; case ServerMessageType.STOP_SERVER_SESSION: ChatSessionManager.OnStopServerSessionMessageReceived((StopServerSessionMessage)message); break; case ServerMessageType.UPDATE_SOCKET_SERVER_SESSION: ChatMessageManager.OnUpdateSocketServerSessionMessageReceived((UpdateSocketServerSessionMessage)message); break; case ServerMessageType.FORWARD_LOGIC_MESSAGE: ChatMessageManager.OnForwardLogicMessageReceived((ForwardLogicMessage)message); break; } }
private static void OnAskForAllianceRankingListMessageReceived(AskForAllianceRankingListMessage message, ServerSessionMessage requestMessage) { if (message.GetLocalRanking()) { AllianceLocalRankingListMessage allianceLocalRankingListMessage = new AllianceLocalRankingListMessage(); allianceLocalRankingListMessage.SetAllianceRankingList(new LogicArrayList <AllianceRankingEntry>(0)); allianceLocalRankingListMessage.SetVillageType(message.GetVillageType()); ServerMessageManager.SendMessage(ScoringMessageManager.CreateForwardLogicMessage(allianceLocalRankingListMessage, requestMessage.SessionId), ServerManager.GetProxySocket(requestMessage.SessionId)); } else { AllianceRankingListMessage allianceRankingListMessage = new AllianceRankingListMessage(); allianceRankingListMessage.SetAllianceRankingList(ScoringManager.GetAllianceRankingList(message.GetVillageType(), message.RemoveAllianceId())); allianceRankingListMessage.SetDiamondPrizes(ScoringManager.GetDiamondPrizes()); allianceRankingListMessage.SetNextEndTimeSeconds(ScoringManager.GetNextEndTimeSeconds()); allianceRankingListMessage.SetVillageType(message.GetVillageType()); ServerMessageManager.SendMessage(ScoringMessageManager.CreateForwardLogicMessage(allianceRankingListMessage, requestMessage.SessionId), ServerManager.GetProxySocket(requestMessage.SessionId)); } }
private static void OnAskForAvatarDuelLastSeasonRankingListMessageReceived(AskForAvatarDuelLastSeasonRankingListMessage message, ServerSessionMessage requestMessage) { AvatarDuelLastSeasonRankingListMessage avatarDuelLastSeasonRankingListMessage = new AvatarDuelLastSeasonRankingListMessage(); avatarDuelLastSeasonRankingListMessage.SetAvatarRankingList(ScoringManager.GetLastSeasonAvatarDuelRankingList(message.RemoveAvatarId())); avatarDuelLastSeasonRankingListMessage.SetSeasonYear(ScoringManager.GetLastSeasonYear()); avatarDuelLastSeasonRankingListMessage.SetSeasonMonth(ScoringManager.GetLastSeasonMonth()); ServerMessageManager.SendMessage(ScoringMessageManager.CreateForwardLogicMessage(avatarDuelLastSeasonRankingListMessage, requestMessage.SessionId), ServerManager.GetProxySocket(requestMessage.SessionId)); }
private static void OnAskForLocalAvatarRankingListMessageReceived(AskForAvatarLocalRankingListMessage message, ServerSessionMessage requestMessage) { AvatarLocalRankingListMessage avatarLocalRankingListMessage = new AvatarLocalRankingListMessage(); avatarLocalRankingListMessage.SetAvatarRankingList(new LogicArrayList <AvatarRankingEntry>(0)); ServerMessageManager.SendMessage(ScoringMessageManager.CreateForwardLogicMessage(avatarLocalRankingListMessage, requestMessage.SessionId), ServerManager.GetProxySocket(requestMessage.SessionId)); }
private static void OnAskForAvatarRankingListMessageReceived(AskForAvatarRankingListMessage message, ServerSessionMessage requestMessage) { if (message.GetVillageType() == 1) { AvatarDuelRankingListMessage avatarDuelRankingListMessage = new AvatarDuelRankingListMessage(); LogicLong avatarId = message.RemoveAvatarId(); avatarDuelRankingListMessage.SetAvatarRankingList(ScoringManager.GetAvatarDuelRankingList(avatarId)); avatarDuelRankingListMessage.SetNextEndTimeSeconds(ScoringManager.GetNextEndTimeSeconds()); avatarDuelRankingListMessage.SetSeasonMonth(ScoringManager.GetSeasonMonth()); avatarDuelRankingListMessage.SetSeasonYear(ScoringManager.GetSeasonYear()); avatarDuelRankingListMessage.SetLastSeasonAvatarRankingList(ScoringManager.GetLastSeasonAvatarDuelRankingList(avatarId)); avatarDuelRankingListMessage.SetLastSeasonMonth(ScoringManager.GetLastSeasonMonth()); avatarDuelRankingListMessage.SetLastSeasonYear(ScoringManager.GetLastSeasonYear()); ServerMessageManager.SendMessage(ScoringMessageManager.CreateForwardLogicMessage(avatarDuelRankingListMessage, requestMessage.SessionId), ServerManager.GetProxySocket(requestMessage.SessionId)); } else { AvatarRankingListMessage avatarRankingListMessage = new AvatarRankingListMessage(); LogicLong avatarId = message.RemoveAvatarId(); avatarRankingListMessage.SetAvatarRankingList(ScoringManager.GetAvatarRankingList(avatarId)); avatarRankingListMessage.SetNextEndTimeSeconds(ScoringManager.GetNextEndTimeSeconds()); avatarRankingListMessage.SetSeasonMonth(ScoringManager.GetSeasonMonth()); avatarRankingListMessage.SetSeasonYear(ScoringManager.GetSeasonYear()); avatarRankingListMessage.SetLastSeasonAvatarRankingList(ScoringManager.GetLastSeasonAvatarRankingList(avatarId)); avatarRankingListMessage.SetLastSeasonMonth(ScoringManager.GetLastSeasonMonth()); avatarRankingListMessage.SetLastSeasonYear(ScoringManager.GetLastSeasonYear()); ServerMessageManager.SendMessage(ScoringMessageManager.CreateForwardLogicMessage(avatarRankingListMessage, requestMessage.SessionId), ServerManager.GetProxySocket(requestMessage.SessionId)); } }
public override void OnReceiveSessionMessage(ServerSessionMessage message) { throw new System.NotImplementedException(); }
public abstract void OnReceiveSessionMessage(ServerSessionMessage message);