Package l2p.gameserver.clientpackets

Source Code of l2p.gameserver.clientpackets.ConfirmDlg

package l2p.gameserver.clientpackets;

import l2p.Config;
import l2p.gameserver.model.L2Player;

public class ConfirmDlg extends L2GameClientPacket
{
  @SuppressWarnings("unused")
  private int _messageId, _answer, _requestId;

  @Override
  public void readImpl()
  {
    _messageId = readD();
    _answer = readD();
    _requestId = readD();
  }

  @Override
  public void runImpl()
  {
    L2Player activeChar = getClient().getActiveChar();
    if(activeChar == null)
    {
      return;
    }
    switch(_requestId)
    {
      case 1:
        activeChar.summonCharacterAnswer(_answer);
        break;
      case 2:
        activeChar.reviveAnswer(_answer);
        break;
      case 3:
        activeChar.scriptAnswer(_answer);
        break;
      case 4:
        if(Config.ALLOW_WEDDING && activeChar.isEngageRequest())
        {
          activeChar.engageAnswer(_answer);
        }
        break;
    }
  }
}
TOP

Related Classes of l2p.gameserver.clientpackets.ConfirmDlg

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.