コード例 #1
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                StringBuilder List = new StringBuilder();
                List.Append("- LISTA DE COMANDOS STAFF -\n\n");
                List.Append(":update catalogue - Atualiza o catalogo.\n········································································\n");
                List.Append(":update items - Atualiza os items.\n········································································\n");
                List.Append(":update jukebox - Atualiza as musicas.\n········································································\n");
                List.Append(":update wordfilter - Atualiza o filtro do hotel.\n········································································\n");
                List.Append(":update models - Atualiza o filtro del hotel.\n········································································\n");
                List.Append(":update promotions - Atualiza as promoções.\n········································································\n");
                List.Append(":update halloffame - Atualiza pontos de fama.\n········································································\n");
                List.Append(":update youtube - Atualiza os videos TV's.\n········································································\n");
                List.Append(":update permissions - Atualiza as permissões de rank.\n········································································\n");
                List.Append(":update settings - Atualiza las configurações do hotel.\n········································································\n");
                List.Append(":update bans - Atualiza os banidos do hotel.\n········································································\n");
                List.Append(":update quests - Atualiza os Quests do hotel.\n········································································\n");
                List.Append(":update achievements - Atualiza is logs de usuarios.\n········································································\n");
                List.Append(":update bots - Atualiza os bots do hotel.\n········································································\n");
                List.Append(":update achievements - Atualiza os logros de usuarios.\n········································································\n");
                Session.SendMessage(new MOTDNotificationComposer(List.ToString()));
                return;
            }

            string UpdateVariable = Params[1];

            switch (UpdateVariable.ToLower())
            {
            case "cata":
            case "catalog":
            case "catalogue":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_catalog"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão  'command_update_catalog' permiso", "advice");
                    break;
                }

                CloudServer.GetGame().GetCatalog().Init(CloudServer.GetGame().GetItemManager());
                CloudServer.GetGame().GetClientManager().SendMessage(new CatalogUpdatedComposer());
                Session.LogsNotif("Catalogo actualizado correctamente", "catalogue");
                break;

            case "discos":
            case "songs":
            case "jukebox":
            case "canciones":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_songsdata"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_songsdata", "advice");
                    break;
                }
                int count = TraxSoundManager.Songs.Count;
                TraxSoundManager.Init();
                Session.LogsNotif("Música recarregadas com sucesso, diferença de comprimento: " + checked (count - TraxSoundManager.Songs.Count), "advice");
                break;

            case "wordfilter":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_filter"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_filter' permiso", "advice");
                    break;
                }

                CloudServer.GetGame().GetChatManager().GetFilter().InitWords();
                CloudServer.GetGame().GetChatManager().GetFilter().InitCharacters();
                Session.LogsNotif("Filtro atualizado corretamente", "advice");
                break;

            case "items":
            case "furni":
            case "furniture":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_furni"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_furni' permiso", "advice");
                    break;
                }

                CloudServer.GetGame().GetItemManager().Init();
                Session.LogsNotif("Items acualizados corretamente", "advice");
                break;

            case "models":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_models"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_models' permiso", "advice");
                    break;
                }

                CloudServer.GetGame().GetRoomManager().LoadModels();
                Session.LogsNotif("Salas atualizadas corretamente.", "advice");
                break;

            case "promotions":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_promotions"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_promotions' permiso.", "advice");
                    break;
                }

                CloudServer.GetGame().GetLandingManager().LoadPromotions();
                Session.LogsNotif("Promoçoes atualizadas corretamente.", "advice");
                break;

            case "halloffame":
            case "salondelafama":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_halloffame"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_halloffame' permiso.", "advice");
                    break;
                }

                GetHallOfFame.GetInstance().Load();
                Session.LogsNotif("Hall of Fame atualizado com sucesso.", "advice");
                break;

            case "youtube":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_youtube"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_youtube' permiso.", "advice");
                    break;
                }

                CloudServer.GetGame().GetTelevisionManager().Init();
                Session.LogsNotif("TV's atualizados.", "advice");
                break;

            case "navigator":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_navigator"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_navigator'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetNavigator().Init();
                Session.LogsNotif("Navegador de salas atualizado.", "advice");
                break;

            case "ranks":
            case "rights":
            case "permissions":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_rights"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_rights'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetPermissionManager().Init();

                foreach (GameClient Client in CloudServer.GetGame().GetClientManager().GetClients.ToList())
                {
                    if (Client == null || Client.GetHabbo() == null || Client.GetHabbo().GetPermissions() == null)
                    {
                        continue;
                    }

                    Client.GetHabbo().GetPermissions().Init(Client.GetHabbo());
                }

                Session.LogsNotif("Permissoes atualizadas.", "advice");
                break;

            case "pinatas":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_catalog"))
                {
                    Session.SendWhisper("Oops, Você não tem permissão para atualizar prêmios pinatas.");
                    break;
                }

                CloudServer.GetGame().GetPinataManager().Initialize(CloudServer.GetDatabaseManager().GetQueryReactor());
                CloudServer.GetGame().GetClientManager().SendMessage(RoomNotificationComposer.SendBubble("catalogue", "Premios Actualizados", ""));
                break;

            case "crafting":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_furni"))
                {
                    Session.SendWhisper("Oops, Você não tem permissão para atualizar .");
                    break;
                }

                CloudServer.GetGame().GetCraftingManager().Init();
                Session.SendWhisper("Crafting actualizado correctamente.");
                break;

            case "crackable":
            case "ecotron":
            case "pinata":
            case "piñata":
                CloudServer.GetGame().GetPinataManager().Initialize(CloudServer.GetDatabaseManager().GetQueryReactor());
                CloudServer.GetGame().GetFurniMaticRewardsMnager().Initialize(CloudServer.GetDatabaseManager().GetQueryReactor());
                CloudServer.GetGame().GetTargetedOffersManager().Initialize(CloudServer.GetDatabaseManager().GetQueryReactor());
                break;

            case "relampago":
            case "targeted":
            case "targetedoffers":
                CloudServer.GetGame().GetTargetedOffersManager().Initialize(CloudServer.GetDatabaseManager().GetQueryReactor());
                break;

            case "config":
            case "settings":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_configuration"))
                {
                    Session.LogsNotif("Ups,Você não tem permissão 'command_update_configuration'.", "advice");;
                    break;
                }

                CloudServer.GetGame().GetSettingsManager().Init();
                ExtraSettings.RunExtraSettings();
                CatalogSettings.RunCatalogSettings();
                NotificationSettings.RunNotiSettings();
                CloudServer.GetGame().GetTargetedOffersManager().Initialize(CloudServer.GetDatabaseManager().GetQueryReactor());
                Session.LogsNotif("Configuraçoes atualizadas.", "advice");
                break;

            case "bans":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bans"))
                {
                    Session.LogsNotif("Ups, Você não tem'command_update_bans' permiso.", "advice");
                    break;
                }

                CloudServer.GetGame().GetModerationManager().ReCacheBans();
                Session.LogsNotif("Cache Ban re-cargado.", "advice");
                break;

            case "quests":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_quests"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_quests' permiso.", "advice");
                    break;
                }

                CloudServer.GetGame().GetQuestManager().Init();
                Session.LogsNotif("Quests atualizadas.", "advice");
                break;

            case "achievements":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_achievements"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_achievements' permiso.", "advice");
                    break;
                }

                CloudServer.GetGame().GetAchievementManager().LoadAchievements();
                Session.LogsNotif("Achievements atualizados.", "advice");
                break;

            case "moderation":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_moderation"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_moderation' permiso.", "advice");;
                    break;
                }

                CloudServer.GetGame().GetModerationManager().Init();
                CloudServer.GetGame().GetClientManager().ModAlert("Presets de moderación se han actualizado.Por favor, vuelva a cargar el cliente para ver los nuevos presets.");

                Session.LogsNotif("Configurações dos moderadores atualizadas.", "advice");
                break;

            case "vouchers":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_vouchers"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão'command_update_vouchers.", "advice");
                    break;
                }

                CloudServer.GetGame().GetCatalog().GetVoucherManager().Init();
                Session.LogsNotif("O catálogo cache atualizado.", "advice");
                break;

            case "gc":
            case "games":
            case "gamecenter":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_game_center"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_game_center'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetGameDataManager().Init();
                Session.LogsNotif("Cache Game Center foi atualizado com sucesso.", "advice");
                break;

            case "pet_locale":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_pet_locale"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_pet_locale'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetChatManager().GetPetLocale().Init();
                CloudServer.GetGame().GetChatManager().GetPetCommands().Init();
                Session.LogsNotif("Cache local Animais atualizado.", "advice");
                break;

            case "locale":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_locale"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_locale'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetLanguageManager().Init();
                Session.LogsNotif("Locale caché acualizado corretamente.", "advice");
                break;

            case "mutant":

                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_anti_mutant"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_anti_mutant'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetFigureManager().Init();
                Session.LogsNotif("FigureData manager recarregado com sucesso!", "advice");
                break;

            case "bots":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bots"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_bots'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetBotManager().Init();
                Session.LogsNotif("Bots actualizados.", "advice");
                break;

            case "rewards":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_rewards"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_rewards'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetRewardManager().Reload();
                Session.LogsNotif("Gestor De Recompensas voltou a carregar com sucesso!", "advice");
                break;

            case "chat_styles":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_chat_styles"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_chat_styles'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetChatManager().GetChatStyles().Init();
                Session.LogsNotif("estilos de chat recarregado com sucesso!", "advice");
                break;

            case "definitions":
            case "badge_definitions":
                if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_badge_definitions"))
                {
                    Session.LogsNotif("Ups, Você não tem permissão 'command_update_badge_definitions'.", "advice");
                    break;
                }

                CloudServer.GetGame().GetBadgeManager().Init();
                Session.LogsNotif("Definições placas recarregado com sucesso!", "advice");
                break;

            default:
                Session.LogsNotif("'" + UpdateVariable + "' não é uma coisa válida para recarregar.", "advice");
                break;
            }
        }
コード例 #2
0
        public Game()
        {
            Console.WriteLine();
            log.Info("» Iniciando Dual Server Para " + CloudServer.HotelName + "...");
            Console.WriteLine();

            SessionUserRecord = 0;
            // Run Extra Settings
            // BotFrankConfig.RunBotFrank();
            ExtraSettings.RunExtraSettings();

            // Run Catalog Settings
            CatalogSettings.RunCatalogSettings();

            // Run Notification Settings
            NotificationSettings.RunNotiSettings();


            _languageManager = new LanguageManager();
            _languageManager.Init();

            _settingsManager = new SettingsManager();
            _settingsManager.Init();

            _packetManager = new PacketManager();
            _clientManager = new GameClientManager();

            _moderationManager = new ModerationManager();
            _moderationManager.Init();

            _itemDataManager = new ItemDataManager();
            _itemDataManager.Init();

            _catalogManager = new CatalogManager();
            _catalogManager.Init(_itemDataManager);

            _craftingManager = new CraftingManager();
            _craftingManager.Init();

            _televisionManager = new TelevisionManager();

            _navigatorManager = new NavigatorManager();
            _roomManager      = new RoomManager();
            _chatManager      = new ChatManager();
            _groupManager     = new GroupManager();
            _groupManager.Init();
            _groupForumManager  = new GroupForumManager();
            _questManager       = new QuestManager();
            _achievementManager = new AchievementManager();
            _talentManager      = new TalentManager();
            _talentManager.Initialize();
            _talentTrackManager = new TalentTrackManager();
            _landingViewManager = new LandingViewManager();
            _gameDataManager    = new GameDataManager();

            _botManager = new BotManager();

            _cacheManager  = new CacheManager();
            _rewardManager = new RewardManager();

            _badgeManager = new BadgeManager();
            _badgeManager.Init();

            GetHallOfFame.GetInstance().Load();

            _permissionManager = new PermissionManager();
            _permissionManager.Init();

            _subscriptionManager = new SubscriptionManager();
            _subscriptionManager.Init();

            TraxSoundManager.Init();
            HelperToolsManager.Init();

            _figureManager = new FigureDataManager(CloudServer.GetConfig().data["game.legacy.figure_mutant"].ToString() == "1");
            _figureManager.Init();

            _crackableManager = new CrackableManager();
            _crackableManager.Initialize(CloudServer.GetDatabaseManager().GetQueryReactor());

            _furniMaticRewardsManager = new FurniMaticRewardsManager();
            _furniMaticRewardsManager.Initialize(CloudServer.GetDatabaseManager().GetQueryReactor());

            _targetedoffersManager = new TargetedOffersManager();
            _targetedoffersManager.Initialize(CloudServer.GetDatabaseManager().GetQueryReactor());
        }
コード例 #3
0
ファイル: Game.cs プロジェクト: AlexanderM1927/NeonServer
        public Game()
        {
            GetHallOfFame.GetInstance().Load();
            _packetManager        = new PacketManager();
            _rentableSpaceManager = new RentableSpaceManager();
            _clientManager        = new GameClientManager();
            _modManager           = new ModerationManager();

            _itemDataManager = new ItemDataManager();
            _itemDataManager.Init();
            //this._cameraManager = new CameraPhotoManager();
            //this._cameraManager.Init(this._itemDataManager);
            _catalogManager = new CatalogManager();
            _catalogManager.Init(_itemDataManager);
            _frontpageManager = new FrontpageManager();

            _televisionManager = new TelevisionManager();
            _crackableManager  = new CrackableManager();
            _crackableManager.Initialize(NeonEnvironment.GetDatabaseManager().GetQueryReactor());
            _furniMaticRewardsManager = new FurniMaticRewardsManager();
            _furniMaticRewardsManager.Initialize(NeonEnvironment.GetDatabaseManager().GetQueryReactor());

            _craftingManager = new CraftingManager();
            _craftingManager.Init();

            _navigatorManager   = new NavigatorManager();
            _roomManager        = new RoomManager();
            _chatManager        = new ChatManager();
            _groupManager       = new GroupManager();
            _questManager       = new QuestManager();
            _achievementManager = new AchievementManager();
            _talentTrackManager = new TalentTrackManager();

            _landingViewManager = new LandingViewManager();
            _gameDataManager    = new GameDataManager();

            _globalUpdater = new ServerStatusUpdater();
            _globalUpdater.Init();

            _languageLocale = new LanguageLocale();
            _antiMutant     = new AntiMutant();
            _botManager     = new BotManager();

            _cacheManager  = new CacheManager();
            _rewardManager = new RewardManager();
            _musicManager  = new SongManager();

            _badgeManager = new BadgeManager();
            _badgeManager.Init();

            forummanager = new GroupForumManager();

            _communityGoalVS = new CommunityGoalVS();
            _communityGoalVS.LoadCommunityGoalVS();

            _permissionManager = new PermissionManager();
            _permissionManager.Init();

            _subscriptionManager = new SubscriptionManager();
            _subscriptionManager.Init();

            HelperToolsManager.Init();

            _calendarManager = new CalendarManager();
            _calendarManager.Init();

            _leaderBoardDataManager = new LeaderBoardDataManager();

            _targetedoffersManager = new TargetedOffersManager();
            _targetedoffersManager.Initialize(NeonEnvironment.GetDatabaseManager().GetQueryReactor());

            _nuxusergiftManager = new NuxUserGiftsManager();
            _nuxusergiftManager.Initialize(NeonEnvironment.GetDatabaseManager().GetQueryReactor());

            _nuxusergiftlistManager = new NuxUserGiftsListManager();
            _nuxusergiftlistManager.Initialize(NeonEnvironment.GetDatabaseManager().GetQueryReactor());

            _pollManager = new PollManager();
            _pollManager.Init();
            WebSocketManager.StartListener();
        }
コード例 #4
0
 public HallOfFameComposer() : base(ServerPacketHeader.UpdateHallOfFameListMessageComposer)
 {
     WriteString("halloffame.staff");
     GetHallOfFame.GetInstance().Serialize(this);
     return;
 }