ExSetCompassZoneCode.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 net.sf.l2j.gameserver.serverpackets;
  16. /**
  17. * Format: ch d
  18. * @author KenM
  19. */
  20. public class ExSetCompassZoneCode extends L2GameServerPacket
  21. {
  22. private static final String _S__FE_32_EXSETCOMPASSZONECODE = "[S] FE:33 ExSetCompassZoneCode";
  23. public static final int SIEGEWARZONE1 = 0x0A;
  24. public static final int SIEGEWARZONE2 = 0x0B;
  25. public static final int PEACEZONE = 0x0C;
  26. public static final int SEVENSIGNSZONE = 0x0D;
  27. public static final int PVPZONE = 0x0E;
  28. public static final int GENERALZONE = 0x0F;
  29. private int _zoneType;
  30. public ExSetCompassZoneCode(int val)
  31. {
  32. _zoneType = val;
  33. }
  34. /**
  35. * @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#writeImpl()
  36. */
  37. @Override
  38. protected void writeImpl()
  39. {
  40. writeC(0xFE);
  41. writeH(0x33);
  42. writeD(_zoneType);
  43. }
  44. /**
  45. * @see net.sf.l2j.gameserver.BasePacket#getType()
  46. */
  47. @Override
  48. public String getType()
  49. {
  50. return _S__FE_32_EXSETCOMPASSZONECODE;
  51. }
  52. }