Beispiel #1
0
        public static string GetNotificationName(ushort componentId, ushort notificationId)
        {
            string result = "";

            switch ((Component)componentId)
            {
            case Component.GAMEMANAGER:
                result = GameManagerComponent.GetNotificationName(notificationId);
                break;

            case Component.STATS:
                result = StatsComponent.GetNotificationName(notificationId);
                break;

            case Component.USERSESSIONS:
                result = UserSessionsComponent.GetNotificationName(notificationId);
                break;

            case Component.GAMEREPORTING:
                result = GameReportingComponent.GetNotificationName(notificationId);
                break;

            default:
                result = string.Format("0x" + notificationId.ToString("X4"));
                break;
            }

            return(result);
        }
Beispiel #2
0
        public static string GetCommandName(ushort componentId, ushort commandId)
        {
            string result = "";

            switch ((Component)componentId)
            {
            case Component.AUTHENTICATION:
                result = AuthenticationComponent.GetCommandName(commandId);
                break;

            case Component.GAMEMANAGER:
                result = GameManagerComponent.GetCommandName(commandId);
                break;

            case Component.REDIRECTOR:
                result = RedirectorComponent.GetCommandName(commandId);
                break;

            case Component.STATS:
                result = StatsComponent.GetCommandName(commandId);
                break;

            case Component.UTIL:
                result = UtilComponent.GetCommandName(commandId);
                break;

            case Component.CLUBS:
                result = ClubsComponent.GetCommandName(commandId);
                break;

            case Component.RSP:
                result = RSPComponent.GetCommandName(commandId);
                break;

            case Component.USERSESSIONS:
                result = UserSessionsComponent.GetCommandName(commandId);
                break;

            case Component.GAMEREPORTING:
                result = GameReportingComponent.GetCommandName(commandId);
                break;

            default:
                result = string.Format("0x" + commandId.ToString("X4"));
                break;
            }

            return(result);
        }
Beispiel #3
0
        public static void HandleRequest(ulong clientId, Packet packet, SslStream stream)
        {
            Utilities.LogRequest(packet);

            switch (packet.componentId)
            {
            case Component.REDIRECTOR:
                RedirectorComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.UTIL:
                UtilComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.AUTHENTICATION:
                AuthenticationComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.USERSESSIONS:
                UserSessionsComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.GAMEMANAGER:
                GameManagerComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.RSP:
                RSPComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.GAMEREPORTING:
                GameReportingComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.CLUBS:
                ClubsComponent.HandleComponent(clientId, packet, stream);
                break;

            case Component.STATS:
                StatsComponent.HandleComponent(clientId, packet, stream);
                break;

            default:
                Utilities.LogUnhandledRequest(packet);
                //SendError(packet, stream);
                break;
            }
        }