Package l2p.gameserver.clientpackets

Source Code of l2p.gameserver.clientpackets.RequestExRejectPost

package l2p.gameserver.clientpackets;

import l2p.Config;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.MailParcelController;
import l2p.gameserver.serverpackets.ExReplyReceivedPost;
import l2p.gameserver.serverpackets.ExShowReceivedPostList;

/**
* Шлется клиентом как запрос на отказ принять письмо из {@link ExReplyReceivedPost}. Если к письму приложены вещи то их надо вернуть отправителю.
*/
public class RequestExRejectPost extends L2GameClientPacket
{
  private int postId;

  @Override
  public void readImpl()
  {
    postId = readD();
  }

  @Override
  public void runImpl()
  {
    if(!Config.MailAllow)
    {
      return;
    }
    L2Player cha = getClient().getActiveChar();
    if(cha == null)
    {
      return;
    }
    MailParcelController.getInstance().returnLetter(postId);
    cha.sendPacket(new ExShowReceivedPostList(cha));
  }
}
TOP

Related Classes of l2p.gameserver.clientpackets.RequestExRejectPost

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.