Sync with L2jServer HighFive Mar 1st 2015.

This commit is contained in:
mobius
2015-03-01 22:48:14 +00:00
parent f14af24b41
commit 6fa0ed56e3
116 changed files with 971 additions and 676 deletions

View File

@@ -123,30 +123,34 @@ public final class WyvernManager extends AbstractNpcAI
private boolean isOwnerClan(L2Npc npc, L2PcInstance player)
{
if (!player.isClanLeader())
{
return false;
}
switch (MANAGERS.get(npc.getId()))
{
case CASTLE:
{
if ((player.getClan() != null) && (npc.getCastle() != null))
if (npc.getCastle() != null)
{
return (player.isClanLeader() && (player.getClanId() == npc.getCastle().getOwnerId()));
return player.getClanId() == npc.getCastle().getOwnerId();
}
return false;
}
case CLAN_HALL:
{
if ((player.getClan() != null) && (npc.getConquerableHall() != null))
if (npc.getConquerableHall() != null)
{
return (player.isClanLeader() && (player.getClanId() == npc.getConquerableHall().getOwnerId()));
return player.getClanId() == npc.getConquerableHall().getOwnerId();
}
return false;
}
case FORT:
{
final Fort fort = npc.getFort();
if ((player.getClan() != null) && (fort != null) && (fort.getOwnerClan() != null))
if ((fort != null) && (fort.getOwnerClan() != null))
{
return (player.isClanLeader() && (player.getClanId() == npc.getFort().getOwnerClan().getId()));
return player.getClanId() == npc.getFort().getOwnerClan().getId();
}
return false;
}