Rename and clean up MapleJob
This commit is contained in:
@@ -156,7 +156,7 @@ public class Character extends AbstractCharacterObject {
|
||||
private MapleGuildCharacter mgc = null;
|
||||
private MaplePartyCharacter mpc = null;
|
||||
private Inventory[] inventory;
|
||||
private MapleJob job = MapleJob.BEGINNER;
|
||||
private Job job = Job.BEGINNER;
|
||||
private MapleMessenger messenger = null;
|
||||
private MapleMiniGame miniGame;
|
||||
private MapleRockPaperScissor rps;
|
||||
@@ -322,37 +322,37 @@ public class Character extends AbstractCharacterObject {
|
||||
setPosition(new Point(0, 0));
|
||||
}
|
||||
|
||||
private static MapleJob getJobStyleInternal(int jobid, byte opt) {
|
||||
private static Job getJobStyleInternal(int jobid, byte opt) {
|
||||
int jobtype = jobid / 100;
|
||||
|
||||
if (jobtype == MapleJob.WARRIOR.getId() / 100 || jobtype == MapleJob.DAWNWARRIOR1.getId() / 100 || jobtype == MapleJob.ARAN1.getId() / 100) {
|
||||
return (MapleJob.WARRIOR);
|
||||
} else if (jobtype == MapleJob.MAGICIAN.getId() / 100 || jobtype == MapleJob.BLAZEWIZARD1.getId() / 100 || jobtype == MapleJob.EVAN1.getId() / 100) {
|
||||
return (MapleJob.MAGICIAN);
|
||||
} else if (jobtype == MapleJob.BOWMAN.getId() / 100 || jobtype == MapleJob.WINDARCHER1.getId() / 100) {
|
||||
if (jobid / 10 == MapleJob.CROSSBOWMAN.getId() / 10) {
|
||||
return (MapleJob.CROSSBOWMAN);
|
||||
if (jobtype == Job.WARRIOR.getId() / 100 || jobtype == Job.DAWNWARRIOR1.getId() / 100 || jobtype == Job.ARAN1.getId() / 100) {
|
||||
return (Job.WARRIOR);
|
||||
} else if (jobtype == Job.MAGICIAN.getId() / 100 || jobtype == Job.BLAZEWIZARD1.getId() / 100 || jobtype == Job.EVAN1.getId() / 100) {
|
||||
return (Job.MAGICIAN);
|
||||
} else if (jobtype == Job.BOWMAN.getId() / 100 || jobtype == Job.WINDARCHER1.getId() / 100) {
|
||||
if (jobid / 10 == Job.CROSSBOWMAN.getId() / 10) {
|
||||
return (Job.CROSSBOWMAN);
|
||||
} else {
|
||||
return (MapleJob.BOWMAN);
|
||||
return (Job.BOWMAN);
|
||||
}
|
||||
} else if (jobtype == MapleJob.THIEF.getId() / 100 || jobtype == MapleJob.NIGHTWALKER1.getId() / 100) {
|
||||
return (MapleJob.THIEF);
|
||||
} else if (jobtype == MapleJob.PIRATE.getId() / 100 || jobtype == MapleJob.THUNDERBREAKER1.getId() / 100) {
|
||||
} else if (jobtype == Job.THIEF.getId() / 100 || jobtype == Job.NIGHTWALKER1.getId() / 100) {
|
||||
return (Job.THIEF);
|
||||
} else if (jobtype == Job.PIRATE.getId() / 100 || jobtype == Job.THUNDERBREAKER1.getId() / 100) {
|
||||
if (opt == (byte) 0x80) {
|
||||
return (MapleJob.BRAWLER);
|
||||
return (Job.BRAWLER);
|
||||
} else {
|
||||
return (MapleJob.GUNSLINGER);
|
||||
return (Job.GUNSLINGER);
|
||||
}
|
||||
}
|
||||
|
||||
return (MapleJob.BEGINNER);
|
||||
return (Job.BEGINNER);
|
||||
}
|
||||
|
||||
public MapleJob getJobStyle(byte opt) {
|
||||
public Job getJobStyle(byte opt) {
|
||||
return getJobStyleInternal(this.getJob().getId(), opt);
|
||||
}
|
||||
|
||||
public MapleJob getJobStyle() {
|
||||
public Job getJobStyle() {
|
||||
return getJobStyle((byte) ((this.getStr() > this.getDex()) ? 0x80 : 0x40));
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ public class Character extends AbstractCharacterObject {
|
||||
ret.int_ = 4;
|
||||
ret.luk = 4;
|
||||
ret.map = null;
|
||||
ret.job = MapleJob.BEGINNER;
|
||||
ret.job = Job.BEGINNER;
|
||||
ret.level = 1;
|
||||
ret.accountid = c.getAccID();
|
||||
ret.buddylist = new BuddyList(20);
|
||||
@@ -693,7 +693,7 @@ public class Character extends AbstractCharacterObject {
|
||||
|
||||
public int calculateMaxBaseDamage(int watk, WeaponType weapon) {
|
||||
int mainstat, secondarystat;
|
||||
if (getJob().isA(MapleJob.THIEF) && weapon == WeaponType.DAGGER_OTHER) {
|
||||
if (getJob().isA(Job.THIEF) && weapon == WeaponType.DAGGER_OTHER) {
|
||||
weapon = WeaponType.DAGGER_THIEVES;
|
||||
}
|
||||
|
||||
@@ -716,7 +716,7 @@ public class Character extends AbstractCharacterObject {
|
||||
if (weapon_item != null) {
|
||||
maxbasedamage = calculateMaxBaseDamage(watk, ii.getWeaponType(weapon_item.getItemId()));
|
||||
} else {
|
||||
if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
||||
if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||
double weapMulti = 3;
|
||||
if (job.getId() % 100 != 0) {
|
||||
weapMulti = 4.2;
|
||||
@@ -1040,7 +1040,7 @@ public class Character extends AbstractCharacterObject {
|
||||
}, 777);
|
||||
}
|
||||
|
||||
public synchronized void changeJob(MapleJob newJob) {
|
||||
public synchronized void changeJob(Job newJob) {
|
||||
if (newJob == null) {
|
||||
return;//the fuck you doing idiot!
|
||||
}
|
||||
@@ -1783,7 +1783,7 @@ public class Character extends AbstractCharacterObject {
|
||||
berserkSchedule.cancel(false);
|
||||
}
|
||||
final Character chr = this;
|
||||
if (job.equals(MapleJob.DARKKNIGHT)) {
|
||||
if (job.equals(Job.DARKKNIGHT)) {
|
||||
Skill BerserkX = SkillFactory.getSkill(DarkKnight.BERSERK);
|
||||
final int skilllevel = getSkillLevel(BerserkX);
|
||||
if (skilllevel > 0) {
|
||||
@@ -4227,7 +4227,7 @@ public class Character extends AbstractCharacterObject {
|
||||
recalcMseList.add(re.getValue().getLeft());
|
||||
}
|
||||
|
||||
boolean mageJob = this.getJobStyle() == MapleJob.MAGICIAN;
|
||||
boolean mageJob = this.getJobStyle() == Job.MAGICIAN;
|
||||
do {
|
||||
List<MapleStatEffect> mseList = recalcMseList;
|
||||
recalcMseList = new LinkedList<>();
|
||||
@@ -4564,7 +4564,7 @@ public class Character extends AbstractCharacterObject {
|
||||
updateLocalStats();
|
||||
}
|
||||
|
||||
private static int getJobMapChair(MapleJob job) {
|
||||
private static int getJobMapChair(Job job) {
|
||||
switch (job.getId() / 1000) {
|
||||
case 0:
|
||||
return Beginner.MAP_CHAIR;
|
||||
@@ -5143,7 +5143,7 @@ public class Character extends AbstractCharacterObject {
|
||||
return count;
|
||||
}
|
||||
|
||||
public MapleJob getJob() {
|
||||
public Job getJob() {
|
||||
return job;
|
||||
}
|
||||
|
||||
@@ -6220,7 +6220,7 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
}
|
||||
|
||||
private int getChangedJobSp(MapleJob newJob) {
|
||||
private int getChangedJobSp(Job newJob) {
|
||||
int curSp = getUsedSp(newJob) + getJobRemainingSp(newJob);
|
||||
int spGain = 0;
|
||||
int expectedSp = getJobLevelSp(level - 10, newJob, GameConstants.getJobBranch(newJob));
|
||||
@@ -6231,7 +6231,7 @@ public class Character extends AbstractCharacterObject {
|
||||
return getSpGain(spGain, curSp, newJob);
|
||||
}
|
||||
|
||||
private int getUsedSp(MapleJob job) {
|
||||
private int getUsedSp(Job job) {
|
||||
int jobId = job.getId();
|
||||
int spUsed = 0;
|
||||
|
||||
@@ -6245,21 +6245,21 @@ public class Character extends AbstractCharacterObject {
|
||||
return spUsed;
|
||||
}
|
||||
|
||||
private int getJobLevelSp(int level, MapleJob job, int jobBranch) {
|
||||
if (getJobStyleInternal(job.getId(), (byte) 0x40) == MapleJob.MAGICIAN) {
|
||||
private int getJobLevelSp(int level, Job job, int jobBranch) {
|
||||
if (getJobStyleInternal(job.getId(), (byte) 0x40) == Job.MAGICIAN) {
|
||||
level += 2; // starts earlier, level 8
|
||||
}
|
||||
|
||||
return 3 * level + GameConstants.getChangeJobSpUpgrade(jobBranch);
|
||||
}
|
||||
|
||||
private int getJobMaxSp(MapleJob job) {
|
||||
private int getJobMaxSp(Job job) {
|
||||
int jobBranch = GameConstants.getJobBranch(job);
|
||||
int jobRange = GameConstants.getJobUpgradeLevelRange(jobBranch);
|
||||
return getJobLevelSp(jobRange, job, jobBranch);
|
||||
}
|
||||
|
||||
private int getJobRemainingSp(MapleJob job) {
|
||||
private int getJobRemainingSp(Job job) {
|
||||
int skillBook = GameConstants.getSkillBook(job.getId());
|
||||
|
||||
int ret = 0;
|
||||
@@ -6270,12 +6270,12 @@ public class Character extends AbstractCharacterObject {
|
||||
return ret;
|
||||
}
|
||||
|
||||
private int getSpGain(int spGain, MapleJob job) {
|
||||
private int getSpGain(int spGain, Job job) {
|
||||
int curSp = getUsedSp(job) + getJobRemainingSp(job);
|
||||
return getSpGain(spGain, curSp, job);
|
||||
}
|
||||
|
||||
private int getSpGain(int spGain, int curSp, MapleJob job) {
|
||||
private int getSpGain(int spGain, int curSp, Job job) {
|
||||
int maxSp = getJobMaxSp(job);
|
||||
|
||||
spGain = Math.min(spGain, maxSp - curSp);
|
||||
@@ -6344,46 +6344,46 @@ public class Character extends AbstractCharacterObject {
|
||||
if (isBeginner) {
|
||||
addhp += Randomizer.rand(12, 16);
|
||||
addmp += Randomizer.rand(10, 12);
|
||||
} else if (job.isA(MapleJob.WARRIOR) || job.isA(MapleJob.DAWNWARRIOR1)) {
|
||||
} else if (job.isA(Job.WARRIOR) || job.isA(Job.DAWNWARRIOR1)) {
|
||||
improvingMaxHP = isCygnus() ? SkillFactory.getSkill(DawnWarrior.MAX_HP_INCREASE) : SkillFactory.getSkill(Warrior.IMPROVED_MAXHP);
|
||||
if (job.isA(MapleJob.CRUSADER)) {
|
||||
if (job.isA(Job.CRUSADER)) {
|
||||
improvingMaxMP = SkillFactory.getSkill(1210000);
|
||||
} else if (job.isA(MapleJob.DAWNWARRIOR2)) {
|
||||
} else if (job.isA(Job.DAWNWARRIOR2)) {
|
||||
improvingMaxMP = SkillFactory.getSkill(11110000);
|
||||
}
|
||||
improvingMaxHPLevel = getSkillLevel(improvingMaxHP);
|
||||
addhp += Randomizer.rand(24, 28);
|
||||
addmp += Randomizer.rand(4, 6);
|
||||
} else if (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.BLAZEWIZARD1)) {
|
||||
} else if (job.isA(Job.MAGICIAN) || job.isA(Job.BLAZEWIZARD1)) {
|
||||
improvingMaxMP = isCygnus() ? SkillFactory.getSkill(BlazeWizard.INCREASING_MAX_MP) : SkillFactory.getSkill(Magician.IMPROVED_MAX_MP_INCREASE);
|
||||
improvingMaxMPLevel = getSkillLevel(improvingMaxMP);
|
||||
addhp += Randomizer.rand(10, 14);
|
||||
addmp += Randomizer.rand(22, 24);
|
||||
} else if (job.isA(MapleJob.BOWMAN) || job.isA(MapleJob.THIEF) || (job.getId() > 1299 && job.getId() < 1500)) {
|
||||
} else if (job.isA(Job.BOWMAN) || job.isA(Job.THIEF) || (job.getId() > 1299 && job.getId() < 1500)) {
|
||||
addhp += Randomizer.rand(20, 24);
|
||||
addmp += Randomizer.rand(14, 16);
|
||||
} else if (job.isA(MapleJob.GM)) {
|
||||
} else if (job.isA(Job.GM)) {
|
||||
addhp += 30000;
|
||||
addmp += 30000;
|
||||
} else if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
||||
} else if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||
improvingMaxHP = isCygnus() ? SkillFactory.getSkill(ThunderBreaker.IMPROVE_MAX_HP) : SkillFactory.getSkill(Brawler.IMPROVE_MAX_HP);
|
||||
improvingMaxHPLevel = getSkillLevel(improvingMaxHP);
|
||||
addhp += Randomizer.rand(22, 28);
|
||||
addmp += Randomizer.rand(18, 23);
|
||||
} else if (job.isA(MapleJob.ARAN1)) {
|
||||
} else if (job.isA(Job.ARAN1)) {
|
||||
addhp += Randomizer.rand(44, 48);
|
||||
int aids = Randomizer.rand(4, 8);
|
||||
addmp += aids + Math.floor(aids * 0.1);
|
||||
}
|
||||
if (improvingMaxHPLevel > 0 && (job.isA(MapleJob.WARRIOR) || job.isA(MapleJob.PIRATE) || job.isA(MapleJob.DAWNWARRIOR1) || job.isA(MapleJob.THUNDERBREAKER1))) {
|
||||
if (improvingMaxHPLevel > 0 && (job.isA(Job.WARRIOR) || job.isA(Job.PIRATE) || job.isA(Job.DAWNWARRIOR1) || job.isA(Job.THUNDERBREAKER1))) {
|
||||
addhp += improvingMaxHP.getEffect(improvingMaxHPLevel).getX();
|
||||
}
|
||||
if (improvingMaxMPLevel > 0 && (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.CRUSADER) || job.isA(MapleJob.BLAZEWIZARD1))) {
|
||||
if (improvingMaxMPLevel > 0 && (job.isA(Job.MAGICIAN) || job.isA(Job.CRUSADER) || job.isA(Job.BLAZEWIZARD1))) {
|
||||
addmp += improvingMaxMP.getEffect(improvingMaxMPLevel).getX();
|
||||
}
|
||||
|
||||
if (YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||
if (getJobStyle() == MapleJob.MAGICIAN) {
|
||||
if (getJobStyle() == Job.MAGICIAN) {
|
||||
addmp += localint_ / 20;
|
||||
} else {
|
||||
addmp += localint_ / 10;
|
||||
@@ -6855,7 +6855,7 @@ public class Character extends AbstractCharacterObject {
|
||||
// skipping pets, probably unneeded here
|
||||
|
||||
ret.level = rs.getInt("level");
|
||||
ret.job = MapleJob.getById(rs.getInt("job"));
|
||||
ret.job = Job.getById(rs.getInt("job"));
|
||||
ret.str = rs.getInt("str");
|
||||
ret.dex = rs.getInt("dex");
|
||||
ret.int_ = rs.getInt("int");
|
||||
@@ -6994,7 +6994,7 @@ public class Character extends AbstractCharacterObject {
|
||||
ret.setGMLevel(rs.getInt("gm"));
|
||||
ret.skinColor = MapleSkinColor.getById(rs.getInt("skincolor"));
|
||||
ret.gender = rs.getInt("gender");
|
||||
ret.job = MapleJob.getById(rs.getInt("job"));
|
||||
ret.job = Job.getById(rs.getInt("job"));
|
||||
ret.finishedDojoTutorial = rs.getInt("finishedDojoTutorial") == 1;
|
||||
ret.vanquisherKills = rs.getInt("vanquisherKills");
|
||||
ret.omokwins = rs.getInt("omokwins");
|
||||
@@ -7580,7 +7580,7 @@ public class Character extends AbstractCharacterObject {
|
||||
message("You have used a safety charm, so your EXP points have not been decreased.");
|
||||
InventoryManipulator.removeById(client, ItemConstants.getInventoryType(charmID[i]), charmID[i], 1, true, false);
|
||||
usedSafetyCharm = true;
|
||||
} else if (getJob() != MapleJob.BEGINNER) { //Hmm...
|
||||
} else if (getJob() != Job.BEGINNER) { //Hmm...
|
||||
if (!FieldLimit.NO_EXP_DECREASE.check(getMap().getFieldLimit())) { // thanks Conrad for noticing missing FieldLimit check
|
||||
int XPdummy = ExpTable.getExpNeededForLevel(getLevel());
|
||||
|
||||
@@ -7787,11 +7787,11 @@ public class Character extends AbstractCharacterObject {
|
||||
localint_ += getInt() * mwarr / 100;
|
||||
localluk += getLuk() * mwarr / 100;
|
||||
}
|
||||
if (job.isA(MapleJob.BOWMAN)) {
|
||||
if (job.isA(Job.BOWMAN)) {
|
||||
Skill expert = null;
|
||||
if (job.isA(MapleJob.MARKSMAN)) {
|
||||
if (job.isA(Job.MARKSMAN)) {
|
||||
expert = SkillFactory.getSkill(3220004);
|
||||
} else if (job.isA(MapleJob.BOWMASTER)) {
|
||||
} else if (job.isA(Job.BOWMASTER)) {
|
||||
expert = SkillFactory.getSkill(3120005);
|
||||
}
|
||||
if (expert != null) {
|
||||
@@ -7828,7 +7828,7 @@ public class Character extends AbstractCharacterObject {
|
||||
localmagic += blessing * 2;
|
||||
}
|
||||
|
||||
if (job.isA(MapleJob.THIEF) || job.isA(MapleJob.BOWMAN) || job.isA(MapleJob.PIRATE) || job.isA(MapleJob.NIGHTWALKER1) || job.isA(MapleJob.WINDARCHER1)) {
|
||||
if (job.isA(Job.THIEF) || job.isA(Job.BOWMAN) || job.isA(Job.PIRATE) || job.isA(Job.NIGHTWALKER1) || job.isA(Job.WINDARCHER1)) {
|
||||
Item weapon_item = getInventory(InventoryType.EQUIPPED).getItem((short) -11);
|
||||
if (weapon_item != null) {
|
||||
WeaponType weapon = ii.getWeaponType(weapon_item.getItemId());
|
||||
@@ -9152,7 +9152,7 @@ public class Character extends AbstractCharacterObject {
|
||||
this.itemEffect = itemEffect;
|
||||
}
|
||||
|
||||
public void setJob(MapleJob job) {
|
||||
public void setJob(Job job) {
|
||||
this.job = job;
|
||||
}
|
||||
|
||||
@@ -11178,7 +11178,7 @@ public class Character extends AbstractCharacterObject {
|
||||
return;
|
||||
}
|
||||
addReborns();
|
||||
changeJob(MapleJob.BEGINNER);
|
||||
changeJob(Job.BEGINNER);
|
||||
setLevel(0);
|
||||
levelUp(true);
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ public class Family {
|
||||
family = new Family(familyid, world);
|
||||
Server.getInstance().getWorld(world).addFamily(familyid, family);
|
||||
}
|
||||
FamilyEntry familyEntry = new FamilyEntry(family, cid, name, level, MapleJob.getById(jobID));
|
||||
FamilyEntry familyEntry = new FamilyEntry(family, cid, name, level, Job.getById(jobID));
|
||||
family.addEntry(familyEntry);
|
||||
if (seniorid <= 0) {
|
||||
family.setLeader(familyEntry);
|
||||
|
||||
@@ -56,9 +56,9 @@ public class FamilyEntry {
|
||||
// cached values for offline players
|
||||
private String charName;
|
||||
private int level;
|
||||
private MapleJob job;
|
||||
private Job job;
|
||||
|
||||
public FamilyEntry(Family family, int characterID, String charName, int level, MapleJob job) {
|
||||
public FamilyEntry(Family family, int characterID, String charName, int level, Job job) {
|
||||
this.family = family;
|
||||
this.characterID = characterID;
|
||||
this.charName = charName;
|
||||
@@ -247,7 +247,7 @@ public class FamilyEntry {
|
||||
}
|
||||
}
|
||||
|
||||
public MapleJob getJob() {
|
||||
public Job getJob() {
|
||||
Character chr = character;
|
||||
if (chr != null) {
|
||||
return chr.getJob();
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
package client;
|
||||
|
||||
public enum MapleJob {
|
||||
public enum Job {
|
||||
BEGINNER(0),
|
||||
|
||||
WARRIOR(100),
|
||||
@@ -58,17 +58,17 @@ public enum MapleJob {
|
||||
|
||||
LEGEND(2000), EVAN(2001),
|
||||
ARAN1(2100), ARAN2(2110), ARAN3(2111), ARAN4(2112),
|
||||
|
||||
|
||||
EVAN1(2200), EVAN2(2210), EVAN3(2211), EVAN4(2212), EVAN5(2213), EVAN6(2214),
|
||||
EVAN7(2215), EVAN8(2216), EVAN9(2217), EVAN10(2218);
|
||||
|
||||
final int jobid;
|
||||
final static int maxId = 22; // maxId = (EVAN / 100);
|
||||
|
||||
private MapleJob(int id) {
|
||||
|
||||
Job(int id) {
|
||||
jobid = id;
|
||||
}
|
||||
|
||||
|
||||
public static int getMax() {
|
||||
return maxId;
|
||||
}
|
||||
@@ -77,8 +77,8 @@ public enum MapleJob {
|
||||
return jobid;
|
||||
}
|
||||
|
||||
public static MapleJob getById(int id) {
|
||||
for (MapleJob l : MapleJob.values()) {
|
||||
public static Job getById(int id) {
|
||||
for (Job l : Job.values()) {
|
||||
if (l.getId() == id) {
|
||||
return l;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public enum MapleJob {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static MapleJob getBy5ByteEncoding(int encoded) {
|
||||
public static Job getBy5ByteEncoding(int encoded) {
|
||||
switch (encoded) {
|
||||
case 2:
|
||||
return WARRIOR;
|
||||
@@ -114,12 +114,12 @@ public enum MapleJob {
|
||||
return BEGINNER;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isA(MapleJob basejob) { // thanks Steve (kaito1410) for pointing out an improvement here
|
||||
|
||||
public boolean isA(Job basejob) { // thanks Steve (kaito1410) for pointing out an improvement here
|
||||
int basebranch = basejob.getId() / 10;
|
||||
return (getId() / 10 == basebranch && getId() >= basejob.getId()) || (basebranch % 10 == 0 && getId() / 100 == basejob.getId() / 100);
|
||||
}
|
||||
|
||||
|
||||
public int getJobNiche() {
|
||||
return (jobid / 100) % 10;
|
||||
|
||||
@@ -25,7 +25,7 @@ package client.command.commands.gm2;
|
||||
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.command.Command;
|
||||
|
||||
public class JobCommand extends Command {
|
||||
@@ -43,7 +43,7 @@ public class JobCommand extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
player.changeJob(MapleJob.getById(jobid));
|
||||
player.changeJob(Job.getById(jobid));
|
||||
player.equipChanged();
|
||||
} else if (params.length == 2) {
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
@@ -55,7 +55,7 @@ public class JobCommand extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
victim.changeJob(MapleJob.getById(jobid));
|
||||
victim.changeJob(Job.getById(jobid));
|
||||
player.equipChanged();
|
||||
} else {
|
||||
player.message("Player '" + params[0] + "' could not be found.");
|
||||
|
||||
@@ -48,7 +48,7 @@ public class MaxSkillCommand extends Command {
|
||||
} catch (NullPointerException npe) { }
|
||||
}
|
||||
|
||||
if (player.getJob().isA(MapleJob.ARAN1) || player.getJob().isA(MapleJob.LEGEND)) {
|
||||
if (player.getJob().isA(Job.ARAN1) || player.getJob().isA(Job.LEGEND)) {
|
||||
Skill skill = SkillFactory.getSkill(5001005);
|
||||
player.changeSkillLevel(skill, (byte) -1, -1, -1);
|
||||
} else {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ResetSkillCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getJob().isA(MapleJob.ARAN1) || player.getJob().isA(MapleJob.LEGEND)) {
|
||||
if (player.getJob().isA(Job.ARAN1) || player.getJob().isA(Job.LEGEND)) {
|
||||
Skill skill = SkillFactory.getSkill(5001005);
|
||||
player.changeSkillLevel(skill, (byte) -1, -1, -1);
|
||||
} else {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
package client.creator;
|
||||
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.Skill;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
@@ -37,7 +37,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class CharacterFactoryRecipe {
|
||||
private MapleJob job;
|
||||
private Job job;
|
||||
private int level, map, top, bottom, shoes, weapon;
|
||||
private int str = 4, dex = 4, int_ = 4, luk = 4;
|
||||
private int maxHp = 50, maxMp = 5;
|
||||
@@ -48,7 +48,7 @@ public class CharacterFactoryRecipe {
|
||||
private List<Pair<Item, InventoryType>> itemsWithType = new LinkedList<>();
|
||||
private Map<InventoryType, AtomicInteger> runningTypePosition = new LinkedHashMap<>();
|
||||
|
||||
public CharacterFactoryRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
public CharacterFactoryRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
this.job = job;
|
||||
this.level = level;
|
||||
this.map = map;
|
||||
@@ -121,7 +121,7 @@ public class CharacterFactoryRecipe {
|
||||
itemsWithType.add(new Pair<>(new Item(itemid, (short) p.getAndIncrement(), (short) quantity), itemType));
|
||||
}
|
||||
|
||||
public MapleJob getJob() {
|
||||
public Job getJob() {
|
||||
return job;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package client.creator.novice;
|
||||
|
||||
import client.Client;
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
@@ -31,7 +31,7 @@ import client.inventory.InventoryType;
|
||||
*/
|
||||
public class BeginnerCreator extends CharacterFactory {
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
giveItem(recipe, 4161001, 1, InventoryType.ETC);
|
||||
return recipe;
|
||||
@@ -42,7 +42,7 @@ public class BeginnerCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int top, int bottom, int shoes, int weapon, int gender) {
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.BEGINNER, 1, 10000, top, bottom, shoes, weapon));
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.BEGINNER, 1, 10000, top, bottom, shoes, weapon));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package client.creator.novice;
|
||||
|
||||
import client.Client;
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
@@ -31,7 +31,7 @@ import client.inventory.InventoryType;
|
||||
*/
|
||||
public class LegendCreator extends CharacterFactory {
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
giveItem(recipe, 4161048, 1, InventoryType.ETC);
|
||||
return recipe;
|
||||
@@ -42,7 +42,7 @@ public class LegendCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int top, int bottom, int shoes, int weapon, int gender) {
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.LEGEND, 1, 914000000, top, bottom, shoes, weapon));
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.LEGEND, 1, 914000000, top, bottom, shoes, weapon));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package client.creator.novice;
|
||||
|
||||
import client.Client;
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
@@ -31,7 +31,7 @@ import client.inventory.InventoryType;
|
||||
*/
|
||||
public class NoblesseCreator extends CharacterFactory {
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
giveItem(recipe, 4161047, 1, InventoryType.ETC);
|
||||
return recipe;
|
||||
@@ -42,7 +42,7 @@ public class NoblesseCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int top, int bottom, int shoes, int weapon, int gender) {
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.NOBLESSE, 1, 130030000, top, bottom, shoes, weapon));
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.NOBLESSE, 1, 130030000, top, bottom, shoes, weapon));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.Client;
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
@@ -36,7 +36,7 @@ public class BowmanCreator extends CharacterFactory {
|
||||
private static int[] weapons = {1452005, 1462000};
|
||||
private static int[] startingHpMp = {797, 404};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
@@ -70,6 +70,6 @@ public class BowmanCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.BOWMAN, 30, 100000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.BOWMAN, 30, 100000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.Client;
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.creator.CharacterFactory;
|
||||
@@ -40,7 +40,7 @@ public class MagicianCreator extends CharacterFactory {
|
||||
private static int[] startingHpMp = {405, 729};
|
||||
private static int[] mpGain = {0, 40, 80, 118, 156, 194, 230, 266, 302, 336, 370};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon, int gender, int improveSp) {
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon, int gender, int improveSp) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
@@ -93,6 +93,6 @@ public class MagicianCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.MAGICIAN, 30, 101000000, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.MAGICIAN, 30, 101000000, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.Client;
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
@@ -36,7 +36,7 @@ public class PirateCreator extends CharacterFactory {
|
||||
private static int[] weapons = {1482004, 1492004};
|
||||
private static int[] startingHpMp = {846, 503};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
@@ -74,6 +74,6 @@ public class PirateCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.PIRATE, 30, 120000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.PIRATE, 30, 120000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.Client;
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
@@ -36,7 +36,7 @@ public class ThiefCreator extends CharacterFactory {
|
||||
private static int[] weapons = {1472008, 1332012};
|
||||
private static int[] startingHpMp = {794, 407};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
@@ -72,6 +72,6 @@ public class ThiefCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.THIEF, 30, 103000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.THIEF, 30, 103000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.Client;
|
||||
import client.MapleJob;
|
||||
import client.Job;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.creator.CharacterFactory;
|
||||
@@ -40,7 +40,7 @@ public class WarriorCreator extends CharacterFactory {
|
||||
private static int[] startingHpMp = {905, 208};
|
||||
private static int[] hpGain = {0, 72, 144, 212, 280, 348, 412, 476, 540, 600, 660};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon, int gender, int improveSp) {
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon, int gender, int improveSp) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
@@ -93,6 +93,6 @@ public class WarriorCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.WARRIOR, 30, 102000000, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.WARRIOR, 30, 102000000, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class AssignAPProcessor {
|
||||
//c.getPlayer().message("SDL: s" + eqpStr + " d" + eqpDex + " l" + eqpLuk + " BASE STATS --> STR: " + chr.getStr() + " DEX: " + chr.getDex() + " INT: " + chr.getInt() + " LUK: " + chr.getLuk());
|
||||
//c.getPlayer().message("SUM EQUIP STATS -> STR: " + str + " DEX: " + dex + " LUK: " + luk + " INT: " + int_);
|
||||
|
||||
MapleJob stance = c.getPlayer().getJobStyle(opt);
|
||||
Job stance = c.getPlayer().getJobStyle(opt);
|
||||
int prStat = 0, scStat = 0, trStat = 0, temp, tempAp = remainingAp, CAP;
|
||||
if (tempAp < 1) return;
|
||||
|
||||
@@ -413,8 +413,8 @@ public class AssignAPProcessor {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static MapleStat getQuaternaryStat(MapleJob stance) {
|
||||
if(stance != MapleJob.MAGICIAN) return MapleStat.INT;
|
||||
private static MapleStat getQuaternaryStat(Job stance) {
|
||||
if(stance != Job.MAGICIAN) return MapleStat.INT;
|
||||
return MapleStat.STR;
|
||||
}
|
||||
|
||||
@@ -520,14 +520,14 @@ public class AssignAPProcessor {
|
||||
|
||||
int mp = player.getMaxMp();
|
||||
int level = player.getLevel();
|
||||
MapleJob job = player.getJob();
|
||||
Job job = player.getJob();
|
||||
|
||||
boolean canWash = true;
|
||||
if (job.isA(MapleJob.SPEARMAN) && mp < 4 * level + 156) {
|
||||
if (job.isA(Job.SPEARMAN) && mp < 4 * level + 156) {
|
||||
canWash = false;
|
||||
} else if ((job.isA(MapleJob.FIGHTER) || job.isA(MapleJob.ARAN1)) && mp < 4 * level + 56) {
|
||||
} else if ((job.isA(Job.FIGHTER) || job.isA(Job.ARAN1)) && mp < 4 * level + 56) {
|
||||
canWash = false;
|
||||
} else if (job.isA(MapleJob.THIEF) && job.getId() % 100 > 0 && mp < level * 14 - 4) {
|
||||
} else if (job.isA(Job.THIEF) && job.getId() % 100 > 0 && mp < level * 14 - 4) {
|
||||
canWash = false;
|
||||
} else if (mp < level * 14 + 148) {
|
||||
canWash = false;
|
||||
@@ -619,12 +619,12 @@ public class AssignAPProcessor {
|
||||
}
|
||||
|
||||
private static int calcHpChange(Character player, boolean usedAPReset) {
|
||||
MapleJob job = player.getJob();
|
||||
Job job = player.getJob();
|
||||
int MaxHP = 0;
|
||||
|
||||
if (job.isA(MapleJob.WARRIOR) || job.isA(MapleJob.DAWNWARRIOR1)) {
|
||||
if (job.isA(Job.WARRIOR) || job.isA(Job.DAWNWARRIOR1)) {
|
||||
if(!usedAPReset) {
|
||||
Skill increaseHP = SkillFactory.getSkill(job.isA(MapleJob.DAWNWARRIOR1) ? DawnWarrior.MAX_HP_INCREASE : Warrior.IMPROVED_MAXHP);
|
||||
Skill increaseHP = SkillFactory.getSkill(job.isA(Job.DAWNWARRIOR1) ? DawnWarrior.MAX_HP_INCREASE : Warrior.IMPROVED_MAXHP);
|
||||
int sLvl = player.getSkillLevel(increaseHP);
|
||||
|
||||
if(sLvl > 0)
|
||||
@@ -640,7 +640,7 @@ public class AssignAPProcessor {
|
||||
} else {
|
||||
MaxHP += 20;
|
||||
}
|
||||
} else if(job.isA(MapleJob.ARAN1)) {
|
||||
} else if(job.isA(Job.ARAN1)) {
|
||||
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||
if (usedAPReset) {
|
||||
MaxHP += 20;
|
||||
@@ -650,7 +650,7 @@ public class AssignAPProcessor {
|
||||
} else {
|
||||
MaxHP += 28;
|
||||
}
|
||||
} else if (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.BLAZEWIZARD1)) {
|
||||
} else if (job.isA(Job.MAGICIAN) || job.isA(Job.BLAZEWIZARD1)) {
|
||||
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||
if (usedAPReset) {
|
||||
MaxHP += 6;
|
||||
@@ -660,7 +660,7 @@ public class AssignAPProcessor {
|
||||
} else {
|
||||
MaxHP += 6;
|
||||
}
|
||||
} else if (job.isA(MapleJob.THIEF) || job.isA(MapleJob.NIGHTWALKER1)) {
|
||||
} else if (job.isA(Job.THIEF) || job.isA(Job.NIGHTWALKER1)) {
|
||||
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||
if (usedAPReset) {
|
||||
MaxHP += 16;
|
||||
@@ -670,7 +670,7 @@ public class AssignAPProcessor {
|
||||
} else {
|
||||
MaxHP += 16;
|
||||
}
|
||||
} else if(job.isA(MapleJob.BOWMAN) || job.isA(MapleJob.WINDARCHER1)) {
|
||||
} else if(job.isA(Job.BOWMAN) || job.isA(Job.WINDARCHER1)) {
|
||||
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||
if (usedAPReset) {
|
||||
MaxHP += 16;
|
||||
@@ -680,9 +680,9 @@ public class AssignAPProcessor {
|
||||
} else {
|
||||
MaxHP += 16;
|
||||
}
|
||||
} else if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
||||
} else if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||
if(!usedAPReset) {
|
||||
Skill increaseHP = SkillFactory.getSkill(job.isA(MapleJob.PIRATE) ? Brawler.IMPROVE_MAX_HP : ThunderBreaker.IMPROVE_MAX_HP);
|
||||
Skill increaseHP = SkillFactory.getSkill(job.isA(Job.PIRATE) ? Brawler.IMPROVE_MAX_HP : ThunderBreaker.IMPROVE_MAX_HP);
|
||||
int sLvl = player.getSkillLevel(increaseHP);
|
||||
|
||||
if(sLvl > 0)
|
||||
@@ -712,10 +712,10 @@ public class AssignAPProcessor {
|
||||
}
|
||||
|
||||
private static int calcMpChange(Character player, boolean usedAPReset) {
|
||||
MapleJob job = player.getJob();
|
||||
Job job = player.getJob();
|
||||
int MaxMP = 0;
|
||||
|
||||
if (job.isA(MapleJob.WARRIOR) || job.isA(MapleJob.DAWNWARRIOR1) || job.isA(MapleJob.ARAN1)) {
|
||||
if (job.isA(Job.WARRIOR) || job.isA(Job.DAWNWARRIOR1) || job.isA(Job.ARAN1)) {
|
||||
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||
if(!usedAPReset) {
|
||||
MaxMP += (Randomizer.rand(2, 4) + (player.getInt() / 10));
|
||||
@@ -725,9 +725,9 @@ public class AssignAPProcessor {
|
||||
} else {
|
||||
MaxMP += 3;
|
||||
}
|
||||
} else if (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.BLAZEWIZARD1)) {
|
||||
} else if (job.isA(Job.MAGICIAN) || job.isA(Job.BLAZEWIZARD1)) {
|
||||
if(!usedAPReset) {
|
||||
Skill increaseMP = SkillFactory.getSkill(job.isA(MapleJob.BLAZEWIZARD1) ? BlazeWizard.INCREASING_MAX_MP : Magician.IMPROVED_MAX_MP_INCREASE);
|
||||
Skill increaseMP = SkillFactory.getSkill(job.isA(Job.BLAZEWIZARD1) ? BlazeWizard.INCREASING_MAX_MP : Magician.IMPROVED_MAX_MP_INCREASE);
|
||||
int sLvl = player.getSkillLevel(increaseMP);
|
||||
|
||||
if(sLvl > 0)
|
||||
@@ -743,7 +743,7 @@ public class AssignAPProcessor {
|
||||
} else {
|
||||
MaxMP += 18;
|
||||
}
|
||||
} else if (job.isA(MapleJob.BOWMAN) || job.isA(MapleJob.WINDARCHER1)) {
|
||||
} else if (job.isA(Job.BOWMAN) || job.isA(Job.WINDARCHER1)) {
|
||||
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||
if(!usedAPReset) {
|
||||
MaxMP += (Randomizer.rand(6, 8) + (player.getInt() / 10));
|
||||
@@ -753,7 +753,7 @@ public class AssignAPProcessor {
|
||||
} else {
|
||||
MaxMP += 10;
|
||||
}
|
||||
} else if(job.isA(MapleJob.THIEF) || job.isA(MapleJob.NIGHTWALKER1)) {
|
||||
} else if(job.isA(Job.THIEF) || job.isA(Job.NIGHTWALKER1)) {
|
||||
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||
if(!usedAPReset) {
|
||||
MaxMP += (Randomizer.rand(6, 8) + (player.getInt() / 10));
|
||||
@@ -763,7 +763,7 @@ public class AssignAPProcessor {
|
||||
} else {
|
||||
MaxMP += 10;
|
||||
}
|
||||
} else if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
||||
} else if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||
if(!usedAPReset) {
|
||||
MaxMP += (Randomizer.rand(7, 9) + (player.getInt() / 10));
|
||||
@@ -788,18 +788,18 @@ public class AssignAPProcessor {
|
||||
return MaxMP;
|
||||
}
|
||||
|
||||
private static int takeHp(MapleJob job) {
|
||||
private static int takeHp(Job job) {
|
||||
int MaxHP = 0;
|
||||
|
||||
if (job.isA(MapleJob.WARRIOR) || job.isA(MapleJob.DAWNWARRIOR1) || job.isA(MapleJob.ARAN1)) {
|
||||
if (job.isA(Job.WARRIOR) || job.isA(Job.DAWNWARRIOR1) || job.isA(Job.ARAN1)) {
|
||||
MaxHP += 54;
|
||||
} else if (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.BLAZEWIZARD1)) {
|
||||
} else if (job.isA(Job.MAGICIAN) || job.isA(Job.BLAZEWIZARD1)) {
|
||||
MaxHP += 10;
|
||||
} else if (job.isA(MapleJob.THIEF) || job.isA(MapleJob.NIGHTWALKER1)) {
|
||||
} else if (job.isA(Job.THIEF) || job.isA(Job.NIGHTWALKER1)) {
|
||||
MaxHP += 20;
|
||||
} else if(job.isA(MapleJob.BOWMAN) || job.isA(MapleJob.WINDARCHER1)) {
|
||||
} else if(job.isA(Job.BOWMAN) || job.isA(Job.WINDARCHER1)) {
|
||||
MaxHP += 20;
|
||||
} else if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
||||
} else if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||
MaxHP += 42;
|
||||
} else {
|
||||
MaxHP += 12;
|
||||
@@ -808,18 +808,18 @@ public class AssignAPProcessor {
|
||||
return MaxHP;
|
||||
}
|
||||
|
||||
private static int takeMp(MapleJob job) {
|
||||
private static int takeMp(Job job) {
|
||||
int MaxMP = 0;
|
||||
|
||||
if (job.isA(MapleJob.WARRIOR) || job.isA(MapleJob.DAWNWARRIOR1) || job.isA(MapleJob.ARAN1)) {
|
||||
if (job.isA(Job.WARRIOR) || job.isA(Job.DAWNWARRIOR1) || job.isA(Job.ARAN1)) {
|
||||
MaxMP += 4;
|
||||
} else if (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.BLAZEWIZARD1)) {
|
||||
} else if (job.isA(Job.MAGICIAN) || job.isA(Job.BLAZEWIZARD1)) {
|
||||
MaxMP += 31;
|
||||
} else if (job.isA(MapleJob.BOWMAN) || job.isA(MapleJob.WINDARCHER1)) {
|
||||
} else if (job.isA(Job.BOWMAN) || job.isA(Job.WINDARCHER1)) {
|
||||
MaxMP += 12;
|
||||
} else if(job.isA(MapleJob.THIEF) || job.isA(MapleJob.NIGHTWALKER1)) {
|
||||
} else if(job.isA(Job.THIEF) || job.isA(Job.NIGHTWALKER1)) {
|
||||
MaxMP += 12;
|
||||
} else if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
||||
} else if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||
MaxMP += 16;
|
||||
} else {
|
||||
MaxMP += 8;
|
||||
|
||||
Reference in New Issue
Block a user