09-06-2011, 05:35 PM
Не могу сообразить как адаптировать код для сборки фениксов
// npc crest of owning clan/ally of castle
if (cha instanceof L2NpcInstance && cha.isInsideZone(L2Character.ZONE_TOWN) && (Config.SHOW_CREST_WITHOUT_QUEST || cha.getCastle().getShowNpcCrest()) && cha.getCastle().getOwnerId() != 0)
{
int townId = TownManager.getTown(_x, _y, _z).getTownId();
if (townId != 33 && townId != 22)
{
L2Clan clan = ClanTable.getInstance().getClan(cha.getCastle().getOwnerId());
_clanCrest = clan.getCrestId();
_clanId = clan.getClanId();
_allyCrest = clan.getAllyCrestId();
_allyId = clan.getAllyId();
}
}
// npc crest of owning clan/ally of castle
if (cha instanceof L2NpcInstance && cha.isInsideZone(L2Character.ZONE_TOWN) && (Config.SHOW_CREST_WITHOUT_QUEST || cha.getCastle().getShowNpcCrest()) && cha.getCastle().getOwnerId() != 0)
{
int townId = TownManager.getTown(_x, _y, _z).getTownId();
if (townId != 33 && townId != 22)
{
L2Clan clan = ClanTable.getInstance().getClan(cha.getCastle().getOwnerId());
_clanCrest = clan.getCrestId();
_clanId = clan.getClanId();
_allyCrest = clan.getAllyCrestId();
_allyId = clan.getAllyId();
}
}