Custom Provisional Clan Hall implementation.

This commit is contained in:
MobiusDevelopment
2020-09-20 11:39:18 +00:00
parent f4f20ca9b7
commit d1feb43afd
700 changed files with 13930 additions and 110 deletions

View File

@ -85,6 +85,8 @@ import org.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
import org.l2jmobius.gameserver.model.stats.Formulas;
import org.l2jmobius.gameserver.model.variables.NpcVariables;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.model.zone.ZoneType;
import org.l2jmobius.gameserver.model.zone.type.ClanHallZone;
import org.l2jmobius.gameserver.model.zone.type.TaxZone;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.SystemMessageId;
@ -552,6 +554,20 @@ public class Npc extends Creature
public ClanHall getClanHall()
{
if (getId() == 33360) // Provisional Hall Manager
{
for (ZoneType zone : ZoneManager.getInstance().getZones(this))
{
if (zone instanceof ClanHallZone)
{
final ClanHall clanHall = ClanHallData.getInstance().getClanHallById(((ClanHallZone) zone).getResidenceId());
if (clanHall != null)
{
return clanHall;
}
}
}
}
return ClanHallData.getInstance().getClanHallByNpcId(getId());
}