Ejemplo n.º 1
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(Opcodes.RFACE, new ProcessRequestCallback(InitLogin), true);
     DataRouter.RegisterHandler(Opcodes.REGISTERCHECKUSER, new ProcessRequestCallback(CheckUsername), true);
     DataRouter.RegisterHandler(Opcodes.REGISTER, new ProcessRequestCallback(Register), true);
     DataRouter.RegisterHandler(Opcodes.LOGIN, new ProcessRequestCallback(Loginn), true);
 }
Ejemplo n.º 2
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(FlagcodesIn.USER, ItemcodesIn.FLOWERPOWER, new ProcessRequestCallback(FlowerPowerManager.smethod_0), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER, ItemcodesIn.USER_EDIT_AVATAR, new ProcessRequestCallback(FlowerPowerManager.smethod_3), false);
     DataRouter.RegisterHandler(FlagcodesIn.NEWS, ItemcodesIn.NEWS_LOAD_ARTICLES, new ProcessRequestCallback(FlowerPowerManager.smethod_1), false);
     DataRouter.RegisterHandler(FlagcodesIn.NEWS, ItemcodesIn.NEWS_SHOW_ARTICLES, new ProcessRequestCallback(FlowerPowerManager.smethod_2), false);
 }
Ejemplo n.º 3
0
        public static void Initialize(SqlDatabaseClient MySqlClient)
        {
            mFlatCategories     = new List <FlatCategory>();
            mOfficialItems      = new List <NavigatorOfficialItem>();
            mEventSearchQueries = new Dictionary <string, int>();

            if ((bool)ConfigManager.GetValue("cache.navigator.enabled"))
            {
                mCacheController = new ResponseCacheController((int)ConfigManager.GetValue("cache.navigator.lifetime"));
            }

            ReloadFlatCategories(MySqlClient);
            ReloadOfficialItems(MySqlClient);

            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_CATEGORIES, new ProcessRequestCallback(GetCategories));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_OFFICIAL_ROOMS, new ProcessRequestCallback(GetOfficialRooms));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_EVENTS, new ProcessRequestCallback(GetEventRooms));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_FAVORITE_ROOMS, new ProcessRequestCallback(GetFavoriteRooms));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_FRIENDS_ROOMS, new ProcessRequestCallback(GetFriendsRooms));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_POPULAR_ROOMS, new ProcessRequestCallback(GetPopularRooms));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_RATED_ROOMS, new ProcessRequestCallback(GetRatedRooms));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_RECENT_ROOMS, new ProcessRequestCallback(GetRecentRooms));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_ROOMS_WITH_FRIENDS, new ProcessRequestCallback(GetRoomsWithFriends));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_USER_ROOMS, new ProcessRequestCallback(GetUserRooms));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_GET_POPULAR_TAGS, new ProcessRequestCallback(GetPopularTags));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_ADD_FAVORITE, new ProcessRequestCallback(AddFavorite));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_REMOVE_FAVORITE, new ProcessRequestCallback(RemoveFavorite));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_SEARCH, new ProcessRequestCallback(PerformSearch));
            DataRouter.RegisterHandler(OpcodesIn.NAVIGATOR_SEARCH_TAGS, new ProcessRequestCallback(PerformSearch));
            DataRouter.RegisterHandler(OpcodesIn.FRIEND_BAR_FIND_NEW_FRIENDS, new ProcessRequestCallback(FindNewFriends));
        }
Ejemplo n.º 4
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(FlagcodesIn.SPACES, ItemcodesIn.SPACES_ENTER_SCENE, new ProcessRequestCallback(SpaceHandler.smethod_0), false);
     DataRouter.RegisterHandler(FlagcodesIn.SPACES, ItemcodesIn.SPACES_ENTER_RANDSCENE, new ProcessRequestCallback(SpaceHandler.smethod_0), false);
     DataRouter.RegisterHandler(128, 121, new ProcessRequestCallback(SpaceHandler.smethod_2), false);
     DataRouter.RegisterHandler(FlagcodesIn.SPACES, ItemcodesIn.SPACES_EXIT_LAND, new ProcessRequestCallback(SpaceHandler.smethod_3), false);
     DataRouter.RegisterHandler(FlagcodesIn.ISLANDS, ItemcodesIn.ISLAND_CREATE, new ProcessRequestCallback(SpaceHandler.smethod_23), false);
     DataRouter.RegisterHandler(FlagcodesIn.ISLANDS, ItemcodesIn.ISLAND_CREATE_ZONE, new ProcessRequestCallback(SpaceHandler.smethod_25), false);
     DataRouter.RegisterHandler(FlagcodesIn.ISLANDS, ItemcodesIn.ISLAND_PRE, new ProcessRequestCallback(SpaceHandler.smethod_24), false);
     DataRouter.RegisterHandler(FlagcodesIn.SPACE_ITEM, ItemcodesIn.SPACE_ITEM_CATCH, new ProcessRequestCallback(SpaceHandler.smethod_20), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_ACTIONS, 0, new ProcessRequestCallback(SpaceHandler.smethod_5), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_ROTATION, 0, new ProcessRequestCallback(SpaceHandler.smethod_7), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_HOBBYS, 0, new ProcessRequestCallback(SpaceHandler.smethod_8), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_WISHES, 0, new ProcessRequestCallback(SpaceHandler.smethod_9), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_VOTES, 0, new ProcessRequestCallback(SpaceHandler.smethod_10), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_MOTTO, 0, new ProcessRequestCallback(SpaceHandler.smethod_17), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_INTERACT, ItemcodesIn.USER_INTERACT_SEND, new ProcessRequestCallback(SpaceHandler.smethod_11), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_INTERACT, ItemcodesIn.USER_INTERACT_ACCEPT, new ProcessRequestCallback(SpaceHandler.smethod_12), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_INTERACT, ItemcodesIn.USER_INTERACT_CANCEL, new ProcessRequestCallback(SpaceHandler.smethod_13), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_INTERACT, ItemcodesIn.TARGETUSER_INTERACT_CANCEL, new ProcessRequestCallback(SpaceHandler.smethod_14), false);
     DataRouter.RegisterHandler(FlagcodesIn.SEND_UPPERCUT, 0, new ProcessRequestCallback(SpaceHandler.smethod_21), false);
     DataRouter.RegisterHandler(FlagcodesIn.SEND_COCONUT, 0, new ProcessRequestCallback(SpaceHandler.smethod_22), false);
     DataRouter.RegisterHandler(FlagcodesIn.LATENCY_TEST, 0, new ProcessRequestCallback(SpaceHandler.smethod_6), false);
     DataRouter.RegisterHandler(FlagcodesIn.WALK, 0, new ProcessRequestCallback(SpaceHandler.smethod_4), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_CHAT, 0, new ProcessRequestCallback(SpaceHandler.smethod_18), false);
     DataRouter.RegisterHandler(FlagcodesIn.USER_WHISPER, 0, new ProcessRequestCallback(SpaceHandler.smethod_19), false);
     DataRouter.RegisterHandler(FlagcodesIn.COLOR_UPPERCUT, 0, new ProcessRequestCallback(SpaceHandler.smethod_15), false);
     DataRouter.RegisterHandler(FlagcodesIn.COLOR_COCONUT, 0, new ProcessRequestCallback(SpaceHandler.smethod_16), false);
 }
Ejemplo n.º 5
0
        public static void Initialize()
        {
            DataRouter.RegisterHandler(OpcodesIn.CATALOG_CAN_GIFT, new ProcessRequestCallback(CheckCanGift));
            DataRouter.RegisterHandler(OpcodesIn.CATALOG_PURCHASE, new ProcessRequestCallback(OnPurchase));

            mPurchaseSyncRoot = new object();
        }
Ejemplo n.º 6
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(Opcodes.SPACESENTERSCENE, new ProcessRequestCallback(SpaceHandler.smethod_0), false);
     DataRouter.RegisterHandler(Opcodes.SPACESENTERRANDSCENE, new ProcessRequestCallback(SpaceHandler.smethod_0), false);
     DataRouter.RegisterHandler(Opcodes.SPACESLOADUSERS, new ProcessRequestCallback(SpaceHandler.smethod_2), false);
     DataRouter.RegisterHandler(Opcodes.SPACESEXITLAND, new ProcessRequestCallback(SpaceHandler.smethod_3), false);
     DataRouter.RegisterHandler(Opcodes.ISLANDCREATE, new ProcessRequestCallback(SpaceHandler.smethod_23), false);
     DataRouter.RegisterHandler(Opcodes.ISLANDCREATEZONE, new ProcessRequestCallback(SpaceHandler.smethod_25), false);
     DataRouter.RegisterHandler(Opcodes.ISLANDPRE, new ProcessRequestCallback(SpaceHandler.smethod_24), false);
     DataRouter.RegisterHandler(Opcodes.SPACEITEMCATCH, new ProcessRequestCallback(SpaceHandler.smethod_20), false);
     DataRouter.RegisterHandler(Opcodes.USERACTIONS, new ProcessRequestCallback(SpaceHandler.smethod_5), false);
     DataRouter.RegisterHandler(Opcodes.USERROTATION, new ProcessRequestCallback(SpaceHandler.smethod_7), false);
     DataRouter.RegisterHandler(Opcodes.USERHOBBYS, new ProcessRequestCallback(SpaceHandler.smethod_8), false);
     DataRouter.RegisterHandler(Opcodes.USERWHISES, new ProcessRequestCallback(SpaceHandler.smethod_9), false);
     DataRouter.RegisterHandler(Opcodes.USERVOTES, new ProcessRequestCallback(SpaceHandler.smethod_10), false);
     DataRouter.RegisterHandler(Opcodes.USERMOTTO, new ProcessRequestCallback(SpaceHandler.smethod_17), false);
     DataRouter.RegisterHandler(Opcodes.USERINTERACTSEND, new ProcessRequestCallback(SpaceHandler.smethod_11), false);
     DataRouter.RegisterHandler(Opcodes.USERINTERACTACCEPT, new ProcessRequestCallback(SpaceHandler.smethod_12), false);
     DataRouter.RegisterHandler(Opcodes.USERINTERACTCANCEL, new ProcessRequestCallback(SpaceHandler.smethod_13), false);
     DataRouter.RegisterHandler(Opcodes.TARGETUSERINTERACTCANCEL, new ProcessRequestCallback(SpaceHandler.smethod_14), false);
     DataRouter.RegisterHandler(Opcodes.SENDUPPERCUT, new ProcessRequestCallback(SpaceHandler.smethod_21), false);
     DataRouter.RegisterHandler(1490, new ProcessRequestCallback(SpaceHandler.smethod_22), false);
     DataRouter.RegisterHandler(Opcodes.LATENCYTEST, new ProcessRequestCallback(SpaceHandler.smethod_6), false);
     DataRouter.RegisterHandler(Opcodes.WALK, new ProcessRequestCallback(SpaceHandler.smethod_4), false);
     DataRouter.RegisterHandler(Opcodes.USERCHAT, new ProcessRequestCallback(SpaceHandler.smethod_18), false);
     DataRouter.RegisterHandler(Opcodes.USERWHISPER, new ProcessRequestCallback(SpaceHandler.smethod_19), false);
     DataRouter.RegisterHandler(Opcodes.COLORUPPERCUT, new ProcessRequestCallback(SpaceHandler.smethod_15), false);
     DataRouter.RegisterHandler(Opcodes.COLORCOCONUT, new ProcessRequestCallback(SpaceHandler.smethod_16), false);
 }
Ejemplo n.º 7
0
        public static void Main(string[] args)
        {
            bool_0 = true;
            DateTime now = DateTime.Now;

            Output.InitializeStream(true, OutputLevel.DebugInformation);
            Output.WriteLine("Initializing BoomBang game environment...");
            ConfigManager.Initialize(Constants.DataFileDirectory + @"\server-main.cfg");
            Output.SetVerbosityLevel((OutputLevel)ConfigManager.GetValue("output.verbositylevel"));
            foreach (string str in args)
            {
                Output.WriteLine("Command line argument: " + str);
                Input.ProcessInput(str.Split(new char[] { ' ' }));
            }
            try
            {
                Output.WriteLine("Initializing MySQL manager...");
                SqlDatabaseManager.Initialize();
                Output.WriteLine("Setting up server listener on port " + ((int)ConfigManager.GetValue("net.bind.port")) + "...");
                boomBangTcpListener_0 = new BoomBangTcpListener(new IPEndPoint(IPAddress.Any, (int)ConfigManager.GetValue("net.bind.port")), (int)ConfigManager.GetValue("net.backlog"), new OnNewConnectionCallback(SessionManager.HandleIncomingConnection));
                using (SqlDatabaseClient client = SqlDatabaseManager.GetClient())
                {
                    Output.WriteLine("Resetting database counters and statistics...");
                    smethod_0(client);
                    Output.WriteLine("Initializing game components and workers...");
                    DataRouter.Initialize();
                    GlobalHandler.Initialize();
                    SessionManager.Initialize();
                    CharacterInfoLoader.Initialize();
                    UserCredentialsAuthenticator.Initialize();
                    RegisterManager.Initialize();
                    Class1.smethod_0();
                    LaptopHandler.Initialize();
                    CatalogManager.Initialize(client);
                    FlowerPowerManager.Initialize();
                    NewsCacheManager.Initialize(client);
                    Navigator.Initialize(client);
                    SpaceManager.Initialize(client);
                    SpaceInfoLoader.Initialize();
                    SpaceHandler.Initialize();
                    GameHandler.Initialize();
                    CrossdomainPolicy.Initialize(@"Data\crossdomain.xml");
                    WordFilterManager.Initialize(client);
                    AdvertisementManager.Initialize();
                    ContestHandler.Initialize();
                    SilverCoinsWorker.Initialize();
                    ModerationBanManager.Initialize(client);
                }
            }
            catch (Exception exception)
            {
                HandleFatalError("Could not initialize BoomBang game environment: " + exception.Message + "\nStack trace: " + exception.StackTrace);
                return;
            }
            TimeSpan span = (TimeSpan)(DateTime.Now - now);

            Output.WriteLine("The server has initialized successfully (" + Math.Round(span.TotalSeconds, 2) + " seconds). Ready for connections.", OutputLevel.Notification);
            Output.WriteLine("Pulsa ENTER e introduce un comando. Ten una guía de comandos escribiendo HELP", OutputLevel.Notification);
            Console.Beep();
        }
Ejemplo n.º 8
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(OpcodesIn.SESSION_PONG, new ProcessRequestCallback(OnSessionPong), true);
     DataRouter.RegisterHandler(OpcodesIn.SESSION_USER_AGENT_INFORMATION, new ProcessRequestCallback(OnUserAgent), true);
     DataRouter.RegisterHandler(OpcodesIn.SESSION_LATENCY_TEST, new ProcessRequestCallback(OnSessionLatencyTest), true);
     DataRouter.RegisterHandler(OpcodesIn.SESSION_DEBUG_EVENT, new ProcessRequestCallback(OnDebugEvent), true);
     DataRouter.RegisterHandler(OpcodesIn.SESSION_CLIENT_CONFIGURATION, new ProcessRequestCallback(OnClientConfig));
     DataRouter.RegisterHandler(OpcodesIn.SESSION_DISCONNECT_EVENT, new ProcessRequestCallback(OnClientDisconnectNotification), true);
 }
Ejemplo n.º 9
0
        public static void Initialize(SqlDatabaseClient MySqlClient)
        {
            mAchievements = new Dictionary <string, Achievement>();
            mSyncRoot     = new object();

            ReloadAchievements(MySqlClient);

            DataRouter.RegisterHandler(OpcodesIn.ACHIEVEMENTS_GET_LIST, new ProcessRequestCallback(GetList));
        }
Ejemplo n.º 10
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(Opcodes.INITFLOWER, new ProcessRequestCallback(InitFlower), false);
     DataRouter.RegisterHandler(Opcodes.ADVERTISEMENT, new ProcessRequestCallback(Advertisement), false);
     DataRouter.RegisterHandler(Opcodes.FLOWERPOWER, new ProcessRequestCallback(Flowerpower), false);
     DataRouter.RegisterHandler(Opcodes.NEWSLOAD, new ProcessRequestCallback(LoadNews), false);
     DataRouter.RegisterHandler(Opcodes.NEWSREAD, new ProcessRequestCallback(ReadNews), false);
     DataRouter.RegisterHandler(Opcodes.UNKNOW1, new ProcessRequestCallback(Unknow1), false);
 }
Ejemplo n.º 11
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(OpcodesIn.INIT_CRYPTO, new ProcessRequestCallback(InitCrypto), true);
     DataRouter.RegisterHandler(OpcodesIn.USER_SSO_LOGIN, new ProcessRequestCallback(SsoLogin), true);
     DataRouter.RegisterHandler(OpcodesIn.USER_GET_INFO, new ProcessRequestCallback(GetUserInfo));
     DataRouter.RegisterHandler(OpcodesIn.USER_GET_BALANCE, new ProcessRequestCallback(GetBalance));
     DataRouter.RegisterHandler(OpcodesIn.USER_GET_SUBSCRIPTION_DATA, new ProcessRequestCallback(GetSubscriptionData));
     DataRouter.RegisterHandler(OpcodesIn.USER_GET_IGNORED_USERS, new ProcessRequestCallback(GetIgnoredUsers));
 }
Ejemplo n.º 12
0
        public static void Initialize(SqlDatabaseClient MySqlClient)
        {
            mRewards  = new Dictionary <int, List <uint> >();
            mSyncRoot = new object();

            ReloadRewards(MySqlClient);

            DataRouter.RegisterHandler(OpcodesIn.CATALOG_GET_RECYCLER_REWARDS, new ProcessRequestCallback(GetRewardsList));
            DataRouter.RegisterHandler(OpcodesIn.CATALOG_GET_RECYCLER_CONFIG, new ProcessRequestCallback(GetConfig));
            DataRouter.RegisterHandler(OpcodesIn.CATALOG_RECYCLE_ITEMS, new ProcessRequestCallback(RecycleItems));
        }
Ejemplo n.º 13
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(OpcodesIn.ROOM_TRADE_INITIATE, new ProcessRequestCallback(TradeInitiate));
     DataRouter.RegisterHandler(OpcodesIn.ROOM_TRADE_STOP, new ProcessRequestCallback(TradeStop));
     DataRouter.RegisterHandler(OpcodesIn.ROOM_TRADE_END, new ProcessRequestCallback(TradeStop));
     DataRouter.RegisterHandler(OpcodesIn.ROOM_TRADE_OFFER, new ProcessRequestCallback(TradeOffer));
     DataRouter.RegisterHandler(OpcodesIn.ROOM_TRADE_TAKE_BACK, new ProcessRequestCallback(TradeTakeBack));
     DataRouter.RegisterHandler(OpcodesIn.ROOM_TRADE_ACCEPT, new ProcessRequestCallback(TradeAccept));
     DataRouter.RegisterHandler(OpcodesIn.ROOM_TRADE_MODIFY, new ProcessRequestCallback(TradeModify));
     DataRouter.RegisterHandler(OpcodesIn.ROOM_TRADE_COMPLETE, new ProcessRequestCallback(TradeComplete));
 }
Ejemplo n.º 14
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(3032, new ProcessRequestCallback(SurpressingHandler));
     DataRouter.RegisterHandler(228, new ProcessRequestCallback(SurpressingHandler));
     DataRouter.RegisterHandler(3110, new ProcessRequestCallback(SurpressingHandler));
     DataRouter.RegisterHandler(233, new ProcessRequestCallback(SurpressingHandler));
     DataRouter.RegisterHandler(3011, new ProcessRequestCallback(SurpressingHandler));
     DataRouter.RegisterHandler(473, new ProcessRequestCallback(SurpressingHandler));
     DataRouter.RegisterHandler(126, new ProcessRequestCallback(SurpressingHandler));
     DataRouter.RegisterHandler(3105, new ProcessRequestCallback(SurpressingHandler));
     DataRouter.RegisterHandler(316, new ProcessRequestCallback(SurpressingHandler));
 }
Ejemplo n.º 15
0
        public static void Initialize(SqlDatabaseClient MySqlClient)
        {
            mQuests   = new Dictionary <uint, Quest>();
            mSyncRoot = new object();

            ReloadQuests(MySqlClient);

            DataRouter.RegisterHandler(OpcodesIn.QUESTS_GET_LIST, new ProcessRequestCallback(GetList));
            DataRouter.RegisterHandler(OpcodesIn.QUESTS_ACTIVATE, new ProcessRequestCallback(ActivateQuest));
            DataRouter.RegisterHandler(OpcodesIn.QUESTS_GET_CURRENT, new ProcessRequestCallback(GetCurrentQuest));
            DataRouter.RegisterHandler(OpcodesIn.QUESTS_CANCEL, new ProcessRequestCallback(CancelQuest));
        }
Ejemplo n.º 16
0
 public static void Initialize(SqlDatabaseClient MySqlClient)
 {
     list_0       = new List <NavigatorCategory>();
     list_1       = new List <NavigatorItem>();
     dictionary_0 = new Dictionary <string, int>();
     if ((bool)ConfigManager.GetValue("cache.navigator.enabled"))
     {
         responseCacheController_0 = new ResponseCacheController(0, 0);
     }
     ReloadOfficialItems(MySqlClient);
     DataRouter.RegisterHandler(Opcodes.NAVIGATORITEMSLOAD, new ProcessRequestCallback(Navigator.smethod_5), false);
     DataRouter.RegisterHandler(Opcodes.NAVIGATORSUBITEMSLOAD, new ProcessRequestCallback(Navigator.smethod_6), false);
 }
Ejemplo n.º 17
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_INIT, new ProcessRequestCallback(OnMessengerInit));
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_SEARCH, new ProcessRequestCallback(OnMessengerSearch));
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_SEND_IM, new ProcessRequestCallback(OnSendIm));
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_FRIEND_REQUEST, new ProcessRequestCallback(OnFriendRequest));
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_FRIEND_ACCEPT, new ProcessRequestCallback(OnFriendRequestAccept));
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_FRIEND_DECLINE, new ProcessRequestCallback(OnFriendRequestDecline));
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_REMOVE_BUDDY, new ProcessRequestCallback(OnFriendRemove));
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_UPDATE, new ProcessRequestCallback(OnMessengerUpdate));
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_FOLLOW_BUDDY, new ProcessRequestCallback(OnFollowBuddy));
     DataRouter.RegisterHandler(OpcodesIn.MESSENGER_SEND_IM_INVITE, new ProcessRequestCallback(OnInvite));
 }
Ejemplo n.º 18
0
        public static void Initialize(SqlDatabaseClient MySqlClient)
        {
            mTickets  = new Dictionary <uint, ModerationTicket>();
            mSyncRoot = new object();

            LoadPendingTickets(MySqlClient);

            DataRouter.RegisterHandler(OpcodesIn.HELP_SUBMIT_CFH, new ProcessRequestCallback(HandleIncomingTicket));
            DataRouter.RegisterHandler(OpcodesIn.HELP_DELETE_PENDING_CFH, new ProcessRequestCallback(DeletePendingTicket));
            DataRouter.RegisterHandler(OpcodesIn.MODERATION_TICKET_PICK, new ProcessRequestCallback(PickTicket));
            DataRouter.RegisterHandler(OpcodesIn.MODERATION_TICKET_RELEASE, new ProcessRequestCallback(ReleaseTicket));
            DataRouter.RegisterHandler(OpcodesIn.MODERATION_TICKET_CLOSE, new ProcessRequestCallback(CloseTicket));
        }
Ejemplo n.º 19
0
        public static void Initialize(SqlDatabaseClient MySqlClient)
        {
            mCategories = new Dictionary <uint, HelpCategory>();
            mTopics     = new Dictionary <uint, HelpTopic>();

            LoadCategories(MySqlClient);
            LoadTopics(MySqlClient);

            DataRouter.RegisterHandler(OpcodesIn.HELP_HOMEPAGE, new ProcessRequestCallback(GetHelpHomepage));
            DataRouter.RegisterHandler(OpcodesIn.HELP_VIEW_TOPIC, new ProcessRequestCallback(GetHelpTopic));
            DataRouter.RegisterHandler(OpcodesIn.HELP_GET_CATEGORIES, new ProcessRequestCallback(GetHelpCategoryList));
            DataRouter.RegisterHandler(OpcodesIn.HELP_SEARCH, new ProcessRequestCallback(GetHelpSearch));
            DataRouter.RegisterHandler(OpcodesIn.HELP_VIEW_CATEGORY, new ProcessRequestCallback(GetTopicsList));
        }
Ejemplo n.º 20
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_LOAD_FRIENDS, new ProcessRequestCallback(LaptopHandler.smethod_0), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_LOAD_MESSAGES, new ProcessRequestCallback(LaptopHandler.smethod_1), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_SEARCH_BUDDY, new ProcessRequestCallback(LaptopHandler.smethod_3), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_UPDATE_LAPTOP, new ProcessRequestCallback(LaptopHandler.smethod_2), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_UPDATE_BUDDY, new ProcessRequestCallback(LaptopHandler.smethod_4), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_FRIEND_REQUEST, new ProcessRequestCallback(LaptopHandler.smethod_5), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_FRIEND_DECLINE, new ProcessRequestCallback(LaptopHandler.smethod_7), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_FRIEND_ACCEPT, new ProcessRequestCallback(LaptopHandler.smethod_6), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_FRIEND_DELETE, new ProcessRequestCallback(LaptopHandler.smethod_8), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_SEND_MESSAGE, new ProcessRequestCallback(LaptopHandler.smethod_9), false);
     DataRouter.RegisterHandler(FlagcodesIn.LAPTOP, ItemcodesIn.LAPTOP_DELETE_MESSAGE, new ProcessRequestCallback(LaptopHandler.smethod_10), false);
 }
Ejemplo n.º 21
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(Opcodes.LAPTOPLOADFRIENDS, new ProcessRequestCallback(LoadFriends), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPLOADMESSAGES, new ProcessRequestCallback(LoadMessages), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPSEARCHBUDDY, new ProcessRequestCallback(LaptopHandler.smethod_3), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPUPDATELAPTOP, new ProcessRequestCallback(LaptopHandler.smethod_2), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPUPDATEBUDDY, new ProcessRequestCallback(LaptopHandler.smethod_4), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPFRIENREQUEST, new ProcessRequestCallback(LaptopHandler.smethod_5), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPFRIENDDECLINE, new ProcessRequestCallback(LaptopHandler.smethod_7), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPFRIENDACCEPT, new ProcessRequestCallback(LaptopHandler.smethod_6), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPFRIENDDELETE, new ProcessRequestCallback(LaptopHandler.smethod_8), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPSENDMESSAGE, new ProcessRequestCallback(LaptopHandler.smethod_9), false);
     DataRouter.RegisterHandler(Opcodes.LAPTOPDELETEMESSAGE, new ProcessRequestCallback(LaptopHandler.smethod_10), false);
 }
Ejemplo n.º 22
0
 public static void Initialize(SqlDatabaseClient MySqlClient)
 {
     dictionary_0 = new Dictionary <int, List <CatalogItem> >();
     dictionary_1 = new Dictionary <uint, CatalogItem>();
     dictionary_2 = new Dictionary <string, CatalogItem>();
     list_0       = new List <CatalogItem>();
     if ((bool)ConfigManager.GetValue("cache.catalog.enabled"))
     {
         responseCacheController_0 = new ResponseCacheController((int)ConfigManager.GetValue("cache.catalog.lifetime"), (uint)((int)ConfigManager.GetValue("cache.catalog.maximaldata")));
     }
     DataRouter.RegisterHandler(FlagcodesIn.CATALOG, ItemcodesIn.CATALOG_LOAD_ITEMS, new ProcessRequestCallback(CatalogManager.OnLoadCatalogRequest), false);
     DataRouter.RegisterHandler(FlagcodesIn.CATALOG, ItemcodesIn.CATALOG_LOAD_CONFIRMATION, new ProcessRequestCallback(CatalogManager.OnLoadSuccessRequest), false);
     RefreshCatalogData(MySqlClient, false);
 }
Ejemplo n.º 23
0
        public static void Initialize()
        {
            mSongCache  = new Dictionary <uint, SongData>();
            mCacheTimer = new Dictionary <uint, double>();
            mSyncRoot   = new object();

            mCacheMonitor = new Timer(new TimerCallback(ProcessThread), null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5));

            DataRouter.RegisterHandler(OpcodesIn.GET_MUSIC_DATA, new ProcessRequestCallback(GetSongData));
            DataRouter.RegisterHandler(OpcodesIn.JUKEBOX_PLAYLIST_ADD, new ProcessRequestCallback(AddToPlaylist));
            DataRouter.RegisterHandler(OpcodesIn.JUKEBOX_PLAYLIST_REMOVE, new ProcessRequestCallback(RemoveFromPlaylist));
            DataRouter.RegisterHandler(OpcodesIn.JUKEBOX_GET_DISKS, new ProcessRequestCallback(GetDisks));
            DataRouter.RegisterHandler(OpcodesIn.JUKEBOX_GET_PLAYLIST, new ProcessRequestCallback(GetPlaylist));
        }
Ejemplo n.º 24
0
 public static void Initialize()
 {
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_GET_ROOM_INFO, new ProcessRequestCallback(GetRoomInfo));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_GET_USER_INFO, new ProcessRequestCallback(GetUserInfo));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_ROOM_ACTION, new ProcessRequestCallback(PerformRoomAction));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_ALERT_ROOM, new ProcessRequestCallback(AlertRoom));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_GET_USER_VISITS, new ProcessRequestCallback(GetVisits));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_GET_ROOM_CHATLOG, new ProcessRequestCallback(GetRoomChatlog));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_GET_USER_CHATLOG, new ProcessRequestCallback(GetUserChatlog));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_GET_TICKET_CHATLOG, new ProcessRequestCallback(GetTicketChatlog));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_USER_MESSAGE, new ProcessRequestCallback(MessageUser));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_USER_CAUTION, new ProcessRequestCallback(CautionUser));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_KICK, new ProcessRequestCallback(KickUser));
     DataRouter.RegisterHandler(OpcodesIn.MODERATION_BAN, new ProcessRequestCallback(BanUser));
 }
Ejemplo n.º 25
0
        public static void Initialize()
        {
            DataRouter.RegisterHandler(OpcodesIn.SESSION_PONG, new ProcessRequestCallback(OnSessionPong), true);
            DataRouter.RegisterHandler(OpcodesIn.SESSION_USER_AGENT_INFORMATION, new ProcessRequestCallback(OnUserAgent), true);
            DataRouter.RegisterHandler(OpcodesIn.SESSION_LATENCY_TEST, new ProcessRequestCallback(OnSessionLatencyTest), true);
            DataRouter.RegisterHandler(OpcodesIn.SESSION_DEBUG_EVENT, new ProcessRequestCallback(OnDebugEvent), true);
            DataRouter.RegisterHandler(OpcodesIn.SESSION_CLIENT_CONFIGURATION, new ProcessRequestCallback(OnClientConfig));
            DataRouter.RegisterHandler(OpcodesIn.SESSION_DISCONNECT_EVENT, new ProcessRequestCallback(OnClientDisconnectNotification), true);

            // com.sulake.habbo.communication.messages.outgoing.sound.GetSoundSettingsComposer;
            // this is used for the sound settings, you need to return the volume settings via this request!
            DataRouter.RegisterHandler(228, new ProcessRequestCallback(OnGetSoundSettings));

            // com.sulake.habbo.communication.messages.outgoing.users.GetMOTDMessageComposer;
            // this is the call used to "display" the MOTD. Should be responded via this request.
            DataRouter.RegisterHandler(3110, new ProcessRequestCallback(OnGetMotdMessage));
        }
Ejemplo n.º 26
0
        public static void Initialize()
        {
            mSongCache  = new Dictionary <uint, SongData>();
            mCacheTimer = new Dictionary <uint, double>();
            mSyncRoot   = new object();

            mCacheMonitorThread          = new Thread(new ThreadStart(ProcessThread));
            mCacheMonitorThread.Priority = ThreadPriority.Lowest;
            mCacheMonitorThread.Name     = "SongCacheManager";
            mCacheMonitorThread.Start();

            DataRouter.RegisterHandler(OpcodesIn.GET_MUSIC_DATA, new ProcessRequestCallback(GetSongData));
            DataRouter.RegisterHandler(OpcodesIn.JUKEBOX_PLAYLIST_ADD, new ProcessRequestCallback(AddToPlaylist));
            DataRouter.RegisterHandler(OpcodesIn.JUKEBOX_PLAYLIST_REMOVE, new ProcessRequestCallback(RemoveFromPlaylist));
            DataRouter.RegisterHandler(OpcodesIn.JUKEBOX_GET_DISKS, new ProcessRequestCallback(GetDisks));
            DataRouter.RegisterHandler(OpcodesIn.JUKEBOX_GET_PLAYLIST, new ProcessRequestCallback(GetPlaylist));
        }
Ejemplo n.º 27
0
        public static void Initialize()
        {
            DataRouter.RegisterHandler(OpcodesIn.USER_INVENTORY_OBJECTS, new ProcessRequestCallback(GetObjectInventory));
            DataRouter.RegisterHandler(OpcodesIn.USER_INVENTORY_PETS, new ProcessRequestCallback(GetPetInventory));
            DataRouter.RegisterHandler(OpcodesIn.USER_INVENTORY_BADGES, new ProcessRequestCallback(GetBadgeInventory));

            DataRouter.RegisterHandler(OpcodesIn.USER_SET_BADGES, new ProcessRequestCallback(SetBadgeOrder));
            DataRouter.RegisterHandler(OpcodesIn.USER_CHANGE_LOOK, new ProcessRequestCallback(SetFigure));
            DataRouter.RegisterHandler(OpcodesIn.USER_CHANGE_MOTTO, new ProcessRequestCallback(SetMotto));

            DataRouter.RegisterHandler(OpcodesIn.USER_WARDROBE_GET, new ProcessRequestCallback(GetWardrobe));
            DataRouter.RegisterHandler(OpcodesIn.USER_WARDROBE_SAVE, new ProcessRequestCallback(SetWardrobe));

            DataRouter.RegisterHandler(OpcodesIn.USER_INVENTORY_MARK_TAB_READ, new ProcessRequestCallback(MarkTabRead));

            DataRouter.RegisterHandler(OpcodesIn.USER_EFFECT_APPLY, new ProcessRequestCallback(ApplyEffect));
            DataRouter.RegisterHandler(OpcodesIn.USER_EFFECT_ACTIVATE, new ProcessRequestCallback(ActivateEffect));
        }
Ejemplo n.º 28
0
        public static void Initialize()
        {
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_INIT, new ProcessRequestCallback(OnMessengerInit));
            // com.sulake.habbo.communication.messages.outgoing.friendlist.GetBuddyRequestsMessageComposer;
            // get buddy requests packet this is used for the messenger so it needs to be implemented properly
            DataRouter.RegisterHandler(233, new ProcessRequestCallback(OnGetPendingBuddyRequests));
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_SEARCH, new ProcessRequestCallback(OnMessengerSearch));
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_SEND_IM, new ProcessRequestCallback(OnSendIm));
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_FRIEND_REQUEST, new ProcessRequestCallback(OnFriendRequest));
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_FRIEND_ACCEPT, new ProcessRequestCallback(OnFriendRequestAccept));
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_FRIEND_DECLINE, new ProcessRequestCallback(OnFriendRequestDecline));
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_REMOVE_BUDDY, new ProcessRequestCallback(OnFriendRemove));
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_UPDATE, new ProcessRequestCallback(OnMessengerUpdate));
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_FOLLOW_BUDDY, new ProcessRequestCallback(OnFollowBuddy));
            DataRouter.RegisterHandler(OpcodesIn.MESSENGER_SEND_IM_INVITE, new ProcessRequestCallback(OnInvite));

            // new friends stream, needs to be coded & added to Opcodes
            DataRouter.RegisterHandler(500, new ProcessRequestCallback(GetEventStream));
            DataRouter.RegisterHandler(501, new ProcessRequestCallback(GetEventStreamAllowed));
        }
Ejemplo n.º 29
0
        private static void QueueProcessorStart(Queue <Package> queue, object syncLock)
        {
            try
            {
                List <byte[]> packageBinaryList = new List <byte[]>();

                System.Timers.Timer         timer = new System.Timers.Timer();
                TaskCompletionSource <bool> tcs   = new TaskCompletionSource <bool>();
                timer.Interval  = 200;
                timer.AutoReset = true;
                timer.Elapsed  += (obj, args) =>
                {
                    Package package = null;

                    lock (syncLock)
                    {
                        if (queue.Any())
                        {
                            package = queue.Dequeue();
                        }
                    }

                    if (package != null)
                    {
                        //PackageManager.PackageManager pm = new PackageManager.PackageManager(new JsonNet(), new GZipStreamCompression());
                        //byte[] packageBinary = pm.ToBinaryFormat(package);
                        //packageBinaryList.Add(packageBinary);

                        DataRouter.Route(package);
                    }

                    tcs.TrySetResult(true);
                };

                timer.Start();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 30
0
        public static void Initialize()
        {
            DataRouter.RegisterHandler(OpcodesIn.ROOM_ITEM_PLACE, new ProcessRequestCallback(PlaceItem));
            DataRouter.RegisterHandler(OpcodesIn.ROOM_ITEM_PLACE_STICKY, new ProcessRequestCallback(PlaceItem));
            DataRouter.RegisterHandler(OpcodesIn.ROOM_ITEM_TAKE, new ProcessRequestCallback(TakeItem));
            DataRouter.RegisterHandler(OpcodesIn.ROOM_MOVE_FLOOR_ITEM, new ProcessRequestCallback(MoveFloorItem));
            DataRouter.RegisterHandler(OpcodesIn.ROOM_MOVE_WALL_ITEM, new ProcessRequestCallback(MoveWallItem));

            DataRouter.RegisterHandler(OpcodesIn.OPEN_STICKY, new ProcessRequestCallback(OpenSticky));
            DataRouter.RegisterHandler(OpcodesIn.SAVE_STICKY, new ProcessRequestCallback(SaveSticky));
            DataRouter.RegisterHandler(OpcodesIn.DELETE_STICKY, new ProcessRequestCallback(DeleteSticky));

            DataRouter.RegisterHandler(OpcodesIn.MOODLIGHT_INFO, new ProcessRequestCallback(GetMoodlightInfo));
            DataRouter.RegisterHandler(OpcodesIn.MOODLIGHT_SWITCH, new ProcessRequestCallback(SwitchMoodlight));
            DataRouter.RegisterHandler(OpcodesIn.MOODLIGHT_UPDATE, new ProcessRequestCallback(UpdateMoodlight));

            DataRouter.RegisterHandler(OpcodesIn.PLACE_PET, new ProcessRequestCallback(PlacePet));
            DataRouter.RegisterHandler(OpcodesIn.PETS_GET_INFO, new ProcessRequestCallback(GetPetInfo));
            DataRouter.RegisterHandler(OpcodesIn.PET_TAKE, new ProcessRequestCallback(TakePet));
            DataRouter.RegisterHandler(OpcodesIn.PET_RESPECT, new ProcessRequestCallback(RespectPet));
        }