Скрытый текстIndex: D:/eclipse/l2jsoft/gameserver/config/functions/l2js.ini =================================================================== --- D:/eclipse/l2jsoft/gameserver/config/functions/l2js.ini (revision 69) +++ D:/eclipse/l2jsoft/gameserver/config/functions/l2js.ini (revision 70) @@ -140,6 +140,9 @@ CharTitle = false CharAddTitle = Welcome +# Иконки клана на НПС, тоесть если вы Владелец замка например гирана то значек вашего клана будет отображаться на всех НПС в данном городе +ShowNpcCrest = False + # Настройка начального уровня # Вкл/выкл CustomStartingLvl = False Index: D:/eclipse/l2jsoft/gameserver/head-src/com/l2jsoftware/gameserver/network/serverpackets/NpcInfo.java =================================================================== --- D:/eclipse/l2jsoft/gameserver/head-src/com/l2jsoftware/gameserver/network/serverpackets/NpcInfo.java (revision 69) +++ D:/eclipse/l2jsoft/gameserver/head-src/com/l2jsoftware/gameserver/network/serverpackets/NpcInfo.java (revision 70) @@ -19,11 +19,15 @@ package com.l2jsoftware.gameserver.network.serverpackets; import com.l2jsoftware.Config; +import com.l2jsoftware.gameserver.datatables.sql.ClanTable; +import com.l2jsoftware.gameserver.managers.TownManager; import com.l2jsoftware.gameserver.model.L2Character; +import com.l2jsoftware.gameserver.model.L2Clan; import com.l2jsoftware.gameserver.model.L2Summon; import com.l2jsoftware.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jsoftware.gameserver.model.actor.instance.L2NpcInstance; import com.l2jsoftware.gameserver.model.actor.instance.L2PetInstance; +import com.l2jsoftware.gameserver.model.zone.type.L2TownZone; /** * This class ... @@ -46,6 +50,10 @@ private int _collisionHeight, _collisionRadius; private String _name = ""; private String _title = ""; + private int _clanCrest; + private int _clanId; + private int _allyCrest; + private int _allyId; /** * @param _characters @@ -87,7 +95,30 @@ { _title = cha.getTitle(); } + + if ((Config.SHOW_NPC_CREST) && + (cha instanceof L2NpcInstance) && (cha.isInsideZone(2)) && (cha.getCastle().getOwnerId() != 0)) + { + int _x = cha.getX(); + int _y = cha.getY(); + int _z = cha.getZ(); + L2TownZone Town = TownManager.getInstance().getTown(_x, _y, _z); + if (Town != null) + { + int townId = Town.getTownId(); + if ((townId != 33) && (townId != 22)) + { + L2Clan clan = ClanTable.getInstance().getClan(cha.getCastle().getOwnerId()); + this._clanCrest = clan.getCrestId(); + this._clanId = clan.getClanId(); + this._allyCrest = clan.getAllyCrestId(); + this._allyId = clan.getAllyId(); + } + } + + } + if(Config.SHOW_NPC_LVL && _activeChar instanceof L2MonsterInstance) { String t = "Lv " + cha.getLevel() + (cha.getAggroRange() > 0 ? "*" : ""); @@ -187,11 +218,21 @@ writeD(0000); // hmm karma ?? writeD(_activeChar.getAbnormalEffect()); // C2 - writeD(0000); // C2 - writeD(0000); // C2 - writeD(0000); // C2 - writeD(0000); // C2 - writeC(0000); // C2 + if (Config.SHOW_NPC_CREST) + { + writeD(this._clanId); + writeD(this._clanCrest); + writeD(this._allyId); + writeD(this._allyCrest); + } + else + { + writeD(0); + writeD(0); + writeD(0); + writeD(0); + writeC(0); + } writeC(0x00); // C3 team circle 1-blue, 2-red writeF(_collisionRadius); Index: D:/eclipse/l2jsoft/gameserver/head-src/com/l2jsoftware/Config.java =================================================================== --- D:/eclipse/l2jsoft/gameserver/head-src/com/l2jsoftware/Config.java (revision 69) +++ D:/eclipse/l2jsoft/gameserver/head-src/com/l2jsoftware/Config.java (revision 70) @@ -2388,6 +2388,7 @@ public static String PVP2_CUSTOM_MESSAGE; public static boolean ATTACK_NPC_PEACE_ZONE; public static int MANA_POTION_RES; + public static boolean SHOW_NPC_CREST; // buff amount public static float SPIRIT_TIME_MULTIPLIER; @@ -2462,7 +2463,7 @@ CASTLE_CIRCLETS = Boolean.parseBoolean(L2ScoriaSettings.getProperty("CastleCircletsRestriction", "true")); CHAR_TITLE = Boolean.parseBoolean(L2ScoriaSettings.getProperty("CharTitle", "false")); ADD_CHAR_TITLE = L2ScoriaSettings.getProperty("CharAddTitle", "Welcome"); - + SHOW_NPC_CREST = Boolean.parseBoolean(L2ScoriaSettings.getProperty("ShowNpcCrest","False")); NOBLE_CUSTOM_ITEMS = Boolean.parseBoolean(L2ScoriaSettings.getProperty("EnableNobleCustomItem", "true")); NOOBLE_CUSTOM_ITEM_ID = Integer.parseInt(L2ScoriaSettings.getProperty("NoobleCustomItemId", "6673")); HERO_CUSTOM_ITEMS = Boolean.parseBoolean(L2ScoriaSettings.getProperty("EnableHeroCustomItem", "true"));
держи!