Rename and clean up MapleMonsterStats
This commit is contained in:
@@ -23,7 +23,7 @@ public class ChangeableStats extends OverrideMonsterStats {
|
|||||||
|
|
||||||
public int watk, matk, wdef, mdef, level;
|
public int watk, matk, wdef, mdef, level;
|
||||||
|
|
||||||
public ChangeableStats(MapleMonsterStats stats, OverrideMonsterStats ostats) {
|
public ChangeableStats(MonsterStats stats, OverrideMonsterStats ostats) {
|
||||||
hp = ostats.getHp();
|
hp = ostats.getHp();
|
||||||
exp = ostats.getExp();
|
exp = ostats.getExp();
|
||||||
mp = ostats.getMp();
|
mp = ostats.getMp();
|
||||||
@@ -34,7 +34,7 @@ public class ChangeableStats extends OverrideMonsterStats {
|
|||||||
level = stats.getLevel();
|
level = stats.getLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChangeableStats(MapleMonsterStats stats, int newLevel, boolean pqMob) { // here we go i think
|
public ChangeableStats(MonsterStats stats, int newLevel, boolean pqMob) { // here we go i think
|
||||||
final double mod = (double) newLevel / (double) stats.getLevel();
|
final double mod = (double) newLevel / (double) stats.getLevel();
|
||||||
final double hpRatio = (double) stats.getHp() / (double) stats.getExp();
|
final double hpRatio = (double) stats.getHp() / (double) stats.getExp();
|
||||||
final double pqMod = (pqMob ? 1.5 : 1.0); // god damn
|
final double pqMod = (pqMob ? 1.5 : 1.0); // god damn
|
||||||
@@ -48,7 +48,7 @@ public class ChangeableStats extends OverrideMonsterStats {
|
|||||||
level = newLevel;
|
level = newLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChangeableStats(MapleMonsterStats stats, float statModifier, boolean pqMob) {
|
public ChangeableStats(MonsterStats stats, float statModifier, boolean pqMob) {
|
||||||
this(stats, (int)(statModifier * stats.getLevel()), pqMob);
|
this(stats, (int)(statModifier * stats.getLevel()), pqMob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class LifeFactory {
|
|||||||
private final static DataProvider stringDataWZ = DataProviderFactory.getDataProvider(WZFiles.STRING);
|
private final static DataProvider stringDataWZ = DataProviderFactory.getDataProvider(WZFiles.STRING);
|
||||||
private static final Data mobStringData = stringDataWZ.getData("Mob.img");
|
private static final Data mobStringData = stringDataWZ.getData("Mob.img");
|
||||||
private static final Data npcStringData = stringDataWZ.getData("Npc.img");
|
private static final Data npcStringData = stringDataWZ.getData("Npc.img");
|
||||||
private static final Map<Integer, MapleMonsterStats> monsterStats = new HashMap<>();
|
private static final Map<Integer, MonsterStats> monsterStats = new HashMap<>();
|
||||||
private static final Set<Integer> hpbarBosses = getHpBarBosses();
|
private static final Set<Integer> hpbarBosses = getHpBarBosses();
|
||||||
|
|
||||||
private static Set<Integer> getHpBarBosses() {
|
private static Set<Integer> getHpBarBosses() {
|
||||||
@@ -89,7 +89,7 @@ public class LifeFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Pair<MapleMonsterStats, List<MobAttackInfoHolder>> getMonsterStats(int mid) {
|
private static Pair<MonsterStats, List<MobAttackInfoHolder>> getMonsterStats(int mid) {
|
||||||
Data monsterData = data.getData(StringUtil.getLeftPaddedStr(mid + ".img", '0', 11));
|
Data monsterData = data.getData(StringUtil.getLeftPaddedStr(mid + ".img", '0', 11));
|
||||||
if (monsterData == null) {
|
if (monsterData == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -97,11 +97,11 @@ public class LifeFactory {
|
|||||||
Data monsterInfoData = monsterData.getChildByPath("info");
|
Data monsterInfoData = monsterData.getChildByPath("info");
|
||||||
|
|
||||||
List<MobAttackInfoHolder> attackInfos = new LinkedList<>();
|
List<MobAttackInfoHolder> attackInfos = new LinkedList<>();
|
||||||
MapleMonsterStats stats = new MapleMonsterStats();
|
MonsterStats stats = new MonsterStats();
|
||||||
|
|
||||||
int linkMid = DataTool.getIntConvert("link", monsterInfoData, 0);
|
int linkMid = DataTool.getIntConvert("link", monsterInfoData, 0);
|
||||||
if (linkMid != 0) {
|
if (linkMid != 0) {
|
||||||
Pair<MapleMonsterStats, List<MobAttackInfoHolder>> linkStats = getMonsterStats(linkMid);
|
Pair<MonsterStats, List<MobAttackInfoHolder>> linkStats = getMonsterStats(linkMid);
|
||||||
if (linkStats == null) {
|
if (linkStats == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -239,9 +239,9 @@ public class LifeFactory {
|
|||||||
|
|
||||||
public static Monster getMonster(int mid) {
|
public static Monster getMonster(int mid) {
|
||||||
try {
|
try {
|
||||||
MapleMonsterStats stats = monsterStats.get(mid);
|
MonsterStats stats = monsterStats.get(mid);
|
||||||
if (stats == null) {
|
if (stats == null) {
|
||||||
Pair<MapleMonsterStats, List<MobAttackInfoHolder>> mobStats = getMonsterStats(mid);
|
Pair<MonsterStats, List<MobAttackInfoHolder>> mobStats = getMonsterStats(mid);
|
||||||
stats = mobStats.getLeft();
|
stats = mobStats.getLeft();
|
||||||
setMonsterAttackInfo(mid, mobStats.getRight());
|
setMonsterAttackInfo(mid, mobStats.getRight());
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ public class LifeFactory {
|
|||||||
|
|
||||||
public static int getMonsterLevel(int mid) {
|
public static int getMonsterLevel(int mid) {
|
||||||
try {
|
try {
|
||||||
MapleMonsterStats stats = monsterStats.get(mid);
|
MonsterStats stats = monsterStats.get(mid);
|
||||||
if (stats == null) {
|
if (stats == null) {
|
||||||
Data monsterData = data.getData(StringUtil.getLeftPaddedStr(mid + ".img", '0', 11));
|
Data monsterData = data.getData(StringUtil.getLeftPaddedStr(mid + ".img", '0', 11));
|
||||||
if (monsterData == null) {
|
if (monsterData == null) {
|
||||||
@@ -278,7 +278,7 @@ public class LifeFactory {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void decodeElementalString(MapleMonsterStats stats, String elemAttr) {
|
private static void decodeElementalString(MonsterStats stats, String elemAttr) {
|
||||||
for (int i = 0; i < elemAttr.length(); i += 2) {
|
for (int i = 0; i < elemAttr.length(); i += 2) {
|
||||||
stats.setEffectiveness(Element.getFromChar(elemAttr.charAt(i)), ElementalEffectiveness.getByNumber(Integer.parseInt(String.valueOf(elemAttr.charAt(i + 1)))));
|
stats.setEffectiveness(Element.getFromChar(elemAttr.charAt(i)), ElementalEffectiveness.getByNumber(Integer.parseInt(String.valueOf(elemAttr.charAt(i + 1)))));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||||||
public class Monster extends AbstractLoadedLife {
|
public class Monster extends AbstractLoadedLife {
|
||||||
|
|
||||||
private ChangeableStats ostats = null; //unused, v83 WZs offers no support for changeable stats.
|
private ChangeableStats ostats = null; //unused, v83 WZs offers no support for changeable stats.
|
||||||
private MapleMonsterStats stats;
|
private MonsterStats stats;
|
||||||
private final AtomicInteger hp = new AtomicInteger(1);
|
private final AtomicInteger hp = new AtomicInteger(1);
|
||||||
private final AtomicLong maxHpPlusHeal = new AtomicLong(1);
|
private final AtomicLong maxHpPlusHeal = new AtomicLong(1);
|
||||||
private int mp;
|
private int mp;
|
||||||
@@ -100,7 +100,7 @@ public class Monster extends AbstractLoadedLife {
|
|||||||
private MonitoredReentrantLock animationLock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.MOB_ANI);
|
private MonitoredReentrantLock animationLock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.MOB_ANI);
|
||||||
private final MonitoredReentrantLock aggroUpdateLock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.MOB_AGGRO);
|
private final MonitoredReentrantLock aggroUpdateLock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.MOB_AGGRO);
|
||||||
|
|
||||||
public Monster(int id, MapleMonsterStats stats) {
|
public Monster(int id, MonsterStats stats) {
|
||||||
super(id);
|
super(id);
|
||||||
initWithStats(stats);
|
initWithStats(stats);
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ public class Monster extends AbstractLoadedLife {
|
|||||||
externalLock.unlock();
|
externalLock.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initWithStats(MapleMonsterStats baseStats) {
|
private void initWithStats(MonsterStats baseStats) {
|
||||||
setStance(5);
|
setStance(5);
|
||||||
this.stats = baseStats.copy();
|
this.stats = baseStats.copy();
|
||||||
hp.set(stats.getHp());
|
hp.set(stats.getHp());
|
||||||
@@ -277,7 +277,7 @@ public class Monster extends AbstractLoadedLife {
|
|||||||
this.VenomMultiplier = multiplier;
|
this.VenomMultiplier = multiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleMonsterStats getStats() {
|
public MonsterStats getStats() {
|
||||||
return stats;
|
return stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import java.util.*;
|
|||||||
/**
|
/**
|
||||||
* @author Frz
|
* @author Frz
|
||||||
*/
|
*/
|
||||||
public class MapleMonsterStats {
|
public class MonsterStats {
|
||||||
public boolean changeable;
|
public boolean changeable;
|
||||||
public int exp, hp, mp, level, PADamage, PDDamage, MADamage, MDDamage, dropPeriod, cp, buffToGive = -1, removeAfter;
|
public int exp, hp, mp, level, PADamage, PDDamage, MADamage, MDDamage, dropPeriod, cp, buffToGive = -1, removeAfter;
|
||||||
public boolean boss, undead, ffaLoot, isExplosiveReward, firstAttack, removeOnMiss;
|
public boolean boss, undead, ffaLoot, isExplosiveReward, firstAttack, removeOnMiss;
|
||||||
@@ -56,7 +56,7 @@ public class MapleMonsterStats {
|
|||||||
public boolean isChangeable() {
|
public boolean isChangeable() {
|
||||||
return changeable;
|
return changeable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getExp() {
|
public int getExp() {
|
||||||
return exp;
|
return exp;
|
||||||
}
|
}
|
||||||
@@ -194,7 +194,7 @@ public class MapleMonsterStats {
|
|||||||
for (int i = this.skills.size(); i < skills.size(); i++) {
|
for (int i = this.skills.size(); i < skills.size(); i++) {
|
||||||
this.skills.add(null);
|
this.skills.add(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < skills.size(); i++) {
|
for (int i = 0; i < skills.size(); i++) {
|
||||||
this.skills.set(i, skills.get(i));
|
this.skills.set(i, skills.get(i));
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@ public class MapleMonsterStats {
|
|||||||
public void setSelfDestruction(selfDestruction sd) {
|
public void setSelfDestruction(selfDestruction sd) {
|
||||||
this.selfDestruction = sd;
|
this.selfDestruction = sd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setExplosiveReward(boolean isExplosiveReward) {
|
public void setExplosiveReward(boolean isExplosiveReward) {
|
||||||
this.isExplosiveReward = isExplosiveReward;
|
this.isExplosiveReward = isExplosiveReward;
|
||||||
}
|
}
|
||||||
@@ -303,49 +303,49 @@ public class MapleMonsterStats {
|
|||||||
public Pair<Integer, Integer> getCool() {
|
public Pair<Integer, Integer> getCool() {
|
||||||
return cool;
|
return cool;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPDDamage() {
|
public int getPDDamage() {
|
||||||
return PDDamage;
|
return PDDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMADamage() {
|
public int getMADamage() {
|
||||||
return MADamage;
|
return MADamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMDDamage() {
|
public int getMDDamage() {
|
||||||
return MDDamage;
|
return MDDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFriendly() {
|
public boolean isFriendly() {
|
||||||
return friendly;
|
return friendly;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFriendly(boolean value) {
|
public void setFriendly(boolean value) {
|
||||||
this.friendly = value;
|
this.friendly = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPDDamage(int PDDamage) {
|
public void setPDDamage(int PDDamage) {
|
||||||
this.PDDamage = PDDamage;
|
this.PDDamage = PDDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMADamage(int MADamage) {
|
public void setMADamage(int MADamage) {
|
||||||
this.MADamage = MADamage;
|
this.MADamage = MADamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMDDamage(int MDDamage) {
|
public void setMDDamage(int MDDamage) {
|
||||||
this.MDDamage = MDDamage;
|
this.MDDamage = MDDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFixedStance() {
|
public int getFixedStance() {
|
||||||
return this.fixedStance;
|
return this.fixedStance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFixedStance(int stance) {
|
public void setFixedStance(int stance) {
|
||||||
this.fixedStance = stance;
|
this.fixedStance = stance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleMonsterStats copy() {
|
public MonsterStats copy() {
|
||||||
MapleMonsterStats copy = new MapleMonsterStats();
|
MonsterStats copy = new MonsterStats();
|
||||||
try {
|
try {
|
||||||
FieldCopyUtil.setFields(this, copy);
|
FieldCopyUtil.setFields(this, copy);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -353,14 +353,14 @@ public class MapleMonsterStats {
|
|||||||
try {
|
try {
|
||||||
Thread.sleep(10000);
|
Thread.sleep(10000);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FieldCopyUtil src: http://www.codesenior.com/en/tutorial/Java-Copy-Fields-From-One-Object-to-Another-Object-with-Reflection
|
// FieldCopyUtil src: http://www.codesenior.com/en/tutorial/Java-Copy-Fields-From-One-Object-to-Another-Object-with-Reflection
|
||||||
private static class FieldCopyUtil { // thanks to Codesenior dev team
|
private static class FieldCopyUtil { // thanks to Codesenior dev team
|
||||||
private static void setFields(Object from, Object to) {
|
private static void setFields(Object from, Object to) {
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
package tools.mapletools;
|
package tools.mapletools;
|
||||||
|
|
||||||
import server.life.MapleMonsterStats;
|
import server.life.MonsterStats;
|
||||||
import tools.Pair;
|
import tools.Pair;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
@@ -52,7 +52,7 @@ public class ArrowFetcher {
|
|||||||
|
|
||||||
private static final Map<Integer, Pair<Integer, Integer>> mobRange = new HashMap<>();
|
private static final Map<Integer, Pair<Integer, Integer>> mobRange = new HashMap<>();
|
||||||
private static PrintWriter printWriter;
|
private static PrintWriter printWriter;
|
||||||
private static Map<Integer, MapleMonsterStats> mobStats;
|
private static Map<Integer, MonsterStats> mobStats;
|
||||||
|
|
||||||
private static Pair<Integer, Integer> calcArrowRange(int level, boolean boss) {
|
private static Pair<Integer, Integer> calcArrowRange(int level, boolean boss) {
|
||||||
int minRange, maxRange;
|
int minRange, maxRange;
|
||||||
@@ -69,8 +69,8 @@ public class ArrowFetcher {
|
|||||||
private static void calcAllMobsArrowRange() {
|
private static void calcAllMobsArrowRange() {
|
||||||
System.out.print("Calculating range... ");
|
System.out.print("Calculating range... ");
|
||||||
|
|
||||||
for (Entry<Integer, MapleMonsterStats> mobStat : mobStats.entrySet()) {
|
for (Entry<Integer, MonsterStats> mobStat : mobStats.entrySet()) {
|
||||||
MapleMonsterStats mms = mobStat.getValue();
|
MonsterStats mms = mobStat.getValue();
|
||||||
Pair<Integer, Integer> arrowRange;
|
Pair<Integer, Integer> arrowRange;
|
||||||
|
|
||||||
arrowRange = calcArrowRange(mms.getLevel(), mms.isBoss());
|
arrowRange = calcArrowRange(mms.getLevel(), mms.isBoss());
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package tools.mapletools;
|
package tools.mapletools;
|
||||||
|
|
||||||
import server.life.MapleMonsterStats;
|
import server.life.MonsterStats;
|
||||||
import tools.Pair;
|
import tools.Pair;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -35,7 +35,7 @@ public class MesoFetcher {
|
|||||||
|
|
||||||
private static final Map<Integer, Pair<Integer, Integer>> mobRange = new HashMap<>();
|
private static final Map<Integer, Pair<Integer, Integer>> mobRange = new HashMap<>();
|
||||||
private static PrintWriter printWriter;
|
private static PrintWriter printWriter;
|
||||||
private static Map<Integer, MapleMonsterStats> mobStats;
|
private static Map<Integer, MonsterStats> mobStats;
|
||||||
|
|
||||||
private static Pair<Integer, Integer> calcMesoRange90(int level, boolean boss) {
|
private static Pair<Integer, Integer> calcMesoRange90(int level, boolean boss) {
|
||||||
int minRange, maxRange;
|
int minRange, maxRange;
|
||||||
@@ -76,8 +76,8 @@ public class MesoFetcher {
|
|||||||
private static void calcAllMobsMesoRange() {
|
private static void calcAllMobsMesoRange() {
|
||||||
System.out.print("Calculating range... ");
|
System.out.print("Calculating range... ");
|
||||||
|
|
||||||
for (Map.Entry<Integer, MapleMonsterStats> mobStat : mobStats.entrySet()) {
|
for (Map.Entry<Integer, MonsterStats> mobStat : mobStats.entrySet()) {
|
||||||
MapleMonsterStats mms = mobStat.getValue();
|
MonsterStats mms = mobStat.getValue();
|
||||||
Pair<Integer, Integer> mesoRange;
|
Pair<Integer, Integer> mesoRange;
|
||||||
|
|
||||||
if (mms.getLevel() < 90) {
|
if (mms.getLevel() < 90) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import server.life.ElementalEffectiveness;
|
|||||||
import server.life.LifeFactory.BanishInfo;
|
import server.life.LifeFactory.BanishInfo;
|
||||||
import server.life.LifeFactory.loseItem;
|
import server.life.LifeFactory.loseItem;
|
||||||
import server.life.LifeFactory.selfDestruction;
|
import server.life.LifeFactory.selfDestruction;
|
||||||
import server.life.MapleMonsterStats;
|
import server.life.MonsterStats;
|
||||||
import tools.Pair;
|
import tools.Pair;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -17,9 +17,9 @@ public class MonsterStatFetcher {
|
|||||||
private static final DataProvider data = DataProviderFactory.getDataProvider(WZFiles.MOB);
|
private static final DataProvider data = DataProviderFactory.getDataProvider(WZFiles.MOB);
|
||||||
private static final DataProvider stringDataWZ = DataProviderFactory.getDataProvider(WZFiles.STRING);
|
private static final DataProvider stringDataWZ = DataProviderFactory.getDataProvider(WZFiles.STRING);
|
||||||
private static final Data mobStringData = stringDataWZ.getData("Mob.img");
|
private static final Data mobStringData = stringDataWZ.getData("Mob.img");
|
||||||
private static final Map<Integer, MapleMonsterStats> monsterStats = new HashMap<>();
|
private static final Map<Integer, MonsterStats> monsterStats = new HashMap<>();
|
||||||
|
|
||||||
static Map<Integer, MapleMonsterStats> getAllMonsterStats() {
|
static Map<Integer, MonsterStats> getAllMonsterStats() {
|
||||||
DataDirectoryEntry root = data.getRoot();
|
DataDirectoryEntry root = data.getRoot();
|
||||||
|
|
||||||
System.out.print("Parsing mob stats... ");
|
System.out.print("Parsing mob stats... ");
|
||||||
@@ -36,7 +36,7 @@ public class MonsterStatFetcher {
|
|||||||
Integer mid = getMonsterId(fileName);
|
Integer mid = getMonsterId(fileName);
|
||||||
|
|
||||||
Data monsterInfoData = monsterData.getChildByPath("info");
|
Data monsterInfoData = monsterData.getChildByPath("info");
|
||||||
MapleMonsterStats stats = new MapleMonsterStats();
|
MonsterStats stats = new MonsterStats();
|
||||||
stats.setHp(DataTool.getIntConvert("maxHP", monsterInfoData));
|
stats.setHp(DataTool.getIntConvert("maxHP", monsterInfoData));
|
||||||
stats.setFriendly(DataTool.getIntConvert("damagedByMob", monsterInfoData, 0) == 1);
|
stats.setFriendly(DataTool.getIntConvert("damagedByMob", monsterInfoData, 0) == 1);
|
||||||
stats.setPADamage(DataTool.getIntConvert("PADamage", monsterInfoData));
|
stats.setPADamage(DataTool.getIntConvert("PADamage", monsterInfoData));
|
||||||
@@ -134,7 +134,7 @@ public class MonsterStatFetcher {
|
|||||||
return Integer.parseInt(fileName.substring(0, 7));
|
return Integer.parseInt(fileName.substring(0, 7));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void decodeElementalString(MapleMonsterStats stats, String elemAttr) {
|
private static void decodeElementalString(MonsterStats stats, String elemAttr) {
|
||||||
for (int i = 0; i < elemAttr.length(); i += 2) {
|
for (int i = 0; i < elemAttr.length(); i += 2) {
|
||||||
stats.setEffectiveness(Element.getFromChar(elemAttr.charAt(i)), ElementalEffectiveness.getByNumber(Integer.valueOf(String.valueOf(elemAttr.charAt(i + 1)))));
|
stats.setEffectiveness(Element.getFromChar(elemAttr.charAt(i)), ElementalEffectiveness.getByNumber(Integer.valueOf(String.valueOf(elemAttr.charAt(i + 1)))));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package tools.mapletools;
|
package tools.mapletools;
|
||||||
|
|
||||||
import server.life.MapleMonsterStats;
|
import server.life.MonsterStats;
|
||||||
import tools.Pair;
|
import tools.Pair;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -31,7 +31,7 @@ public class SkillbookChanceFetcher {
|
|||||||
private static final Map<Pair<Integer, Integer>, Integer> skillbookChances = new HashMap<>();
|
private static final Map<Pair<Integer, Integer>, Integer> skillbookChances = new HashMap<>();
|
||||||
|
|
||||||
private static PrintWriter printWriter;
|
private static PrintWriter printWriter;
|
||||||
private static Map<Integer, MapleMonsterStats> mobStats;
|
private static Map<Integer, MonsterStats> mobStats;
|
||||||
|
|
||||||
private static List<Map.Entry<Pair<Integer, Integer>, Integer>> sortedSkillbookChances() {
|
private static List<Map.Entry<Pair<Integer, Integer>, Integer>> sortedSkillbookChances() {
|
||||||
List<Map.Entry<Pair<Integer, Integer>, Integer>> skillbookChancesList = new ArrayList<>(skillbookChances.entrySet());
|
List<Map.Entry<Pair<Integer, Integer>, Integer>> skillbookChancesList = new ArrayList<>(skillbookChances.entrySet());
|
||||||
|
|||||||
Reference in New Issue
Block a user