FloodProtectors.java 6.4 KB

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