transaction.cancel();
activeChar.sendPacket(Msg.TIME_EXPIRED, Msg.ActionFail);
return;
}
L2Player requestor = transaction.getOtherPlayer(activeChar);
L2Party party = requestor.getParty();
transaction.cancel();
if(party == null || party.getPartyLeader() == null)
{
activeChar.sendPacket(Msg.ActionFail);
requestor.sendPacket(new JoinParty(0));
return;
}
SystemMessage problem = activeChar.canJoinParty(requestor);
if(problem != null)
{
activeChar.sendPacket(problem, Msg.ActionFail);
requestor.sendPacket(new JoinParty(0));
return;
}
requestor.sendPacket(new JoinParty(_response));
if(_response == 1)
{
if(activeChar.isInZone(OlympiadStadia))
{
activeChar.sendPacket(Msg.A_PARTY_CANNOT_BE_FORMED_IN_THIS_AREA);
requestor.sendPacket(Msg.A_PARTY_CANNOT_BE_FORMED_IN_THIS_AREA);
return;
}
if(party.getMemberCount() >= L2Party.MAX_SIZE)
{
activeChar.sendPacket(Msg.PARTY_IS_FULL);
requestor.sendPacket(Msg.PARTY_IS_FULL);
return;
}
activeChar.joinParty(party);
}
else
//activate garbage collection if there are no other members in party (happens when we were creating new one)
if(party.getMemberCount() == 1)
{
requestor.setParty(null);
}
}