Fixed RequestClanAskJoinByName not working.
This commit is contained in:
parent
35e51e1fb4
commit
9d6641922f
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
@ -71,15 +71,24 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge))
|
||||
if (!((requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge) || (requestor.getRequest().getRequestPacket() instanceof RequestClanAskJoinByName)))
|
||||
{
|
||||
return; // hax
|
||||
}
|
||||
|
||||
final RequestJoinPledge requestPacket = (RequestJoinPledge) requestor.getRequest().getRequestPacket();
|
||||
final int pledgeType;
|
||||
if (requestor.getRequest().getRequestPacket() instanceof RequestJoinPledge)
|
||||
{
|
||||
pledgeType = ((RequestJoinPledge) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
else
|
||||
{
|
||||
pledgeType = ((RequestClanAskJoinByName) requestor.getRequest().getRequestPacket()).getPledgeType();
|
||||
}
|
||||
|
||||
final L2Clan clan = requestor.getClan();
|
||||
// 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 (clan.checkClanJoinCondition(requestor, activeChar, pledgeType))
|
||||
{
|
||||
if (activeChar.getClan() != null)
|
||||
{
|
||||
@ -88,8 +97,8 @@ public final class RequestAnswerJoinPledge implements IClientIncomingPacket
|
||||
|
||||
activeChar.sendPacket(new JoinPledge(requestor.getClanId()));
|
||||
|
||||
activeChar.setPledgeType(requestPacket.getPledgeType());
|
||||
if (requestPacket.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
|
||||
activeChar.setPledgeType(pledgeType);
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
{
|
||||
activeChar.setPowerGrade(9); // academy
|
||||
activeChar.setLvlJoinedAcademy(activeChar.getLevel());
|
||||
|
@ -59,4 +59,9 @@ public class RequestClanAskJoinByName implements IClientIncomingPacket
|
||||
|
||||
invitedPlayer.sendPacket(new AskJoinPledge(activeChar, _pledgeType, activeChar.getClan().getName()));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
{
|
||||
return _pledgeType;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user