Fixed NPC level and champion titles.
This commit is contained in:
3
trunk/dist/game/config/Custom.properties
vendored
3
trunk/dist/game/config/Custom.properties
vendored
@@ -20,6 +20,9 @@ ChampionFrequency = 5
|
|||||||
# Title of all Champion Mobs.
|
# Title of all Champion Mobs.
|
||||||
ChampionTitle = Champion
|
ChampionTitle = Champion
|
||||||
|
|
||||||
|
# Red aura for Champion Mobs.
|
||||||
|
ChampionAura = True
|
||||||
|
|
||||||
# Min and max levels allowed for a mob to be a Champion mob.
|
# Min and max levels allowed for a mob to be a Champion mob.
|
||||||
ChampionMinLevel = 20
|
ChampionMinLevel = 20
|
||||||
ChampionMaxLevel = 70
|
ChampionMaxLevel = 70
|
||||||
|
@@ -697,6 +697,7 @@ public final class Config
|
|||||||
public static boolean L2JMOD_CHAMPION_PASSIVE;
|
public static boolean L2JMOD_CHAMPION_PASSIVE;
|
||||||
public static int L2JMOD_CHAMPION_FREQUENCY;
|
public static int L2JMOD_CHAMPION_FREQUENCY;
|
||||||
public static String L2JMOD_CHAMP_TITLE;
|
public static String L2JMOD_CHAMP_TITLE;
|
||||||
|
public static boolean L2JMOD_SHOW_CHAMPION_AURA;
|
||||||
public static int L2JMOD_CHAMP_MIN_LVL;
|
public static int L2JMOD_CHAMP_MIN_LVL;
|
||||||
public static int L2JMOD_CHAMP_MAX_LVL;
|
public static int L2JMOD_CHAMP_MAX_LVL;
|
||||||
public static int L2JMOD_CHAMPION_HP;
|
public static int L2JMOD_CHAMPION_HP;
|
||||||
@@ -2220,6 +2221,7 @@ public final class Config
|
|||||||
L2JMOD_CHAMPION_PASSIVE = CustomSettings.getBoolean("ChampionPassive", false);
|
L2JMOD_CHAMPION_PASSIVE = CustomSettings.getBoolean("ChampionPassive", false);
|
||||||
L2JMOD_CHAMPION_FREQUENCY = CustomSettings.getInt("ChampionFrequency", 0);
|
L2JMOD_CHAMPION_FREQUENCY = CustomSettings.getInt("ChampionFrequency", 0);
|
||||||
L2JMOD_CHAMP_TITLE = CustomSettings.getString("ChampionTitle", "Champion");
|
L2JMOD_CHAMP_TITLE = CustomSettings.getString("ChampionTitle", "Champion");
|
||||||
|
L2JMOD_SHOW_CHAMPION_AURA = CustomSettings.getBoolean("ChampionAura", true);
|
||||||
L2JMOD_CHAMP_MIN_LVL = CustomSettings.getInt("ChampionMinLevel", 20);
|
L2JMOD_CHAMP_MIN_LVL = CustomSettings.getInt("ChampionMinLevel", 20);
|
||||||
L2JMOD_CHAMP_MAX_LVL = CustomSettings.getInt("ChampionMaxLevel", 60);
|
L2JMOD_CHAMP_MAX_LVL = CustomSettings.getInt("ChampionMaxLevel", 60);
|
||||||
L2JMOD_CHAMPION_HP = CustomSettings.getInt("ChampionHp", 7);
|
L2JMOD_CHAMPION_HP = CustomSettings.getInt("ChampionHp", 7);
|
||||||
|
@@ -41,6 +41,7 @@ import com.l2jserver.gameserver.datatables.EventDroplist.DateDrop;
|
|||||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||||
import com.l2jserver.gameserver.enums.ChatType;
|
import com.l2jserver.gameserver.enums.ChatType;
|
||||||
import com.l2jserver.gameserver.enums.InstanceType;
|
import com.l2jserver.gameserver.enums.InstanceType;
|
||||||
|
import com.l2jserver.gameserver.enums.Team;
|
||||||
import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
|
import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
|
||||||
import com.l2jserver.gameserver.instancemanager.PcCafePointsManager;
|
import com.l2jserver.gameserver.instancemanager.PcCafePointsManager;
|
||||||
import com.l2jserver.gameserver.instancemanager.WalkingManager;
|
import com.l2jserver.gameserver.instancemanager.WalkingManager;
|
||||||
@@ -1707,6 +1708,10 @@ public class L2Attackable extends L2Npc
|
|||||||
public void setChampion(boolean champ)
|
public void setChampion(boolean champ)
|
||||||
{
|
{
|
||||||
_champion = champ;
|
_champion = champ;
|
||||||
|
if (champ)
|
||||||
|
{
|
||||||
|
setTeam(Team.RED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -3140,6 +3140,19 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
*/
|
*/
|
||||||
public final String getTitle()
|
public final String getTitle()
|
||||||
{
|
{
|
||||||
|
if (isChampion())
|
||||||
|
{
|
||||||
|
return Config.L2JMOD_CHAMP_TITLE;
|
||||||
|
}
|
||||||
|
if (Config.SHOW_NPC_LVL && isMonster())
|
||||||
|
{
|
||||||
|
String t = "Lv " + getLevel();
|
||||||
|
if (_title != null)
|
||||||
|
{
|
||||||
|
t += " " + _title;
|
||||||
|
}
|
||||||
|
return t;
|
||||||
|
}
|
||||||
return _title != null ? _title : "";
|
return _title != null ? _title : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
_masks[2] |= 0x10;
|
_masks[2] |= 0x10;
|
||||||
}
|
}
|
||||||
|
|
||||||
addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.UNKNOWN1, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
|
addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.UNKNOWN1, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
|
||||||
|
|
||||||
if (npc.getHeading() > 0)
|
if (npc.getHeading() > 0)
|
||||||
{
|
{
|
||||||
@@ -89,7 +89,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.EQUIPPED);
|
addComponentType(NpcInfoType.EQUIPPED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTeam() != Team.NONE)
|
if ((npc.getTeam() != Team.NONE) || (Config.L2JMOD_SHOW_CHAMPION_AURA && npc.isChampion()))
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.TEAM);
|
addComponentType(NpcInfoType.TEAM);
|
||||||
}
|
}
|
||||||
@@ -129,11 +129,16 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
|||||||
addComponentType(NpcInfoType.CURRENT_MP);
|
addComponentType(NpcInfoType.CURRENT_MP);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.getTemplate().getDisplayId() != npc.getTemplate().getId())
|
if (npc.getTemplate().isUsingServerSideName())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.NAME);
|
addComponentType(NpcInfoType.NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (npc.getTemplate().isUsingServerSideTitle() || (Config.SHOW_NPC_LVL && npc.isMonster()) || npc.isChampion())
|
||||||
|
{
|
||||||
|
addComponentType(NpcInfoType.TITLE);
|
||||||
|
}
|
||||||
|
|
||||||
if (!_abnormalVisualEffects.isEmpty())
|
if (!_abnormalVisualEffects.isEmpty())
|
||||||
{
|
{
|
||||||
addComponentType(NpcInfoType.ABNORMALS);
|
addComponentType(NpcInfoType.ABNORMALS);
|
||||||
|
Reference in New Issue
Block a user