Package l2p.gameserver.serverpackets

Source Code of l2p.gameserver.serverpackets.PledgeReceivePowerInfo

package l2p.gameserver.serverpackets;

import l2p.gameserver.model.L2Clan;
import l2p.gameserver.model.L2Clan.RankPrivs;
import l2p.gameserver.model.L2ClanMember;

public class PledgeReceivePowerInfo extends L2GameServerPacket
{
  private int PowerGrade, privs;
  private String member_name;

  public PledgeReceivePowerInfo(L2ClanMember member)
  {
    PowerGrade = member.getPowerGrade();
    member_name = member.getName();
    if(member.isClanLeader())
    {
      privs = L2Clan.CP_ALL;
    }
    else
    {
      RankPrivs temp = member.getClan().getRankPrivs(member.getPowerGrade());
      if(temp != null)
      {
        privs = temp.getPrivs();
      }
      else
      {
        privs = 0;
      }
    }
  }

  @Override
  protected final void writeImpl()
  {
    writeC(EXTENDED_PACKET);
    writeH(0x3d);
    writeD(PowerGrade);
    writeS(member_name);
    writeD(privs);
  }
}
TOP

Related Classes of l2p.gameserver.serverpackets.PledgeReceivePowerInfo

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.