SetPrivateStoreWholeMsg.java 1.7 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.clientpackets;
  16. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  17. import net.sf.l2j.gameserver.serverpackets.ExPrivateStoreSetWholeMsg;
  18. /**
  19. *
  20. * @author KenM
  21. */
  22. public class SetPrivateStoreWholeMsg extends L2GameClientPacket
  23. {
  24. private String _msg;
  25. /**
  26. * @see net.sf.l2j.gameserver.clientpackets.L2GameClientPacket#getType()
  27. */
  28. @Override
  29. public String getType()
  30. {
  31. return "[C] D0:4D SetPrivateStoreWholeMsg";
  32. }
  33. /**
  34. * @see net.sf.l2j.gameserver.clientpackets.L2GameClientPacket#readImpl()
  35. */
  36. @Override
  37. protected void readImpl()
  38. {
  39. _msg = readS();
  40. }
  41. /**
  42. * @see net.sf.l2j.gameserver.clientpackets.L2GameClientPacket#runImpl()
  43. */
  44. @Override
  45. protected void runImpl()
  46. {
  47. L2PcInstance player = getClient().getActiveChar();
  48. if (player == null || player.getSellList() == null) return;
  49. player.getSellList().setTitle(_msg);
  50. sendPacket(new ExPrivateStoreSetWholeMsg(player));
  51. }
  52. }