FloodProtectors.java 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. /*
  2. * Copyright (C) 2004-2015 L2J Server
  3. *
  4. * This file is part of L2J Server.
  5. *
  6. * L2J Server is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J Server is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package com.l2jserver.gameserver.util;
  20. import com.l2jserver.Config;
  21. import com.l2jserver.gameserver.network.L2GameClient;
  22. /**
  23. * Collection of flood protectors for single player.
  24. * @author fordfrog
  25. */
  26. public final class FloodProtectors
  27. {
  28. /**
  29. * Use-item flood protector.
  30. */
  31. private final FloodProtectorAction _useItem;
  32. /**
  33. * Roll-dice flood protector.
  34. */
  35. private final FloodProtectorAction _rollDice;
  36. /**
  37. * Firework flood protector.
  38. */
  39. private final FloodProtectorAction _firework;
  40. /**
  41. * Item-pet-summon flood protector.
  42. */
  43. private final FloodProtectorAction _itemPetSummon;
  44. /**
  45. * Hero-voice flood protector.
  46. */
  47. private final FloodProtectorAction _heroVoice;
  48. /**
  49. * Global-chat flood protector.
  50. */
  51. private final FloodProtectorAction _globalChat;
  52. /**
  53. * Subclass flood protector.
  54. */
  55. private final FloodProtectorAction _subclass;
  56. /**
  57. * Drop-item flood protector.
  58. */
  59. private final FloodProtectorAction _dropItem;
  60. /**
  61. * Server-bypass flood protector.
  62. */
  63. private final FloodProtectorAction _serverBypass;
  64. /**
  65. * Multisell flood protector.
  66. */
  67. private final FloodProtectorAction _multiSell;
  68. /**
  69. * Transaction flood protector.
  70. */
  71. private final FloodProtectorAction _transaction;
  72. /**
  73. * Manufacture flood protector.
  74. */
  75. private final FloodProtectorAction _manufacture;
  76. /**
  77. * Manor flood protector.
  78. */
  79. private final FloodProtectorAction _manor;
  80. /**
  81. * Send mail flood protector.
  82. */
  83. private final FloodProtectorAction _sendMail;
  84. /**
  85. * Character Select protector
  86. */
  87. private final FloodProtectorAction _characterSelect;
  88. /**
  89. * Item Auction
  90. */
  91. private final FloodProtectorAction _itemAuction;
  92. /**
  93. * Creates new instance of FloodProtectors.
  94. * @param client game client for which the collection of flood protectors is being created.
  95. */
  96. public FloodProtectors(final L2GameClient client)
  97. {
  98. super();
  99. _useItem = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_USE_ITEM);
  100. _rollDice = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_ROLL_DICE);
  101. _firework = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_FIREWORK);
  102. _itemPetSummon = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_ITEM_PET_SUMMON);
  103. _heroVoice = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_HERO_VOICE);
  104. _globalChat = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_GLOBAL_CHAT);
  105. _subclass = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_SUBCLASS);
  106. _dropItem = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_DROP_ITEM);
  107. _serverBypass = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_SERVER_BYPASS);
  108. _multiSell = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_MULTISELL);
  109. _transaction = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_TRANSACTION);
  110. _manufacture = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_MANUFACTURE);
  111. _manor = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_MANOR);
  112. _sendMail = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_SENDMAIL);
  113. _characterSelect = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_CHARACTER_SELECT);
  114. _itemAuction = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_ITEM_AUCTION);
  115. }
  116. /**
  117. * Returns {@link #_useItem}.
  118. * @return {@link #_useItem}
  119. */
  120. public FloodProtectorAction getUseItem()
  121. {
  122. return _useItem;
  123. }
  124. /**
  125. * Returns {@link #_rollDice}.
  126. * @return {@link #_rollDice}
  127. */
  128. public FloodProtectorAction getRollDice()
  129. {
  130. return _rollDice;
  131. }
  132. /**
  133. * Returns {@link #_firework}.
  134. * @return {@link #_firework}
  135. */
  136. public FloodProtectorAction getFirework()
  137. {
  138. return _firework;
  139. }
  140. /**
  141. * Returns {@link #_itemPetSummon}.
  142. * @return {@link #_itemPetSummon}
  143. */
  144. public FloodProtectorAction getItemPetSummon()
  145. {
  146. return _itemPetSummon;
  147. }
  148. /**
  149. * Returns {@link #_heroVoice}.
  150. * @return {@link #_heroVoice}
  151. */
  152. public FloodProtectorAction getHeroVoice()
  153. {
  154. return _heroVoice;
  155. }
  156. /**
  157. * Returns {@link #_globalChat}.
  158. * @return {@link #_globalChat}
  159. */
  160. public FloodProtectorAction getGlobalChat()
  161. {
  162. return _globalChat;
  163. }
  164. /**
  165. * Returns {@link #_subclass}.
  166. * @return {@link #_subclass}
  167. */
  168. public FloodProtectorAction getSubclass()
  169. {
  170. return _subclass;
  171. }
  172. /**
  173. * Returns {@link #_dropItem}.
  174. * @return {@link #_dropItem}
  175. */
  176. public FloodProtectorAction getDropItem()
  177. {
  178. return _dropItem;
  179. }
  180. /**
  181. * Returns {@link #_serverBypass}.
  182. * @return {@link #_serverBypass}
  183. */
  184. public FloodProtectorAction getServerBypass()
  185. {
  186. return _serverBypass;
  187. }
  188. /**
  189. * @return {@link #_multiSell}
  190. */
  191. public FloodProtectorAction getMultiSell()
  192. {
  193. return _multiSell;
  194. }
  195. /**
  196. * Returns {@link #_transaction}.
  197. * @return {@link #_transaction}
  198. */
  199. public FloodProtectorAction getTransaction()
  200. {
  201. return _transaction;
  202. }
  203. /**
  204. * Returns {@link #_manufacture}.
  205. * @return {@link #_manufacture}
  206. */
  207. public FloodProtectorAction getManufacture()
  208. {
  209. return _manufacture;
  210. }
  211. /**
  212. * Returns {@link #_manor}.
  213. * @return {@link #_manor}
  214. */
  215. public FloodProtectorAction getManor()
  216. {
  217. return _manor;
  218. }
  219. /**
  220. * Returns {@link #_sendMail}.
  221. * @return {@link #_sendMail}
  222. */
  223. public FloodProtectorAction getSendMail()
  224. {
  225. return _sendMail;
  226. }
  227. /**
  228. * Returns {@link #_characterSelect}.
  229. * @return {@link #_characterSelect}
  230. */
  231. public FloodProtectorAction getCharacterSelect()
  232. {
  233. return _characterSelect;
  234. }
  235. /**
  236. * Returns {@link #_itemAuction}.
  237. * @return {@link #_itemAuction}
  238. */
  239. public FloodProtectorAction getItemAuction()
  240. {
  241. return _itemAuction;
  242. }
  243. }