Package l2p.gameserver.clientpackets

Source Code of l2p.gameserver.clientpackets.RequestPledgeInfo

package l2p.gameserver.clientpackets;

import l2p.gameserver.model.L2Clan;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.serverpackets.PledgeInfo;
import l2p.gameserver.tables.ClanTable;

public class RequestPledgeInfo extends L2GameClientPacket
{
  private int _clanId;

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

  @Override
  public void runImpl()
  {
    L2Player activeChar = getClient().getActiveChar();
    if(activeChar == null)
    {
      return;
    }
    if(_clanId < 10000000)
    {
      activeChar.sendActionFailed();
      return;
    }
    L2Clan clan = ClanTable.getInstance().getClan(_clanId);
    if(clan == null)
    {
      //Util.handleIllegalPlayerAction(activeChar, "RequestPledgeInfo[40]", "Clan data for clanId " + _clanId + " is missing", 1);
      //_log.warning("Host " + getClient().getIpAddr() + " possibly sends fake packets. activeChar: " + activeChar);
      activeChar.sendActionFailed();
      return;
    }
    activeChar.sendPacket(new PledgeInfo(clan));
  }
}
TOP

Related Classes of l2p.gameserver.clientpackets.RequestPledgeInfo

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.