Additional checks for RequestPledgeSignInForOpenJoiningMethod.
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ClanLevelData;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.ClanEntryManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
@ -62,6 +63,26 @@ public class RequestPledgeSignInForOpenJoiningMethod implements IClientIncomingP
|
||||
final Clan clan = pledgeRecruitInfo.getClan();
|
||||
if ((clan != null) && (player.getClan() == null))
|
||||
{
|
||||
if (clan.getCharPenaltyExpiryTime() > System.currentTimeMillis())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.AFTER_A_CLAN_MEMBER_IS_DISMISSED_FROM_A_CLAN_THE_CLAN_MUST_WAIT_AT_LEAST_A_DAY_BEFORE_ACCEPTING_A_NEW_MEMBER);
|
||||
return;
|
||||
}
|
||||
if (player.getClanJoinExpiryTime() > System.currentTimeMillis())
|
||||
{
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||
sm.addString(player.getName());
|
||||
player.sendPacket(sm);
|
||||
return;
|
||||
}
|
||||
if (clan.getSubPledgeMembersCount(Clan.PLEDGE_CLASS_COMMON) >= ClanLevelData.getCommonMemberLimit(pledgeRecruitInfo.getClan().getLevel()))
|
||||
{
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.S1_IS_FULL_AND_CANNOT_ACCEPT_ADDITIONAL_CLAN_MEMBERS_AT_THIS_TIME);
|
||||
sm.addString(clan.getName());
|
||||
player.sendPacket(sm);
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new JoinPledge(clan.getId()));
|
||||
|
||||
// player.setPowerGrade(9); // academy
|
||||
|
Reference in New Issue
Block a user