Addition of getters for creature template values.

This commit is contained in:
MobiusDevelopment
2020-01-24 19:46:48 +00:00
parent 7960f9fc58
commit d4a8f7b744
75 changed files with 1049 additions and 616 deletions

View File

@@ -131,7 +131,7 @@ public class RaidbossInfo extends Quest
for (Spawn spawn : SpawnTable.getInstance().getSpawnTable().values())
{
final NpcTemplate template = NpcTable.getInstance().getTemplate(spawn.getNpcId());
if ((template != null) && template.type.equals(BOSS_CLASS_TYPE))
if ((template != null) && template.getType().equals(BOSS_CLASS_TYPE))
{
RADARS.put(spawn.getNpcId(), new Location(spawn.getX(), spawn.getY(), spawn.getZ()));
}

View File

@@ -356,7 +356,7 @@ public class Q336_CoinsOfMagic extends Quest
final int npcId = npc.getNpcId();
if ((npcId == HARIT_LIZARDMAN_MATRIARCH) || (npcId == HARIT_LIZARDMAN_SHAMAN))
{
if ((cond == 2) && (Rnd.get(100) < (10.0 * npc.getTemplate().baseHpConsumeRate)))
if ((cond == 2) && (Rnd.get(100) < (10.0 * npc.getTemplate().getBaseHpConsumeRate())))
{
st.giveItems(KALDIS_COIN, 1);
st.set("cond", "3");
@@ -378,7 +378,7 @@ public class Q336_CoinsOfMagic extends Quest
{
if (u == npcId)
{
if (Rnd.get(100) < (chance * npc.getTemplate().baseHpConsumeRate))
if (Rnd.get(100) < (chance * npc.getTemplate().getBaseHpConsumeRate()))
{
st.giveItems(BASIC_COINS[Rnd.get(BASIC_COINS.length)], 1);
}