ExShowTrace.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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.network.serverpackets;
  20. import java.util.ArrayList;
  21. import java.util.List;
  22. import com.l2jserver.gameserver.model.Location;
  23. import com.l2jserver.gameserver.model.interfaces.ILocational;
  24. /**
  25. * This packet shows the mouse click particle for 30 seconds on every location.
  26. * @author NosBit
  27. */
  28. public final class ExShowTrace extends L2GameServerPacket
  29. {
  30. private final List<Location> _locations = new ArrayList<>();
  31. public void addLocation(int x, int y, int z)
  32. {
  33. _locations.add(new Location(x, y, z));
  34. }
  35. public void addLocation(ILocational loc)
  36. {
  37. addLocation(loc.getX(), loc.getY(), loc.getZ());
  38. }
  39. @Override
  40. protected void writeImpl()
  41. {
  42. writeC(0xFE);
  43. writeH(0x67);
  44. writeH(0); // type broken in H5
  45. writeD(0); // time broken in H5
  46. writeH(_locations.size());
  47. for (Location loc : _locations)
  48. {
  49. writeD(loc.getX());
  50. writeD(loc.getY());
  51. writeD(loc.getZ());
  52. }
  53. }
  54. }