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)); }
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); }
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); }
public static void Initialize(SqlDatabaseClient MySqlClient) { mPages = new Dictionary <int, CatalogPage>(); mCatalogItems = new Dictionary <int, List <CatalogItem> >(); mCatalogItemsIdIndex = new Dictionary <uint, CatalogItem>(); mCatalogItemsNameIndex = new Dictionary <string, CatalogItem>(); mClubOffers = new Dictionary <uint, CatalogClubOffer>(); if ((bool)ConfigManager.GetValue("cache.catalog.enabled")) { mCacheController = new ResponseCacheController((int)ConfigManager.GetValue("cache.catalog.lifetime")); } RefreshCatalogData(MySqlClient, false); DataRouter.RegisterHandler(OpcodesIn.CATALOG_GET_INDEX, new ProcessRequestCallback(GetCatalogIndex)); DataRouter.RegisterHandler(OpcodesIn.CATALOG_GET_PAGE, new ProcessRequestCallback(GetCatalogPage)); DataRouter.RegisterHandler(OpcodesIn.CATALOG_GET_CLUB_OFFERS, new ProcessRequestCallback(GetClubOffers)); DataRouter.RegisterHandler(OpcodesIn.CATALOG_REDEEM_VOUCHER, new ProcessRequestCallback(RedeemVoucher)); DataRouter.RegisterHandler(OpcodesIn.CATALOG_GET_PET_DATA, new ProcessRequestCallback(GetPetData)); DataRouter.RegisterHandler(OpcodesIn.CATALOG_VERIFY_PET_NAME, new ProcessRequestCallback(CheckPetName)); }