ExSpawnEmitter.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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.network.serverpackets;
  16. import com.l2jserver.gameserver.model.actor.L2Npc;
  17. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  18. /**
  19. *
  20. * @author KenM
  21. */
  22. public class ExSpawnEmitter extends L2GameServerPacket
  23. {
  24. private final int _playerObjectId;
  25. private final int _npcObjectId;
  26. public ExSpawnEmitter(int playerObjectId, int npcObjectId)
  27. {
  28. _playerObjectId = playerObjectId;
  29. _npcObjectId = npcObjectId;
  30. }
  31. public ExSpawnEmitter(L2PcInstance player, L2Npc npc)
  32. {
  33. this(player.getObjectId(), npc.getObjectId());
  34. }
  35. /**
  36. * @see com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket#getType()
  37. */
  38. @Override
  39. public String getType()
  40. {
  41. return "[S] FE:5D ExSpawnEmitter";
  42. }
  43. /**
  44. * @see com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket#writeImpl()
  45. */
  46. @Override
  47. protected void writeImpl()
  48. {
  49. writeC(0xfe);
  50. writeH(0x5d);
  51. writeD(_npcObjectId);
  52. writeD(_playerObjectId);
  53. writeD(0x00); // ?
  54. }
  55. }