Package l2p.gameserver.clientpackets

Source Code of l2p.gameserver.clientpackets.RequestPledgeMemberInfo

package l2p.gameserver.clientpackets;

import l2p.Config;
import l2p.gameserver.model.L2Clan;
import l2p.gameserver.model.L2ClanMember;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.serverpackets.PledgeReceiveMemberInfo;

public class RequestPledgeMemberInfo extends L2GameClientPacket
{
  // format: (ch)dS
  @SuppressWarnings("unused")
  private int _pledgeType;
  private String _target;

  @Override
  public void readImpl()
  {
    _pledgeType = readD();
    _target = readS(Config.CNAME_MAXLEN);
  }

  @Override
  public void runImpl()
  {
    L2Player activeChar = getClient().getActiveChar();
    if(activeChar == null)
    {
      return;
    }
    L2Clan clan = activeChar.getClan();
    if(clan != null)
    {
      L2ClanMember cm = clan.getClanMember(_target);
      if(cm != null)
      {
        activeChar.sendPacket(new PledgeReceiveMemberInfo(cm));
      }
    }
  }
}
TOP

Related Classes of l2p.gameserver.clientpackets.RequestPledgeMemberInfo

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.