Advertisement
brounlimited

L2ZonePvpZone.java

Dec 25th, 2014
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. /*
  2.  
  3. * This program is free software: you can redistribute it and/or modify it under
  4.  
  5. * the terms of the GNU General Public License as published by the Free Software
  6.  
  7. * Foundation, either version 3 of the License, or (at your option) any later
  8.  
  9. * version.
  10.  
  11. *
  12.  
  13. * This program is distributed in the hope that it will be useful, but WITHOUT
  14.  
  15. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16.  
  17. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  18.  
  19. * details.
  20.  
  21. *
  22.  
  23. * You should have received a copy of the GNU General Public License along with
  24.  
  25. * this program. If not, see <http://www.gnu.org/licenses/>.
  26.  
  27. */
  28.  
  29. package net.sf.l2j.gameserver.model.zone.type;
  30.  
  31.  
  32.  
  33. import net.sf.l2j.gameserver.model.actor.L2Character;
  34.  
  35. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  36.  
  37. import net.sf.l2j.gameserver.model.zone.L2SpawnZone;
  38.  
  39. import net.sf.l2j.gameserver.model.zone.ZoneId;
  40.  
  41. import net.sf.l2j.gameserver.network.SystemMessageId;
  42.  
  43.  
  44.  
  45. /**
  46.  
  47. * An arena
  48.  
  49. * @author durgus
  50.  
  51. */
  52.  
  53. public class L2ZonePvpZone extends L2SpawnZone
  54.  
  55. {
  56.  
  57. public L2ZonePvpZone(int id)
  58.  
  59. {
  60.  
  61. super(id);
  62.  
  63. }
  64.  
  65.  
  66.  
  67. @Override
  68.  
  69. protected void onEnter(L2Character character)
  70.  
  71. {
  72.  
  73. if (character instanceof L2PcInstance)
  74.  
  75. {
  76.  
  77. ((L2PcInstance) character).sendMessage("You are now inside the Player of the Hour Zone.");
  78.  
  79. }
  80.  
  81.  
  82.  
  83. character.setInsideZone(ZoneId.ZONE_PVP, true);
  84.  
  85. character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
  86.  
  87. }
  88.  
  89.  
  90.  
  91. @Override
  92.  
  93. protected void onExit(L2Character character)
  94.  
  95. {
  96.  
  97. character.setInsideZone(ZoneId.ZONE_PVP, false);
  98.  
  99. character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
  100.  
  101.  
  102.  
  103. if (character instanceof L2PcInstance)
  104.  
  105. {
  106.  
  107. ((L2PcInstance) character).sendMessage("You are no longer inside the Player of the Hour Zone.");
  108.  
  109. }
  110.  
  111. }
  112.  
  113.  
  114.  
  115. @Override
  116.  
  117. public void onDieInside(L2Character character)
  118.  
  119. {
  120.  
  121. }
  122.  
  123.  
  124.  
  125. @Override
  126.  
  127. public void onReviveInside(L2Character character)
  128.  
  129. {
  130.  
  131. }
  132.  
  133. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement