123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- /*
- * Copyright (C) 2004-2015 L2J Server
- *
- * This file is part of L2J Server.
- *
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- package com.l2jserver.gameserver.util;
- import com.l2jserver.Config;
- import com.l2jserver.gameserver.network.L2GameClient;
- /**
- * Collection of flood protectors for single player.
- * @author fordfrog
- */
- public final class FloodProtectors
- {
- /**
- * Use-item flood protector.
- */
- private final FloodProtectorAction _useItem;
- /**
- * Roll-dice flood protector.
- */
- private final FloodProtectorAction _rollDice;
- /**
- * Firework flood protector.
- */
- private final FloodProtectorAction _firework;
- /**
- * Item-pet-summon flood protector.
- */
- private final FloodProtectorAction _itemPetSummon;
- /**
- * Hero-voice flood protector.
- */
- private final FloodProtectorAction _heroVoice;
- /**
- * Global-chat flood protector.
- */
- private final FloodProtectorAction _globalChat;
- /**
- * Subclass flood protector.
- */
- private final FloodProtectorAction _subclass;
- /**
- * Drop-item flood protector.
- */
- private final FloodProtectorAction _dropItem;
- /**
- * Server-bypass flood protector.
- */
- private final FloodProtectorAction _serverBypass;
- /**
- * Multisell flood protector.
- */
- private final FloodProtectorAction _multiSell;
- /**
- * Transaction flood protector.
- */
- private final FloodProtectorAction _transaction;
- /**
- * Manufacture flood protector.
- */
- private final FloodProtectorAction _manufacture;
- /**
- * Manor flood protector.
- */
- private final FloodProtectorAction _manor;
- /**
- * Send mail flood protector.
- */
- private final FloodProtectorAction _sendMail;
- /**
- * Character Select protector
- */
- private final FloodProtectorAction _characterSelect;
- /**
- * Item Auction
- */
- private final FloodProtectorAction _itemAuction;
-
- /**
- * Creates new instance of FloodProtectors.
- * @param client game client for which the collection of flood protectors is being created.
- */
- public FloodProtectors(final L2GameClient client)
- {
- super();
- _useItem = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_USE_ITEM);
- _rollDice = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_ROLL_DICE);
- _firework = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_FIREWORK);
- _itemPetSummon = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_ITEM_PET_SUMMON);
- _heroVoice = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_HERO_VOICE);
- _globalChat = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_GLOBAL_CHAT);
- _subclass = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_SUBCLASS);
- _dropItem = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_DROP_ITEM);
- _serverBypass = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_SERVER_BYPASS);
- _multiSell = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_MULTISELL);
- _transaction = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_TRANSACTION);
- _manufacture = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_MANUFACTURE);
- _manor = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_MANOR);
- _sendMail = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_SENDMAIL);
- _characterSelect = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_CHARACTER_SELECT);
- _itemAuction = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_ITEM_AUCTION);
- }
-
- /**
- * Returns {@link #_useItem}.
- * @return {@link #_useItem}
- */
- public FloodProtectorAction getUseItem()
- {
- return _useItem;
- }
-
- /**
- * Returns {@link #_rollDice}.
- * @return {@link #_rollDice}
- */
- public FloodProtectorAction getRollDice()
- {
- return _rollDice;
- }
-
- /**
- * Returns {@link #_firework}.
- * @return {@link #_firework}
- */
- public FloodProtectorAction getFirework()
- {
- return _firework;
- }
-
- /**
- * Returns {@link #_itemPetSummon}.
- * @return {@link #_itemPetSummon}
- */
- public FloodProtectorAction getItemPetSummon()
- {
- return _itemPetSummon;
- }
-
- /**
- * Returns {@link #_heroVoice}.
- * @return {@link #_heroVoice}
- */
- public FloodProtectorAction getHeroVoice()
- {
- return _heroVoice;
- }
-
- /**
- * Returns {@link #_globalChat}.
- * @return {@link #_globalChat}
- */
- public FloodProtectorAction getGlobalChat()
- {
- return _globalChat;
- }
-
- /**
- * Returns {@link #_subclass}.
- * @return {@link #_subclass}
- */
- public FloodProtectorAction getSubclass()
- {
- return _subclass;
- }
-
- /**
- * Returns {@link #_dropItem}.
- * @return {@link #_dropItem}
- */
- public FloodProtectorAction getDropItem()
- {
- return _dropItem;
- }
-
- /**
- * Returns {@link #_serverBypass}.
- * @return {@link #_serverBypass}
- */
- public FloodProtectorAction getServerBypass()
- {
- return _serverBypass;
- }
-
- /**
- * @return {@link #_multiSell}
- */
- public FloodProtectorAction getMultiSell()
- {
- return _multiSell;
- }
-
- /**
- * Returns {@link #_transaction}.
- * @return {@link #_transaction}
- */
- public FloodProtectorAction getTransaction()
- {
- return _transaction;
- }
-
- /**
- * Returns {@link #_manufacture}.
- * @return {@link #_manufacture}
- */
- public FloodProtectorAction getManufacture()
- {
- return _manufacture;
- }
-
- /**
- * Returns {@link #_manor}.
- * @return {@link #_manor}
- */
- public FloodProtectorAction getManor()
- {
- return _manor;
- }
-
- /**
- * Returns {@link #_sendMail}.
- * @return {@link #_sendMail}
- */
- public FloodProtectorAction getSendMail()
- {
- return _sendMail;
- }
-
- /**
- * Returns {@link #_characterSelect}.
- * @return {@link #_characterSelect}
- */
- public FloodProtectorAction getCharacterSelect()
- {
- return _characterSelect;
- }
-
- /**
- * Returns {@link #_itemAuction}.
- * @return {@link #_itemAuction}
- */
- public FloodProtectorAction getItemAuction()
- {
- return _itemAuction;
- }
- }
|