New way to show NPC level and aggression.
Thanks to Edoo.
This commit is contained in:
parent
8af413c0b3
commit
3b5ce2f7fa
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -610,6 +610,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2077,6 +2078,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -617,6 +617,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2094,6 +2095,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -617,6 +617,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2107,6 +2108,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -604,6 +604,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2087,6 +2088,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -599,6 +599,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2089,6 +2090,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -599,6 +599,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2089,6 +2090,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -600,6 +600,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2127,6 +2128,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -599,6 +599,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2129,6 +2130,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
11
L2J_Mobius_C1_HarbingersOfWar/dist/config/npc.ini
vendored
Normal file
11
L2J_Mobius_C1_HarbingersOfWar/dist/config/npc.ini
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# NPC Settings
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Show the level of monsters.
|
||||||
|
# Default: False
|
||||||
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Show aggression of monsters.
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
@ -40,6 +40,7 @@ public class Config
|
|||||||
private static final String RATES_CONFIG_FILE = "config/rates.ini";
|
private static final String RATES_CONFIG_FILE = "config/rates.ini";
|
||||||
private static final String KARMA_CONFIG_FILE = "config/karma.ini";
|
private static final String KARMA_CONFIG_FILE = "config/karma.ini";
|
||||||
private static final String THREADPOOL_CONFIG_FILE = "config/threadpool.ini";
|
private static final String THREADPOOL_CONFIG_FILE = "config/threadpool.ini";
|
||||||
|
private static final String NPC_CONFIG_FILE = "./config/npc.ini";
|
||||||
|
|
||||||
// Game
|
// Game
|
||||||
public static String _ip;
|
public static String _ip;
|
||||||
@ -68,6 +69,9 @@ public class Config
|
|||||||
// ThreadPool
|
// ThreadPool
|
||||||
public static int SCHEDULED_THREAD_POOL_COUNT;
|
public static int SCHEDULED_THREAD_POOL_COUNT;
|
||||||
public static int INSTANT_THREAD_POOL_COUNT;
|
public static int INSTANT_THREAD_POOL_COUNT;
|
||||||
|
// Npc
|
||||||
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
|
|
||||||
public static void load()
|
public static void load()
|
||||||
{
|
{
|
||||||
@ -117,5 +121,11 @@ public class Config
|
|||||||
|
|
||||||
SCHEDULED_THREAD_POOL_COUNT = threadpoolSettings.getInt("ScheduledThreadPoolCount", 40);
|
SCHEDULED_THREAD_POOL_COUNT = threadpoolSettings.getInt("ScheduledThreadPoolCount", 40);
|
||||||
INSTANT_THREAD_POOL_COUNT = threadpoolSettings.getInt("InstantThreadPoolCount", 20);
|
INSTANT_THREAD_POOL_COUNT = threadpoolSettings.getInt("InstantThreadPoolCount", 20);
|
||||||
|
|
||||||
|
// Load NPC config file (if exists)
|
||||||
|
final PropertiesParser npcSettings = new PropertiesParser(NPC_CONFIG_FILE);
|
||||||
|
|
||||||
|
SHOW_NPC_LVL = npcSettings.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = npcSettings.getBoolean("ShowNpcAggression", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ public abstract class Creature extends WorldObject
|
|||||||
private boolean _2ndHit = false;
|
private boolean _2ndHit = false;
|
||||||
private boolean _currentlyAttacking = false;
|
private boolean _currentlyAttacking = false;
|
||||||
private WorldObject _attackTarget;
|
private WorldObject _attackTarget;
|
||||||
protected String title;
|
protected String _title;
|
||||||
|
|
||||||
public boolean knownsObject(WorldObject object)
|
public boolean knownsObject(WorldObject object)
|
||||||
{
|
{
|
||||||
@ -703,12 +703,12 @@ public abstract class Creature extends WorldObject
|
|||||||
|
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
return title;
|
return _title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitle(String title)
|
public void setTitle(String title)
|
||||||
{
|
{
|
||||||
this.title = title;
|
this._title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRunSpeed()
|
public int getRunSpeed()
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
package org.l2jmobius.gameserver.network.serverpackets;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PetInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PetInstance;
|
||||||
|
|
||||||
@ -24,6 +26,7 @@ public class NpcInfo extends ServerBasePacket
|
|||||||
{
|
{
|
||||||
private NpcInstance _cha;
|
private NpcInstance _cha;
|
||||||
private PetInstance _chaPet;
|
private PetInstance _chaPet;
|
||||||
|
protected String _title = "";
|
||||||
|
|
||||||
public NpcInfo(NpcInstance cha)
|
public NpcInfo(NpcInstance cha)
|
||||||
{
|
{
|
||||||
@ -100,7 +103,37 @@ public class NpcInfo extends ServerBasePacket
|
|||||||
}
|
}
|
||||||
writeC(0);
|
writeC(0);
|
||||||
writeS(_cha.getName());
|
writeS(_cha.getName());
|
||||||
writeS(_cha.getTitle());
|
|
||||||
|
_title = _cha.getTitle();
|
||||||
|
// Custom level titles
|
||||||
|
if (_cha.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + _cha.getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
if (((MonsterInstance) _cha).isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
_title = t1;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeS(_title);
|
||||||
writeD(0);
|
writeD(0);
|
||||||
writeD(0);
|
writeD(0);
|
||||||
writeD(0);
|
writeD(0);
|
||||||
|
@ -582,9 +582,14 @@ MinMonsterAnimation = 5
|
|||||||
# Default: 60
|
# Default: 60
|
||||||
MaxMonsterAnimation = 60
|
MaxMonsterAnimation = 60
|
||||||
|
|
||||||
# Show the lvl and type of aggro mobs?
|
# Show the level of monsters.
|
||||||
|
# Default: false
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Show aggression of monsters.
|
||||||
|
# Default: false
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Record the location of the characters in the file before the off / restarting the server?
|
# Record the location of the characters in the file before the off / restarting the server?
|
||||||
ActivatePositionRecorder = False
|
ActivatePositionRecorder = False
|
||||||
|
|
||||||
|
@ -186,6 +186,7 @@ public class Config
|
|||||||
public static int LINKED_NODE_ID;
|
public static int LINKED_NODE_ID;
|
||||||
public static String NEW_NODE_TYPE;
|
public static String NEW_NODE_TYPE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static int ZONE_TOWN;
|
public static int ZONE_TOWN;
|
||||||
public static boolean COUNT_PACKETS = false;
|
public static boolean COUNT_PACKETS = false;
|
||||||
public static boolean DUMP_PACKET_COUNTS = false;
|
public static boolean DUMP_PACKET_COUNTS = false;
|
||||||
@ -1687,6 +1688,7 @@ public class Config
|
|||||||
MAX_MONSTER_ANIMATION = Integer.parseInt(generalSettings.getProperty("MaxMonsterAnimation", "60"));
|
MAX_MONSTER_ANIMATION = Integer.parseInt(generalSettings.getProperty("MaxMonsterAnimation", "60"));
|
||||||
|
|
||||||
SHOW_NPC_LVL = Boolean.valueOf(generalSettings.getProperty("ShowNpcLevel", "false"));
|
SHOW_NPC_LVL = Boolean.valueOf(generalSettings.getProperty("ShowNpcLevel", "false"));
|
||||||
|
SHOW_NPC_AGGRESSION = Boolean.valueOf(generalSettings.getProperty("ShowNpcAggression", "false"));
|
||||||
|
|
||||||
FORCE_INVENTORY_UPDATE = Boolean.valueOf(generalSettings.getProperty("ForceInventoryUpdate", "false"));
|
FORCE_INVENTORY_UPDATE = Boolean.valueOf(generalSettings.getProperty("ForceInventoryUpdate", "false"));
|
||||||
|
|
||||||
|
@ -96,15 +96,33 @@ public class NpcInfo extends GameServerPacket
|
|||||||
_title = cha.getTitle();
|
_title = cha.getTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.SHOW_NPC_LVL && (_creature instanceof MonsterInstance))
|
// Custom level titles
|
||||||
|
if (cha.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
{
|
{
|
||||||
String t = "Lv " + cha.getLevel() + (cha.getAggroRange() > 0 ? "*" : "");
|
String t1 = "";
|
||||||
if (_title != null)
|
if (Config.SHOW_NPC_LVL)
|
||||||
{
|
{
|
||||||
t += " " + _title;
|
t1 += "Lv " + cha.getLevel();
|
||||||
}
|
}
|
||||||
|
String t2 = "";
|
||||||
_title = t;
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) cha;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
_title = cha.isChampion() ? Config.L2JMOD_CHAMP_TITLE + " " + t1 : t1;
|
||||||
}
|
}
|
||||||
|
|
||||||
_x = _creature.getX();
|
_x = _creature.getX();
|
||||||
|
@ -42,6 +42,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -709,6 +709,7 @@ public class Config
|
|||||||
public static int MAX_AGGRO_RANGE;
|
public static int MAX_AGGRO_RANGE;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2220,6 +2221,7 @@ public class Config
|
|||||||
MAX_AGGRO_RANGE = NPC.getInt("MaxAggroRange", 450);
|
MAX_AGGRO_RANGE = NPC.getInt("MaxAggroRange", 450);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
|||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.TrapInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.TrapInstance;
|
||||||
import org.l2jmobius.gameserver.model.clan.Clan;
|
import org.l2jmobius.gameserver.model.clan.Clan;
|
||||||
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
|
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
|
||||||
@ -179,10 +180,6 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
|||||||
{
|
{
|
||||||
_title = "Invisible";
|
_title = "Invisible";
|
||||||
}
|
}
|
||||||
else if (Config.CHAMPION_ENABLE && _npc.isChampion())
|
|
||||||
{
|
|
||||||
_title = (Config.CHAMP_TITLE); // On every subclass
|
|
||||||
}
|
|
||||||
else if (_localisation == null)
|
else if (_localisation == null)
|
||||||
{
|
{
|
||||||
if (_npc.getTemplate().isUsingServerSideTitle())
|
if (_npc.getTemplate().isUsingServerSideTitle())
|
||||||
@ -194,14 +191,41 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
|||||||
_title = _npc.getTitle(); // On every subclass
|
_title = _npc.getTitle(); // On every subclass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Config.SHOW_NPC_LVL && _npc.isMonster())
|
// Custom level titles
|
||||||
|
if (_npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
{
|
{
|
||||||
String t = "Lv " + _npc.getLevel() + (_npc.isAggressive() ? "*" : "");
|
String t1 = "";
|
||||||
if (_title != null)
|
if (Config.SHOW_NPC_LVL)
|
||||||
{
|
{
|
||||||
t += " " + _title;
|
t1 += "Lv " + _npc.getLevel();
|
||||||
}
|
}
|
||||||
_title = t;
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) _npc;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
_title = _npc.isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
|
else if (Config.CHAMPION_ENABLE && _npc.isChampion())
|
||||||
|
{
|
||||||
|
_title = (Config.CHAMP_TITLE); // On every subclass
|
||||||
}
|
}
|
||||||
packet.writeS(_title);
|
packet.writeS(_title);
|
||||||
packet.writeD(0x00); // Title color 0=client default
|
packet.writeD(0x00); // Title color 0=client default
|
||||||
|
@ -42,6 +42,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -714,6 +714,7 @@ public class Config
|
|||||||
public static int MAX_AGGRO_RANGE;
|
public static int MAX_AGGRO_RANGE;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2226,6 +2227,7 @@ public class Config
|
|||||||
MAX_AGGRO_RANGE = NPC.getInt("MaxAggroRange", 450);
|
MAX_AGGRO_RANGE = NPC.getInt("MaxAggroRange", 450);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
|||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.TrapInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.TrapInstance;
|
||||||
import org.l2jmobius.gameserver.model.clan.Clan;
|
import org.l2jmobius.gameserver.model.clan.Clan;
|
||||||
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
|
import org.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
|
||||||
@ -181,10 +182,6 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
|||||||
{
|
{
|
||||||
_title = "Invisible";
|
_title = "Invisible";
|
||||||
}
|
}
|
||||||
else if (Config.CHAMPION_ENABLE && _npc.isChampion())
|
|
||||||
{
|
|
||||||
_title = (Config.CHAMP_TITLE); // On every subclass
|
|
||||||
}
|
|
||||||
else if (_localisation == null)
|
else if (_localisation == null)
|
||||||
{
|
{
|
||||||
if (_npc.getTemplate().isUsingServerSideTitle())
|
if (_npc.getTemplate().isUsingServerSideTitle())
|
||||||
@ -196,14 +193,41 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
|||||||
_title = _npc.getTitle(); // On every subclass
|
_title = _npc.getTitle(); // On every subclass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Config.SHOW_NPC_LVL && _npc.isMonster())
|
// Custom level titles
|
||||||
|
if (_npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
{
|
{
|
||||||
String t = "Lv " + _npc.getLevel() + (_npc.isAggressive() ? "*" : "");
|
String t1 = "";
|
||||||
if (_title != null)
|
if (Config.SHOW_NPC_LVL)
|
||||||
{
|
{
|
||||||
t += " " + _title;
|
t1 += "Lv " + _npc.getLevel();
|
||||||
}
|
}
|
||||||
_title = t;
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) _npc;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
_title = _npc.isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
|
else if (Config.CHAMPION_ENABLE && _npc.isChampion())
|
||||||
|
{
|
||||||
|
_title = (Config.CHAMP_TITLE); // On every subclass
|
||||||
}
|
}
|
||||||
packet.writeS(_title);
|
packet.writeS(_title);
|
||||||
packet.writeD(0x00); // Title color 0=client default
|
packet.writeD(0x00); // Title color 0=client default
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -609,6 +609,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2000,6 +2001,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2215,21 +2215,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -609,6 +609,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2004,6 +2005,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2215,21 +2215,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -609,6 +609,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2004,6 +2005,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2215,21 +2215,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -609,6 +609,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2004,6 +2005,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -609,6 +609,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2012,6 +2013,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -608,6 +608,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2010,6 +2011,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2216,21 +2216,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ MaxDriftRange = 300
|
|||||||
# Default: False
|
# Default: False
|
||||||
ShowNpcLevel = False
|
ShowNpcLevel = False
|
||||||
|
|
||||||
|
# Default: False
|
||||||
|
ShowNpcAggression = False
|
||||||
|
|
||||||
# Show clan, alliance crests for territory NPCs without quests
|
# Show clan, alliance crests for territory NPCs without quests
|
||||||
# Default: False
|
# Default: False
|
||||||
ShowCrestWithoutQuest = False
|
ShowCrestWithoutQuest = False
|
||||||
|
@ -611,6 +611,7 @@ public class Config
|
|||||||
public static boolean ALT_GAME_VIEWNPC;
|
public static boolean ALT_GAME_VIEWNPC;
|
||||||
public static int MAX_DRIFT_RANGE;
|
public static int MAX_DRIFT_RANGE;
|
||||||
public static boolean SHOW_NPC_LVL;
|
public static boolean SHOW_NPC_LVL;
|
||||||
|
public static boolean SHOW_NPC_AGGRESSION;
|
||||||
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
public static boolean SHOW_CREST_WITHOUT_QUEST;
|
||||||
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
|
||||||
public static int MIN_NPC_LVL_DMG_PENALTY;
|
public static int MIN_NPC_LVL_DMG_PENALTY;
|
||||||
@ -2012,6 +2013,7 @@ public class Config
|
|||||||
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
|
||||||
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
|
||||||
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
|
||||||
|
SHOW_NPC_AGGRESSION = NPC.getBoolean("ShowNpcAggression", false);
|
||||||
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
|
||||||
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
|
||||||
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
|
||||||
|
@ -2215,21 +2215,43 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
|
// Custom level titles
|
||||||
|
if (isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION))
|
||||||
|
{
|
||||||
|
String t1 = "";
|
||||||
|
if (Config.SHOW_NPC_LVL)
|
||||||
|
{
|
||||||
|
t1 += "Lv " + getLevel();
|
||||||
|
}
|
||||||
|
String t2 = "";
|
||||||
|
if (Config.SHOW_NPC_AGGRESSION)
|
||||||
|
{
|
||||||
|
if (!t1.isEmpty())
|
||||||
|
{
|
||||||
|
t2 += " ";
|
||||||
|
}
|
||||||
|
final MonsterInstance monster = (MonsterInstance) this;
|
||||||
|
if (monster.isAggressive())
|
||||||
|
{
|
||||||
|
t2 += "[A]"; // Aggressive.
|
||||||
|
}
|
||||||
|
if ((monster.getTemplate().getClans() != null) && (monster.getTemplate().getClanHelpRange() > 0))
|
||||||
|
{
|
||||||
|
t2 += "[G]"; // Group.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t1 += t2;
|
||||||
|
if ((_title != null) && !_title.isEmpty())
|
||||||
|
{
|
||||||
|
t1 += " " + _title;
|
||||||
|
}
|
||||||
|
return isChampion() ? Config.CHAMP_TITLE + " " + t1 : t1;
|
||||||
|
}
|
||||||
// Champion titles
|
// Champion titles
|
||||||
if (isChampion())
|
if (isChampion())
|
||||||
{
|
{
|
||||||
return Config.CHAMP_TITLE;
|
return Config.CHAMP_TITLE;
|
||||||
}
|
}
|
||||||
// Custom level titles
|
|
||||||
if (Config.SHOW_NPC_LVL && isMonster())
|
|
||||||
{
|
|
||||||
String t = "Lv " + getLevel() + (((MonsterInstance) this).isAggressive() ? "*" : "");
|
|
||||||
if (_title != null)
|
|
||||||
{
|
|
||||||
t += " " + _title;
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
// Set trap title
|
// Set trap title
|
||||||
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
if (isTrap() && (((TrapInstance) this).getOwner() != null))
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion() || npc.isTrap())
|
if (npc.getTemplate().isUsingServerSideTitle() || (npc.isMonster() && (Config.SHOW_NPC_LVL || Config.SHOW_NPC_AGGRESSION)) || npc.isChampion() || npc.isTrap())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TITLE);
|
addComponentType(NpcInfoType.TITLE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user