Check if player has a clan before joining one.
This commit is contained in:
@ -81,12 +81,17 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
// we must double check this cause during response time conditions can be changed, i.e. another player could join clan
|
||||
if (clan.checkClanJoinCondition(requestor, activeChar, requestPacket.getPledgeType()))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // adademy
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
}
|
||||
else
|
||||
|
@ -60,7 +60,7 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
||||
if (_acceptRequest)
|
||||
{
|
||||
final L2PcInstance player = L2World.getInstance().getPlayer(_playerId);
|
||||
if (player != null)
|
||||
if ((player != null) && (player.getClan() == null))
|
||||
{
|
||||
final L2Clan clan = activeChar.getClan();
|
||||
clan.addClanMember(player);
|
||||
|
Reference in New Issue
Block a user