Advertisement
Guest User

PVP-Flag-Zone-for-L2JLisvus-C4_100%_com_time_(1)

a guest
Nov 13th, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P Lisvus_GameServer
  3. Index: java/net/sf/l2j/gameserver/model/zone/type/L2FlagZone.java
  4. ===================================================================
  5. --- java/net/sf/l2j/gameserver/model/zone/type/L2FlagZone.java (nonexistent)
  6. +++ java/net/sf/l2j/gameserver/model/zone/type/L2FlagZone.java (working copy)
  7. @@ -0,0 +1,60 @@
  8. +/*
  9. + * This program is free software: you can redistribute it and/or modify it under
  10. + * the terms of the GNU General Public License as published by the Free Software
  11. + * Foundation, either version 3 of the License, or (at your option) any later
  12. + * version.
  13. + *
  14. + * This program is distributed in the hope that it will be useful, but WITHOUT
  15. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  17. + * details.
  18. + *
  19. + * You should have received a copy of the GNU General Public License along with
  20. + * this program. If not, see <http://www.gnu.org/licenses/>.
  21. + */
  22. +/** * PvP Flag Zone * @author JMD */
  23. +package net.sf.l2j.gameserver.model.zone.type;
  24. +
  25. +import net.sf.l2j.gameserver.model.L2Character;
  26. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  27. +import net.sf.l2j.gameserver.model.zone.L2ZoneSpawn;
  28. +
  29. +public class L2FlagZone extends L2ZoneSpawn
  30. +{
  31. + public L2FlagZone(int id)
  32. + {
  33. + super(id);
  34. + }
  35. +
  36. + @Override
  37. + protected void onEnter(L2Character character)
  38. + {
  39. + if (character instanceof L2PcInstance)
  40. + {
  41. + ((L2PcInstance) character).updatePvPFlag(1);
  42. + ((L2PcInstance) character).sendMessage("You have entered a flag zone.");
  43. + ((L2PcInstance) character).broadcastUserInfo();
  44. + }
  45. + }
  46. +
  47. + @Override
  48. + protected void onExit(L2Character character)
  49. + {
  50. + if (character instanceof L2PcInstance)
  51. + {
  52. + ((L2PcInstance) character).updatetPvPFlag(0);
  53. + ((L2PcInstance) character).sendMessage("You have left a flag zone.");
  54. + ((L2PcInstance) character).broadcastUserInfo();
  55. + }
  56. + }
  57. +
  58. + public void onDieInside(L2Character character)
  59. + {
  60. + onEnter(character);
  61. + }
  62. +
  63. + public void onReviveInside(L2Character character)
  64. + {
  65. + onEnter(character);
  66. + }
  67. +}
  68. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement