activeChar.sendActionFailed();
return;
}
if (!activeChar.isClanLeader())
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.ChangeAffiliations", activeChar));
activeChar.sendActionFailed();
return;
}
UnitMember subject = clan.getAnyMember(_subjectName);
if (subject == null)
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.NotInYourClan", activeChar));
activeChar.sendActionFailed();
return;
}
if (subject.getPledgeType() == _targetUnit)
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.AlreadyInThatCombatUnit", activeChar));
activeChar.sendActionFailed();
return;
}
if ((_targetUnit != 0) && (clan.getSubUnit(_targetUnit) == null))
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.NoSuchCombatUnit", activeChar));
activeChar.sendActionFailed();
return;
}
if (Clan.isAcademy(_targetUnit))
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.AcademyViaInvitation", activeChar));
activeChar.sendActionFailed();
return;
}
if (Clan.isAcademy(subject.getPledgeType()))
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.CantMoveAcademyMember", activeChar));
activeChar.sendActionFailed();
return;
}
UnitMember replacement = null;
if (_replace > 0)
{
replacement = clan.getAnyMember(_replaceName);
if (replacement == null)
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.CharacterNotBelongClan", activeChar));
activeChar.sendActionFailed();
return;
}
if (replacement.getPledgeType() != _targetUnit)
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.CharacterNotBelongCombatUnit", activeChar));
activeChar.sendActionFailed();
return;
}
if (replacement.isSubLeader() != 0)
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.CharacterLeaderAnotherCombatUnit", activeChar));
activeChar.sendActionFailed();
return;
}
}
else
{
if (clan.getUnitMembersSize(_targetUnit) >= clan.getSubPledgeLimit(_targetUnit))
{
if (_targetUnit == Clan.SUBUNIT_MAIN_CLAN)
{
activeChar.sendPacket(new SystemMessage(SystemMessage.S1_IS_FULL_AND_CANNOT_ACCEPT_ADDITIONAL_CLAN_MEMBERS_AT_THIS_TIME).addString(clan.getName()));
}
else
{
activeChar.sendPacket(Msg.THE_ACADEMY_ROYAL_GUARD_ORDER_OF_KNIGHTS_IS_FULL_AND_CANNOT_ACCEPT_NEW_MEMBERS_AT_THIS_TIME);
}
activeChar.sendActionFailed();
return;
}
if (subject.isSubLeader() != 0)
{
activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.MemberLeaderAnotherUnit", activeChar));
activeChar.sendActionFailed();
return;
}
}
SubUnit oldUnit = null;