Rename and clean up MapleJob
This commit is contained in:
@@ -25,11 +25,11 @@ function end(mode, type, selection) {
|
|||||||
var talkStr = "Okay, now choose the scroll of your liking ... The odds of winning are 10% each. \r\n\r\n#rSELECT A ITEM\r\n#b";
|
var talkStr = "Okay, now choose the scroll of your liking ... The odds of winning are 10% each. \r\n\r\n#rSELECT A ITEM\r\n#b";
|
||||||
stance = qm.getPlayer().getJobStyle();
|
stance = qm.getPlayer().getJobStyle();
|
||||||
|
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
if(stance == MapleJob.WARRIOR || stance == MapleJob.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302);
|
if(stance == Job.WARRIOR || stance == Job.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302);
|
||||||
else if(stance == MapleJob.MAGICIAN) vecItem = new Array(2043702, 2043802);
|
else if(stance == Job.MAGICIAN) vecItem = new Array(2043702, 2043802);
|
||||||
else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) vecItem = new Array(2044502, 2044602);
|
else if(stance == Job.BOWMAN || stance == Job.CROSSBOWMAN) vecItem = new Array(2044502, 2044602);
|
||||||
else if(stance == MapleJob.THIEF) vecItem = new Array(2043302, 2044702);
|
else if(stance == Job.THIEF) vecItem = new Array(2043302, 2044702);
|
||||||
else vecItem = new Array(2044802, 2044902);
|
else vecItem = new Array(2044802, 2044902);
|
||||||
|
|
||||||
for (var i = 0; i < vecItem.length; i++)
|
for (var i = 0; i < vecItem.length; i++)
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ function end(mode, type, selection) {
|
|||||||
|
|
||||||
qm.gainItem(1302077, 1);
|
qm.gainItem(1302077, 1);
|
||||||
qm.gainItem(1142066, 1);
|
qm.gainItem(1142066, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.changeJob(MapleJob.DAWNWARRIOR1);
|
qm.changeJob(Job.DAWNWARRIOR1);
|
||||||
qm.getPlayer().resetStats();
|
qm.getPlayer().resetStats();
|
||||||
}
|
}
|
||||||
qm.forceCompleteQuest();
|
qm.forceCompleteQuest();
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ function end(mode, type, selection) {
|
|||||||
|
|
||||||
qm.gainItem(1372043, 1);
|
qm.gainItem(1372043, 1);
|
||||||
qm.gainItem(1142066, 1);
|
qm.gainItem(1142066, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.changeJob(MapleJob.BLAZEWIZARD1);
|
qm.changeJob(Job.BLAZEWIZARD1);
|
||||||
qm.getPlayer().resetStats();
|
qm.getPlayer().resetStats();
|
||||||
}
|
}
|
||||||
qm.forceCompleteQuest();
|
qm.forceCompleteQuest();
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ function end(mode, type, selection) {
|
|||||||
qm.gainItem(2060000, 2000);
|
qm.gainItem(2060000, 2000);
|
||||||
qm.gainItem(1452051, 1);
|
qm.gainItem(1452051, 1);
|
||||||
qm.gainItem(1142066, 1);
|
qm.gainItem(1142066, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.changeJob(MapleJob.WINDARCHER1);
|
qm.changeJob(Job.WINDARCHER1);
|
||||||
qm.getPlayer().resetStats();
|
qm.getPlayer().resetStats();
|
||||||
}
|
}
|
||||||
qm.forceCompleteQuest();
|
qm.forceCompleteQuest();
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ function end(mode, type, selection) {
|
|||||||
qm.gainItem(1472061, 1);
|
qm.gainItem(1472061, 1);
|
||||||
qm.gainItem(2070000, 800);
|
qm.gainItem(2070000, 800);
|
||||||
qm.gainItem(1142066, 1);
|
qm.gainItem(1142066, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.changeJob(MapleJob.NIGHTWALKER1);
|
qm.changeJob(Job.NIGHTWALKER1);
|
||||||
qm.getPlayer().resetStats();
|
qm.getPlayer().resetStats();
|
||||||
}
|
}
|
||||||
qm.forceCompleteQuest();
|
qm.forceCompleteQuest();
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ function end(mode, type, selection) {
|
|||||||
|
|
||||||
qm.gainItem(1482014, 1);
|
qm.gainItem(1482014, 1);
|
||||||
qm.gainItem(1142066, 1);
|
qm.gainItem(1142066, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.THUNDERBREAKER1);
|
qm.getPlayer().changeJob(Job.THUNDERBREAKER1);
|
||||||
qm.getPlayer().resetStats();
|
qm.getPlayer().resetStats();
|
||||||
}
|
}
|
||||||
qm.forceCompleteQuest();
|
qm.forceCompleteQuest();
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function end(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
qm.gainItem(4032096, -30);
|
qm.gainItem(4032096, -30);
|
||||||
qm.gainItem(1142067, 1);
|
qm.gainItem(1142067, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.DAWNWARRIOR2);
|
qm.getPlayer().changeJob(Job.DAWNWARRIOR2);
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
}
|
}
|
||||||
qm.sendNext("You are a Knight-in-Training no more. You are now an official knight of the Cygnus Knights.");
|
qm.sendNext("You are a Knight-in-Training no more. You are now an official knight of the Cygnus Knights.");
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function end(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
qm.gainItem(4032097, -30);
|
qm.gainItem(4032097, -30);
|
||||||
qm.gainItem(1142067, 1);
|
qm.gainItem(1142067, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.BLAZEWIZARD2);
|
qm.getPlayer().changeJob(Job.BLAZEWIZARD2);
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
}
|
}
|
||||||
qm.sendNext("You are no longer a Knight-in-Training. You are now an official Cygnus Knight!");
|
qm.sendNext("You are no longer a Knight-in-Training. You are now an official Cygnus Knight!");
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function end(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
qm.gainItem(4032098, -30);
|
qm.gainItem(4032098, -30);
|
||||||
qm.gainItem(1142067, 1);
|
qm.gainItem(1142067, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.WINDARCHER2);
|
qm.getPlayer().changeJob(Job.WINDARCHER2);
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
}
|
}
|
||||||
qm.sendNext("You are no longer a Knight-in-Training. You are now officially a Cygnus Knight.");
|
qm.sendNext("You are no longer a Knight-in-Training. You are now officially a Cygnus Knight.");
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function end(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
qm.gainItem(4032099, -30);
|
qm.gainItem(4032099, -30);
|
||||||
qm.gainItem(1142067, 1);
|
qm.gainItem(1142067, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.NIGHTWALKER2);
|
qm.getPlayer().changeJob(Job.NIGHTWALKER2);
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
}
|
}
|
||||||
qm.sendNext("You are no longer a Knight-in-Training. You have officially become a Cygnus Knight.");
|
qm.sendNext("You are no longer a Knight-in-Training. You have officially become a Cygnus Knight.");
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function end(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
qm.gainItem(4032100, -30);
|
qm.gainItem(4032100, -30);
|
||||||
qm.gainItem(1142067, 1);
|
qm.gainItem(1142067, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.THUNDERBREAKER2);
|
qm.getPlayer().changeJob(Job.THUNDERBREAKER2);
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
}
|
}
|
||||||
qm.sendNext("You are now no longer a Knight-in-Training. You have now officially become a Cygnus Knight.");
|
qm.sendNext("You are now no longer a Knight-in-Training. You have now officially become a Cygnus Knight.");
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function start(mode, type, selection) {
|
|||||||
} else {
|
} else {
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
qm.gainItem(1142068, 1);
|
qm.gainItem(1142068, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.DAWNWARRIOR3);
|
qm.getPlayer().changeJob(Job.DAWNWARRIOR3);
|
||||||
qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you shall carry yourself with dignity and respect befitting your new title, an Advanced Knight of Cygnus Knights. May your glory continue to shine as bright as this moment.");
|
qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you shall carry yourself with dignity and respect befitting your new title, an Advanced Knight of Cygnus Knights. May your glory continue to shine as bright as this moment.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function start(mode, type, selection) {
|
|||||||
} else {
|
} else {
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
qm.gainItem(1142068, 1);
|
qm.gainItem(1142068, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.BLAZEWIZARD3);
|
qm.getPlayer().changeJob(Job.BLAZEWIZARD3);
|
||||||
qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you will train yourself with fervor as you will lead your group of Knights for the safety of this world. That fervor will provide you with plenty of courage.");
|
qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you will train yourself with fervor as you will lead your group of Knights for the safety of this world. That fervor will provide you with plenty of courage.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function start(mode, type, selection) {
|
|||||||
} else {
|
} else {
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
qm.gainItem(1142068, 1);
|
qm.gainItem(1142068, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.WINDARCHER3);
|
qm.getPlayer().changeJob(Job.WINDARCHER3);
|
||||||
qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you will be carrying a while lot of responsibility befitting your new title as an Advanced Knight of Cygnus Knights. You may view the world in a carefree mode, but please remember what your mission is.");
|
qm.sendOk("#h #, as of this moment, you are an Advanced Knight. From this moment on, you will be carrying a while lot of responsibility befitting your new title as an Advanced Knight of Cygnus Knights. You may view the world in a carefree mode, but please remember what your mission is.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ function start(mode, type, selection) {
|
|||||||
qm.sendNext("If you wish to receive the medal befitting the title, you may want to make some room in your equipment inventory.");
|
qm.sendNext("If you wish to receive the medal befitting the title, you may want to make some room in your equipment inventory.");
|
||||||
} else {
|
} else {
|
||||||
qm.gainItem(1142068, 1);
|
qm.gainItem(1142068, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.NIGHTWALKER3);
|
qm.getPlayer().changeJob(Job.NIGHTWALKER3);
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
qm.sendOk("#h #, from here on out, you are an Advanced Knight of Cygnus Knights. The title comes with a newfound broad view on everything. You may encounter temptations here and there, but I want you to keep your faith and beliefs intact and do not succumb to the darkness.");
|
qm.sendOk("#h #, from here on out, you are an Advanced Knight of Cygnus Knights. The title comes with a newfound broad view on everything. You may encounter temptations here and there, but I want you to keep your faith and beliefs intact and do not succumb to the darkness.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ function start(mode, type, selection) {
|
|||||||
qm.sendNext("If you wish to receive the medal befitting the title, you may want to make some room in your equipment inventory.");
|
qm.sendNext("If you wish to receive the medal befitting the title, you may want to make some room in your equipment inventory.");
|
||||||
} else {
|
} else {
|
||||||
qm.gainItem(1142068, 1);
|
qm.gainItem(1142068, 1);
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
qm.getPlayer().changeJob(MapleJob.THUNDERBREAKER3);
|
qm.getPlayer().changeJob(Job.THUNDERBREAKER3);
|
||||||
qm.completeQuest();
|
qm.completeQuest();
|
||||||
qm.sendOk("#h #, from here on out, you will become an Advanced Knight of the Knights of Cygnus! As your standing rises, so does the difficulty of the tasks you will be receiving. But challenge is good, right? You have to enjoy life. Enjoy what's given to you!");
|
qm.sendOk("#h #, from here on out, you will become an Advanced Knight of the Knights of Cygnus! As your standing rises, so does the difficulty of the tasks you will be receiving. But challenge is good, right? You have to enjoy life. Enjoy what's given to you!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ function end(mode, type, selection) {
|
|||||||
|
|
||||||
var stance = qm.getPlayer().getJobStyle();
|
var stance = qm.getPlayer().getJobStyle();
|
||||||
|
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
if(stance == MapleJob.WARRIOR) item = 1072003;
|
if(stance == Job.WARRIOR) item = 1072003;
|
||||||
else if(stance == MapleJob.MAGICIAN) item = 1072077;
|
else if(stance == Job.MAGICIAN) item = 1072077;
|
||||||
else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) item = 1072081;
|
else if(stance == Job.BOWMAN || stance == Job.CROSSBOWMAN) item = 1072081;
|
||||||
else if(stance == MapleJob.THIEF) item = 1072035;
|
else if(stance == Job.THIEF) item = 1072035;
|
||||||
else if(stance == MapleJob.BRAWLER || stance == MapleJob.GUNSLINGER) item = 1072294;
|
else if(stance == Job.BRAWLER || stance == Job.GUNSLINGER) item = 1072294;
|
||||||
else item = 1072018;
|
else item = 1072018;
|
||||||
|
|
||||||
qm.gainItem(item, 1);
|
qm.gainItem(item, 1);
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ function end(mode, type, selection) {
|
|||||||
var talkStr = "Here, please select the scroll of your choice. All success rates are at 10%. \r\n\r\n#rSELECT A ITEM\r\n#b"
|
var talkStr = "Here, please select the scroll of your choice. All success rates are at 10%. \r\n\r\n#rSELECT A ITEM\r\n#b"
|
||||||
stance = qm.getPlayer().getJobStyle();
|
stance = qm.getPlayer().getJobStyle();
|
||||||
|
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
if(stance == MapleJob.WARRIOR || stance == MapleJob.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302);
|
if(stance == Job.WARRIOR || stance == Job.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302);
|
||||||
else if(stance == MapleJob.MAGICIAN) vecItem = new Array(2043702, 2043802);
|
else if(stance == Job.MAGICIAN) vecItem = new Array(2043702, 2043802);
|
||||||
else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) vecItem = new Array(2044502, 2044602);
|
else if(stance == Job.BOWMAN || stance == Job.CROSSBOWMAN) vecItem = new Array(2044502, 2044602);
|
||||||
else if(stance == MapleJob.THIEF) vecItem = new Array(2043302, 2044702);
|
else if(stance == Job.THIEF) vecItem = new Array(2043302, 2044702);
|
||||||
else vecItem = new Array(2044802, 2044902);
|
else vecItem = new Array(2044802, 2044902);
|
||||||
|
|
||||||
for (var i = 0; i < vecItem.length; i++)
|
for (var i = 0; i < vecItem.length; i++)
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ function end(mode, type, selection) {
|
|||||||
var talkStr = "Here, please select the scroll of your choice. All success rates are at 10%. \r\n\r\n#rSELECT A ITEM\r\n#b"
|
var talkStr = "Here, please select the scroll of your choice. All success rates are at 10%. \r\n\r\n#rSELECT A ITEM\r\n#b"
|
||||||
stance = qm.getPlayer().getJobStyle();
|
stance = qm.getPlayer().getJobStyle();
|
||||||
|
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
if(stance == MapleJob.WARRIOR || stance == MapleJob.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302);
|
if(stance == Job.WARRIOR || stance == Job.BEGINNER) vecItem = new Array(2043002, 2043102, 2043202, 2044002, 2044102, 2044202, 2044402, 2044302);
|
||||||
else if(stance == MapleJob.MAGICIAN) vecItem = new Array(2043702, 2043802);
|
else if(stance == Job.MAGICIAN) vecItem = new Array(2043702, 2043802);
|
||||||
else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) vecItem = new Array(2044502, 2044602);
|
else if(stance == Job.BOWMAN || stance == Job.CROSSBOWMAN) vecItem = new Array(2044502, 2044602);
|
||||||
else if(stance == MapleJob.THIEF) vecItem = new Array(2043302, 2044702);
|
else if(stance == Job.THIEF) vecItem = new Array(2043302, 2044702);
|
||||||
else vecItem = new Array(2044802, 2044902);
|
else vecItem = new Array(2044802, 2044902);
|
||||||
|
|
||||||
for (var i = 0; i < vecItem.length; i++)
|
for (var i = 0; i < vecItem.length; i++)
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ function end(mode, type, selection) {
|
|||||||
var talkStr = "Do you like the glove? I've kept this for a while, and I was planning on using it someday, but it looks much better on you. Please put it to good use; besides, I got so much stuff from the Sector, that I don't need it anymore.";
|
var talkStr = "Do you like the glove? I've kept this for a while, and I was planning on using it someday, but it looks much better on you. Please put it to good use; besides, I got so much stuff from the Sector, that I don't need it anymore.";
|
||||||
stance = qm.getPlayer().getJobStyle();
|
stance = qm.getPlayer().getJobStyle();
|
||||||
|
|
||||||
const MapleJob = Java.type('client.MapleJob');
|
const Job = Java.type('client.Job');
|
||||||
if(stance == MapleJob.WARRIOR) item = 1082024;
|
if(stance == Job.WARRIOR) item = 1082024;
|
||||||
else if(stance == MapleJob.MAGICIAN) item = 1082063;
|
else if(stance == Job.MAGICIAN) item = 1082063;
|
||||||
else if(stance == MapleJob.BOWMAN || stance == MapleJob.CROSSBOWMAN) item = 1082072;
|
else if(stance == Job.BOWMAN || stance == Job.CROSSBOWMAN) item = 1082072;
|
||||||
else if(stance == MapleJob.THIEF) item = 1082076;
|
else if(stance == Job.THIEF) item = 1082076;
|
||||||
else if(stance == MapleJob.BRAWLER || stance == MapleJob.GUNSLINGER) item = 1082195;
|
else if(stance == Job.BRAWLER || stance == Job.GUNSLINGER) item = 1082195;
|
||||||
else item = 1082149;
|
else item = 1082149;
|
||||||
|
|
||||||
qm.sendNext(talkStr);
|
qm.sendNext(talkStr);
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
private MapleGuildCharacter mgc = null;
|
private MapleGuildCharacter mgc = null;
|
||||||
private MaplePartyCharacter mpc = null;
|
private MaplePartyCharacter mpc = null;
|
||||||
private Inventory[] inventory;
|
private Inventory[] inventory;
|
||||||
private MapleJob job = MapleJob.BEGINNER;
|
private Job job = Job.BEGINNER;
|
||||||
private MapleMessenger messenger = null;
|
private MapleMessenger messenger = null;
|
||||||
private MapleMiniGame miniGame;
|
private MapleMiniGame miniGame;
|
||||||
private MapleRockPaperScissor rps;
|
private MapleRockPaperScissor rps;
|
||||||
@@ -322,37 +322,37 @@ public class Character extends AbstractCharacterObject {
|
|||||||
setPosition(new Point(0, 0));
|
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;
|
int jobtype = jobid / 100;
|
||||||
|
|
||||||
if (jobtype == MapleJob.WARRIOR.getId() / 100 || jobtype == MapleJob.DAWNWARRIOR1.getId() / 100 || jobtype == MapleJob.ARAN1.getId() / 100) {
|
if (jobtype == Job.WARRIOR.getId() / 100 || jobtype == Job.DAWNWARRIOR1.getId() / 100 || jobtype == Job.ARAN1.getId() / 100) {
|
||||||
return (MapleJob.WARRIOR);
|
return (Job.WARRIOR);
|
||||||
} else if (jobtype == MapleJob.MAGICIAN.getId() / 100 || jobtype == MapleJob.BLAZEWIZARD1.getId() / 100 || jobtype == MapleJob.EVAN1.getId() / 100) {
|
} else if (jobtype == Job.MAGICIAN.getId() / 100 || jobtype == Job.BLAZEWIZARD1.getId() / 100 || jobtype == Job.EVAN1.getId() / 100) {
|
||||||
return (MapleJob.MAGICIAN);
|
return (Job.MAGICIAN);
|
||||||
} else if (jobtype == MapleJob.BOWMAN.getId() / 100 || jobtype == MapleJob.WINDARCHER1.getId() / 100) {
|
} else if (jobtype == Job.BOWMAN.getId() / 100 || jobtype == Job.WINDARCHER1.getId() / 100) {
|
||||||
if (jobid / 10 == MapleJob.CROSSBOWMAN.getId() / 10) {
|
if (jobid / 10 == Job.CROSSBOWMAN.getId() / 10) {
|
||||||
return (MapleJob.CROSSBOWMAN);
|
return (Job.CROSSBOWMAN);
|
||||||
} else {
|
} else {
|
||||||
return (MapleJob.BOWMAN);
|
return (Job.BOWMAN);
|
||||||
}
|
}
|
||||||
} else if (jobtype == MapleJob.THIEF.getId() / 100 || jobtype == MapleJob.NIGHTWALKER1.getId() / 100) {
|
} else if (jobtype == Job.THIEF.getId() / 100 || jobtype == Job.NIGHTWALKER1.getId() / 100) {
|
||||||
return (MapleJob.THIEF);
|
return (Job.THIEF);
|
||||||
} else if (jobtype == MapleJob.PIRATE.getId() / 100 || jobtype == MapleJob.THUNDERBREAKER1.getId() / 100) {
|
} else if (jobtype == Job.PIRATE.getId() / 100 || jobtype == Job.THUNDERBREAKER1.getId() / 100) {
|
||||||
if (opt == (byte) 0x80) {
|
if (opt == (byte) 0x80) {
|
||||||
return (MapleJob.BRAWLER);
|
return (Job.BRAWLER);
|
||||||
} else {
|
} 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);
|
return getJobStyleInternal(this.getJob().getId(), opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleJob getJobStyle() {
|
public Job getJobStyle() {
|
||||||
return getJobStyle((byte) ((this.getStr() > this.getDex()) ? 0x80 : 0x40));
|
return getJobStyle((byte) ((this.getStr() > this.getDex()) ? 0x80 : 0x40));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,7 +369,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
ret.int_ = 4;
|
ret.int_ = 4;
|
||||||
ret.luk = 4;
|
ret.luk = 4;
|
||||||
ret.map = null;
|
ret.map = null;
|
||||||
ret.job = MapleJob.BEGINNER;
|
ret.job = Job.BEGINNER;
|
||||||
ret.level = 1;
|
ret.level = 1;
|
||||||
ret.accountid = c.getAccID();
|
ret.accountid = c.getAccID();
|
||||||
ret.buddylist = new BuddyList(20);
|
ret.buddylist = new BuddyList(20);
|
||||||
@@ -693,7 +693,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
|
|
||||||
public int calculateMaxBaseDamage(int watk, WeaponType weapon) {
|
public int calculateMaxBaseDamage(int watk, WeaponType weapon) {
|
||||||
int mainstat, secondarystat;
|
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;
|
weapon = WeaponType.DAGGER_THIEVES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -716,7 +716,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
if (weapon_item != null) {
|
if (weapon_item != null) {
|
||||||
maxbasedamage = calculateMaxBaseDamage(watk, ii.getWeaponType(weapon_item.getItemId()));
|
maxbasedamage = calculateMaxBaseDamage(watk, ii.getWeaponType(weapon_item.getItemId()));
|
||||||
} else {
|
} else {
|
||||||
if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||||
double weapMulti = 3;
|
double weapMulti = 3;
|
||||||
if (job.getId() % 100 != 0) {
|
if (job.getId() % 100 != 0) {
|
||||||
weapMulti = 4.2;
|
weapMulti = 4.2;
|
||||||
@@ -1040,7 +1040,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
}, 777);
|
}, 777);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void changeJob(MapleJob newJob) {
|
public synchronized void changeJob(Job newJob) {
|
||||||
if (newJob == null) {
|
if (newJob == null) {
|
||||||
return;//the fuck you doing idiot!
|
return;//the fuck you doing idiot!
|
||||||
}
|
}
|
||||||
@@ -1783,7 +1783,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
berserkSchedule.cancel(false);
|
berserkSchedule.cancel(false);
|
||||||
}
|
}
|
||||||
final Character chr = this;
|
final Character chr = this;
|
||||||
if (job.equals(MapleJob.DARKKNIGHT)) {
|
if (job.equals(Job.DARKKNIGHT)) {
|
||||||
Skill BerserkX = SkillFactory.getSkill(DarkKnight.BERSERK);
|
Skill BerserkX = SkillFactory.getSkill(DarkKnight.BERSERK);
|
||||||
final int skilllevel = getSkillLevel(BerserkX);
|
final int skilllevel = getSkillLevel(BerserkX);
|
||||||
if (skilllevel > 0) {
|
if (skilllevel > 0) {
|
||||||
@@ -4227,7 +4227,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
recalcMseList.add(re.getValue().getLeft());
|
recalcMseList.add(re.getValue().getLeft());
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean mageJob = this.getJobStyle() == MapleJob.MAGICIAN;
|
boolean mageJob = this.getJobStyle() == Job.MAGICIAN;
|
||||||
do {
|
do {
|
||||||
List<MapleStatEffect> mseList = recalcMseList;
|
List<MapleStatEffect> mseList = recalcMseList;
|
||||||
recalcMseList = new LinkedList<>();
|
recalcMseList = new LinkedList<>();
|
||||||
@@ -4564,7 +4564,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
updateLocalStats();
|
updateLocalStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getJobMapChair(MapleJob job) {
|
private static int getJobMapChair(Job job) {
|
||||||
switch (job.getId() / 1000) {
|
switch (job.getId() / 1000) {
|
||||||
case 0:
|
case 0:
|
||||||
return Beginner.MAP_CHAIR;
|
return Beginner.MAP_CHAIR;
|
||||||
@@ -5143,7 +5143,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleJob getJob() {
|
public Job getJob() {
|
||||||
return job;
|
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 curSp = getUsedSp(newJob) + getJobRemainingSp(newJob);
|
||||||
int spGain = 0;
|
int spGain = 0;
|
||||||
int expectedSp = getJobLevelSp(level - 10, newJob, GameConstants.getJobBranch(newJob));
|
int expectedSp = getJobLevelSp(level - 10, newJob, GameConstants.getJobBranch(newJob));
|
||||||
@@ -6231,7 +6231,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
return getSpGain(spGain, curSp, newJob);
|
return getSpGain(spGain, curSp, newJob);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getUsedSp(MapleJob job) {
|
private int getUsedSp(Job job) {
|
||||||
int jobId = job.getId();
|
int jobId = job.getId();
|
||||||
int spUsed = 0;
|
int spUsed = 0;
|
||||||
|
|
||||||
@@ -6245,21 +6245,21 @@ public class Character extends AbstractCharacterObject {
|
|||||||
return spUsed;
|
return spUsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getJobLevelSp(int level, MapleJob job, int jobBranch) {
|
private int getJobLevelSp(int level, Job job, int jobBranch) {
|
||||||
if (getJobStyleInternal(job.getId(), (byte) 0x40) == MapleJob.MAGICIAN) {
|
if (getJobStyleInternal(job.getId(), (byte) 0x40) == Job.MAGICIAN) {
|
||||||
level += 2; // starts earlier, level 8
|
level += 2; // starts earlier, level 8
|
||||||
}
|
}
|
||||||
|
|
||||||
return 3 * level + GameConstants.getChangeJobSpUpgrade(jobBranch);
|
return 3 * level + GameConstants.getChangeJobSpUpgrade(jobBranch);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getJobMaxSp(MapleJob job) {
|
private int getJobMaxSp(Job job) {
|
||||||
int jobBranch = GameConstants.getJobBranch(job);
|
int jobBranch = GameConstants.getJobBranch(job);
|
||||||
int jobRange = GameConstants.getJobUpgradeLevelRange(jobBranch);
|
int jobRange = GameConstants.getJobUpgradeLevelRange(jobBranch);
|
||||||
return getJobLevelSp(jobRange, job, jobBranch);
|
return getJobLevelSp(jobRange, job, jobBranch);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getJobRemainingSp(MapleJob job) {
|
private int getJobRemainingSp(Job job) {
|
||||||
int skillBook = GameConstants.getSkillBook(job.getId());
|
int skillBook = GameConstants.getSkillBook(job.getId());
|
||||||
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@@ -6270,12 +6270,12 @@ public class Character extends AbstractCharacterObject {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getSpGain(int spGain, MapleJob job) {
|
private int getSpGain(int spGain, Job job) {
|
||||||
int curSp = getUsedSp(job) + getJobRemainingSp(job);
|
int curSp = getUsedSp(job) + getJobRemainingSp(job);
|
||||||
return getSpGain(spGain, curSp, 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);
|
int maxSp = getJobMaxSp(job);
|
||||||
|
|
||||||
spGain = Math.min(spGain, maxSp - curSp);
|
spGain = Math.min(spGain, maxSp - curSp);
|
||||||
@@ -6344,46 +6344,46 @@ public class Character extends AbstractCharacterObject {
|
|||||||
if (isBeginner) {
|
if (isBeginner) {
|
||||||
addhp += Randomizer.rand(12, 16);
|
addhp += Randomizer.rand(12, 16);
|
||||||
addmp += Randomizer.rand(10, 12);
|
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);
|
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);
|
improvingMaxMP = SkillFactory.getSkill(1210000);
|
||||||
} else if (job.isA(MapleJob.DAWNWARRIOR2)) {
|
} else if (job.isA(Job.DAWNWARRIOR2)) {
|
||||||
improvingMaxMP = SkillFactory.getSkill(11110000);
|
improvingMaxMP = SkillFactory.getSkill(11110000);
|
||||||
}
|
}
|
||||||
improvingMaxHPLevel = getSkillLevel(improvingMaxHP);
|
improvingMaxHPLevel = getSkillLevel(improvingMaxHP);
|
||||||
addhp += Randomizer.rand(24, 28);
|
addhp += Randomizer.rand(24, 28);
|
||||||
addmp += Randomizer.rand(4, 6);
|
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);
|
improvingMaxMP = isCygnus() ? SkillFactory.getSkill(BlazeWizard.INCREASING_MAX_MP) : SkillFactory.getSkill(Magician.IMPROVED_MAX_MP_INCREASE);
|
||||||
improvingMaxMPLevel = getSkillLevel(improvingMaxMP);
|
improvingMaxMPLevel = getSkillLevel(improvingMaxMP);
|
||||||
addhp += Randomizer.rand(10, 14);
|
addhp += Randomizer.rand(10, 14);
|
||||||
addmp += Randomizer.rand(22, 24);
|
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);
|
addhp += Randomizer.rand(20, 24);
|
||||||
addmp += Randomizer.rand(14, 16);
|
addmp += Randomizer.rand(14, 16);
|
||||||
} else if (job.isA(MapleJob.GM)) {
|
} else if (job.isA(Job.GM)) {
|
||||||
addhp += 30000;
|
addhp += 30000;
|
||||||
addmp += 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);
|
improvingMaxHP = isCygnus() ? SkillFactory.getSkill(ThunderBreaker.IMPROVE_MAX_HP) : SkillFactory.getSkill(Brawler.IMPROVE_MAX_HP);
|
||||||
improvingMaxHPLevel = getSkillLevel(improvingMaxHP);
|
improvingMaxHPLevel = getSkillLevel(improvingMaxHP);
|
||||||
addhp += Randomizer.rand(22, 28);
|
addhp += Randomizer.rand(22, 28);
|
||||||
addmp += Randomizer.rand(18, 23);
|
addmp += Randomizer.rand(18, 23);
|
||||||
} else if (job.isA(MapleJob.ARAN1)) {
|
} else if (job.isA(Job.ARAN1)) {
|
||||||
addhp += Randomizer.rand(44, 48);
|
addhp += Randomizer.rand(44, 48);
|
||||||
int aids = Randomizer.rand(4, 8);
|
int aids = Randomizer.rand(4, 8);
|
||||||
addmp += aids + Math.floor(aids * 0.1);
|
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();
|
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();
|
addmp += improvingMaxMP.getEffect(improvingMaxMPLevel).getX();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
if (YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||||
if (getJobStyle() == MapleJob.MAGICIAN) {
|
if (getJobStyle() == Job.MAGICIAN) {
|
||||||
addmp += localint_ / 20;
|
addmp += localint_ / 20;
|
||||||
} else {
|
} else {
|
||||||
addmp += localint_ / 10;
|
addmp += localint_ / 10;
|
||||||
@@ -6855,7 +6855,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
// skipping pets, probably unneeded here
|
// skipping pets, probably unneeded here
|
||||||
|
|
||||||
ret.level = rs.getInt("level");
|
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.str = rs.getInt("str");
|
||||||
ret.dex = rs.getInt("dex");
|
ret.dex = rs.getInt("dex");
|
||||||
ret.int_ = rs.getInt("int");
|
ret.int_ = rs.getInt("int");
|
||||||
@@ -6994,7 +6994,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
ret.setGMLevel(rs.getInt("gm"));
|
ret.setGMLevel(rs.getInt("gm"));
|
||||||
ret.skinColor = MapleSkinColor.getById(rs.getInt("skincolor"));
|
ret.skinColor = MapleSkinColor.getById(rs.getInt("skincolor"));
|
||||||
ret.gender = rs.getInt("gender");
|
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.finishedDojoTutorial = rs.getInt("finishedDojoTutorial") == 1;
|
||||||
ret.vanquisherKills = rs.getInt("vanquisherKills");
|
ret.vanquisherKills = rs.getInt("vanquisherKills");
|
||||||
ret.omokwins = rs.getInt("omokwins");
|
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.");
|
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);
|
InventoryManipulator.removeById(client, ItemConstants.getInventoryType(charmID[i]), charmID[i], 1, true, false);
|
||||||
usedSafetyCharm = true;
|
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
|
if (!FieldLimit.NO_EXP_DECREASE.check(getMap().getFieldLimit())) { // thanks Conrad for noticing missing FieldLimit check
|
||||||
int XPdummy = ExpTable.getExpNeededForLevel(getLevel());
|
int XPdummy = ExpTable.getExpNeededForLevel(getLevel());
|
||||||
|
|
||||||
@@ -7787,11 +7787,11 @@ public class Character extends AbstractCharacterObject {
|
|||||||
localint_ += getInt() * mwarr / 100;
|
localint_ += getInt() * mwarr / 100;
|
||||||
localluk += getLuk() * mwarr / 100;
|
localluk += getLuk() * mwarr / 100;
|
||||||
}
|
}
|
||||||
if (job.isA(MapleJob.BOWMAN)) {
|
if (job.isA(Job.BOWMAN)) {
|
||||||
Skill expert = null;
|
Skill expert = null;
|
||||||
if (job.isA(MapleJob.MARKSMAN)) {
|
if (job.isA(Job.MARKSMAN)) {
|
||||||
expert = SkillFactory.getSkill(3220004);
|
expert = SkillFactory.getSkill(3220004);
|
||||||
} else if (job.isA(MapleJob.BOWMASTER)) {
|
} else if (job.isA(Job.BOWMASTER)) {
|
||||||
expert = SkillFactory.getSkill(3120005);
|
expert = SkillFactory.getSkill(3120005);
|
||||||
}
|
}
|
||||||
if (expert != null) {
|
if (expert != null) {
|
||||||
@@ -7828,7 +7828,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
localmagic += blessing * 2;
|
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);
|
Item weapon_item = getInventory(InventoryType.EQUIPPED).getItem((short) -11);
|
||||||
if (weapon_item != null) {
|
if (weapon_item != null) {
|
||||||
WeaponType weapon = ii.getWeaponType(weapon_item.getItemId());
|
WeaponType weapon = ii.getWeaponType(weapon_item.getItemId());
|
||||||
@@ -9152,7 +9152,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
this.itemEffect = itemEffect;
|
this.itemEffect = itemEffect;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setJob(MapleJob job) {
|
public void setJob(Job job) {
|
||||||
this.job = job;
|
this.job = job;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11178,7 +11178,7 @@ public class Character extends AbstractCharacterObject {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
addReborns();
|
addReborns();
|
||||||
changeJob(MapleJob.BEGINNER);
|
changeJob(Job.BEGINNER);
|
||||||
setLevel(0);
|
setLevel(0);
|
||||||
levelUp(true);
|
levelUp(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ public class Family {
|
|||||||
family = new Family(familyid, world);
|
family = new Family(familyid, world);
|
||||||
Server.getInstance().getWorld(world).addFamily(familyid, family);
|
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);
|
family.addEntry(familyEntry);
|
||||||
if (seniorid <= 0) {
|
if (seniorid <= 0) {
|
||||||
family.setLeader(familyEntry);
|
family.setLeader(familyEntry);
|
||||||
|
|||||||
@@ -56,9 +56,9 @@ public class FamilyEntry {
|
|||||||
// cached values for offline players
|
// cached values for offline players
|
||||||
private String charName;
|
private String charName;
|
||||||
private int level;
|
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.family = family;
|
||||||
this.characterID = characterID;
|
this.characterID = characterID;
|
||||||
this.charName = charName;
|
this.charName = charName;
|
||||||
@@ -247,7 +247,7 @@ public class FamilyEntry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleJob getJob() {
|
public Job getJob() {
|
||||||
Character chr = character;
|
Character chr = character;
|
||||||
if (chr != null) {
|
if (chr != null) {
|
||||||
return chr.getJob();
|
return chr.getJob();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
package client;
|
package client;
|
||||||
|
|
||||||
public enum MapleJob {
|
public enum Job {
|
||||||
BEGINNER(0),
|
BEGINNER(0),
|
||||||
|
|
||||||
WARRIOR(100),
|
WARRIOR(100),
|
||||||
@@ -65,7 +65,7 @@ public enum MapleJob {
|
|||||||
final int jobid;
|
final int jobid;
|
||||||
final static int maxId = 22; // maxId = (EVAN / 100);
|
final static int maxId = 22; // maxId = (EVAN / 100);
|
||||||
|
|
||||||
private MapleJob(int id) {
|
Job(int id) {
|
||||||
jobid = id;
|
jobid = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,8 +77,8 @@ public enum MapleJob {
|
|||||||
return jobid;
|
return jobid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MapleJob getById(int id) {
|
public static Job getById(int id) {
|
||||||
for (MapleJob l : MapleJob.values()) {
|
for (Job l : Job.values()) {
|
||||||
if (l.getId() == id) {
|
if (l.getId() == id) {
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ public enum MapleJob {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MapleJob getBy5ByteEncoding(int encoded) {
|
public static Job getBy5ByteEncoding(int encoded) {
|
||||||
switch (encoded) {
|
switch (encoded) {
|
||||||
case 2:
|
case 2:
|
||||||
return WARRIOR;
|
return WARRIOR;
|
||||||
@@ -115,7 +115,7 @@ public enum MapleJob {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
int basebranch = basejob.getId() / 10;
|
||||||
return (getId() / 10 == basebranch && getId() >= basejob.getId()) || (basebranch % 10 == 0 && getId() / 100 == basejob.getId() / 100);
|
return (getId() / 10 == basebranch && getId() >= basejob.getId()) || (basebranch % 10 == 0 && getId() / 100 == basejob.getId() / 100);
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ package client.command.commands.gm2;
|
|||||||
|
|
||||||
import client.Character;
|
import client.Character;
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
|
|
||||||
public class JobCommand extends Command {
|
public class JobCommand extends Command {
|
||||||
@@ -43,7 +43,7 @@ public class JobCommand extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
player.changeJob(MapleJob.getById(jobid));
|
player.changeJob(Job.getById(jobid));
|
||||||
player.equipChanged();
|
player.equipChanged();
|
||||||
} else if (params.length == 2) {
|
} else if (params.length == 2) {
|
||||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||||
@@ -55,7 +55,7 @@ public class JobCommand extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
victim.changeJob(MapleJob.getById(jobid));
|
victim.changeJob(Job.getById(jobid));
|
||||||
player.equipChanged();
|
player.equipChanged();
|
||||||
} else {
|
} else {
|
||||||
player.message("Player '" + params[0] + "' could not be found.");
|
player.message("Player '" + params[0] + "' could not be found.");
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class MaxSkillCommand extends Command {
|
|||||||
} catch (NullPointerException npe) { }
|
} 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);
|
Skill skill = SkillFactory.getSkill(5001005);
|
||||||
player.changeSkillLevel(skill, (byte) -1, -1, -1);
|
player.changeSkillLevel(skill, (byte) -1, -1, -1);
|
||||||
} else {
|
} 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);
|
Skill skill = SkillFactory.getSkill(5001005);
|
||||||
player.changeSkillLevel(skill, (byte) -1, -1, -1);
|
player.changeSkillLevel(skill, (byte) -1, -1, -1);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
package client.creator;
|
package client.creator;
|
||||||
|
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.Skill;
|
import client.Skill;
|
||||||
import client.inventory.InventoryType;
|
import client.inventory.InventoryType;
|
||||||
import client.inventory.Item;
|
import client.inventory.Item;
|
||||||
@@ -37,7 +37,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||||||
* @author RonanLana
|
* @author RonanLana
|
||||||
*/
|
*/
|
||||||
public class CharacterFactoryRecipe {
|
public class CharacterFactoryRecipe {
|
||||||
private MapleJob job;
|
private Job job;
|
||||||
private int level, map, top, bottom, shoes, weapon;
|
private int level, map, top, bottom, shoes, weapon;
|
||||||
private int str = 4, dex = 4, int_ = 4, luk = 4;
|
private int str = 4, dex = 4, int_ = 4, luk = 4;
|
||||||
private int maxHp = 50, maxMp = 5;
|
private int maxHp = 50, maxMp = 5;
|
||||||
@@ -48,7 +48,7 @@ public class CharacterFactoryRecipe {
|
|||||||
private List<Pair<Item, InventoryType>> itemsWithType = new LinkedList<>();
|
private List<Pair<Item, InventoryType>> itemsWithType = new LinkedList<>();
|
||||||
private Map<InventoryType, AtomicInteger> runningTypePosition = new LinkedHashMap<>();
|
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.job = job;
|
||||||
this.level = level;
|
this.level = level;
|
||||||
this.map = map;
|
this.map = map;
|
||||||
@@ -121,7 +121,7 @@ public class CharacterFactoryRecipe {
|
|||||||
itemsWithType.add(new Pair<>(new Item(itemid, (short) p.getAndIncrement(), (short) quantity), itemType));
|
itemsWithType.add(new Pair<>(new Item(itemid, (short) p.getAndIncrement(), (short) quantity), itemType));
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleJob getJob() {
|
public Job getJob() {
|
||||||
return job;
|
return job;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
package client.creator.novice;
|
package client.creator.novice;
|
||||||
|
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.creator.CharacterFactory;
|
import client.creator.CharacterFactory;
|
||||||
import client.creator.CharacterFactoryRecipe;
|
import client.creator.CharacterFactoryRecipe;
|
||||||
import client.inventory.InventoryType;
|
import client.inventory.InventoryType;
|
||||||
@@ -31,7 +31,7 @@ import client.inventory.InventoryType;
|
|||||||
*/
|
*/
|
||||||
public class BeginnerCreator extends CharacterFactory {
|
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);
|
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||||
giveItem(recipe, 4161001, 1, InventoryType.ETC);
|
giveItem(recipe, 4161001, 1, InventoryType.ETC);
|
||||||
return recipe;
|
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) {
|
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;
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
package client.creator.novice;
|
package client.creator.novice;
|
||||||
|
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.creator.CharacterFactory;
|
import client.creator.CharacterFactory;
|
||||||
import client.creator.CharacterFactoryRecipe;
|
import client.creator.CharacterFactoryRecipe;
|
||||||
import client.inventory.InventoryType;
|
import client.inventory.InventoryType;
|
||||||
@@ -31,7 +31,7 @@ import client.inventory.InventoryType;
|
|||||||
*/
|
*/
|
||||||
public class LegendCreator extends CharacterFactory {
|
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);
|
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||||
giveItem(recipe, 4161048, 1, InventoryType.ETC);
|
giveItem(recipe, 4161048, 1, InventoryType.ETC);
|
||||||
return recipe;
|
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) {
|
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;
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
package client.creator.novice;
|
package client.creator.novice;
|
||||||
|
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.creator.CharacterFactory;
|
import client.creator.CharacterFactory;
|
||||||
import client.creator.CharacterFactoryRecipe;
|
import client.creator.CharacterFactoryRecipe;
|
||||||
import client.inventory.InventoryType;
|
import client.inventory.InventoryType;
|
||||||
@@ -31,7 +31,7 @@ import client.inventory.InventoryType;
|
|||||||
*/
|
*/
|
||||||
public class NoblesseCreator extends CharacterFactory {
|
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);
|
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||||
giveItem(recipe, 4161047, 1, InventoryType.ETC);
|
giveItem(recipe, 4161047, 1, InventoryType.ETC);
|
||||||
return recipe;
|
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) {
|
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;
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
package client.creator.veteran;
|
package client.creator.veteran;
|
||||||
|
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.creator.CharacterFactory;
|
import client.creator.CharacterFactory;
|
||||||
import client.creator.CharacterFactoryRecipe;
|
import client.creator.CharacterFactoryRecipe;
|
||||||
import client.inventory.InventoryType;
|
import client.inventory.InventoryType;
|
||||||
@@ -36,7 +36,7 @@ public class BowmanCreator extends CharacterFactory {
|
|||||||
private static int[] weapons = {1452005, 1462000};
|
private static int[] weapons = {1452005, 1462000};
|
||||||
private static int[] startingHpMp = {797, 404};
|
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);
|
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
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) {
|
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;
|
package client.creator.veteran;
|
||||||
|
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.Skill;
|
import client.Skill;
|
||||||
import client.SkillFactory;
|
import client.SkillFactory;
|
||||||
import client.creator.CharacterFactory;
|
import client.creator.CharacterFactory;
|
||||||
@@ -40,7 +40,7 @@ public class MagicianCreator extends CharacterFactory {
|
|||||||
private static int[] startingHpMp = {405, 729};
|
private static int[] startingHpMp = {405, 729};
|
||||||
private static int[] mpGain = {0, 40, 80, 118, 156, 194, 230, 266, 302, 336, 370};
|
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);
|
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
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) {
|
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;
|
package client.creator.veteran;
|
||||||
|
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.creator.CharacterFactory;
|
import client.creator.CharacterFactory;
|
||||||
import client.creator.CharacterFactoryRecipe;
|
import client.creator.CharacterFactoryRecipe;
|
||||||
import client.inventory.InventoryType;
|
import client.inventory.InventoryType;
|
||||||
@@ -36,7 +36,7 @@ public class PirateCreator extends CharacterFactory {
|
|||||||
private static int[] weapons = {1482004, 1492004};
|
private static int[] weapons = {1482004, 1492004};
|
||||||
private static int[] startingHpMp = {846, 503};
|
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);
|
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
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) {
|
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;
|
package client.creator.veteran;
|
||||||
|
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.creator.CharacterFactory;
|
import client.creator.CharacterFactory;
|
||||||
import client.creator.CharacterFactoryRecipe;
|
import client.creator.CharacterFactoryRecipe;
|
||||||
import client.inventory.InventoryType;
|
import client.inventory.InventoryType;
|
||||||
@@ -36,7 +36,7 @@ public class ThiefCreator extends CharacterFactory {
|
|||||||
private static int[] weapons = {1472008, 1332012};
|
private static int[] weapons = {1472008, 1332012};
|
||||||
private static int[] startingHpMp = {794, 407};
|
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);
|
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
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) {
|
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;
|
package client.creator.veteran;
|
||||||
|
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.Skill;
|
import client.Skill;
|
||||||
import client.SkillFactory;
|
import client.SkillFactory;
|
||||||
import client.creator.CharacterFactory;
|
import client.creator.CharacterFactory;
|
||||||
@@ -40,7 +40,7 @@ public class WarriorCreator extends CharacterFactory {
|
|||||||
private static int[] startingHpMp = {905, 208};
|
private static int[] startingHpMp = {905, 208};
|
||||||
private static int[] hpGain = {0, 72, 144, 212, 280, 348, 412, 476, 540, 600, 660};
|
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);
|
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
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) {
|
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("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_);
|
//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;
|
int prStat = 0, scStat = 0, trStat = 0, temp, tempAp = remainingAp, CAP;
|
||||||
if (tempAp < 1) return;
|
if (tempAp < 1) return;
|
||||||
|
|
||||||
@@ -413,8 +413,8 @@ public class AssignAPProcessor {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MapleStat getQuaternaryStat(MapleJob stance) {
|
private static MapleStat getQuaternaryStat(Job stance) {
|
||||||
if(stance != MapleJob.MAGICIAN) return MapleStat.INT;
|
if(stance != Job.MAGICIAN) return MapleStat.INT;
|
||||||
return MapleStat.STR;
|
return MapleStat.STR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -520,14 +520,14 @@ public class AssignAPProcessor {
|
|||||||
|
|
||||||
int mp = player.getMaxMp();
|
int mp = player.getMaxMp();
|
||||||
int level = player.getLevel();
|
int level = player.getLevel();
|
||||||
MapleJob job = player.getJob();
|
Job job = player.getJob();
|
||||||
|
|
||||||
boolean canWash = true;
|
boolean canWash = true;
|
||||||
if (job.isA(MapleJob.SPEARMAN) && mp < 4 * level + 156) {
|
if (job.isA(Job.SPEARMAN) && mp < 4 * level + 156) {
|
||||||
canWash = false;
|
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;
|
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;
|
canWash = false;
|
||||||
} else if (mp < level * 14 + 148) {
|
} else if (mp < level * 14 + 148) {
|
||||||
canWash = false;
|
canWash = false;
|
||||||
@@ -619,12 +619,12 @@ public class AssignAPProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int calcHpChange(Character player, boolean usedAPReset) {
|
private static int calcHpChange(Character player, boolean usedAPReset) {
|
||||||
MapleJob job = player.getJob();
|
Job job = player.getJob();
|
||||||
int MaxHP = 0;
|
int MaxHP = 0;
|
||||||
|
|
||||||
if (job.isA(MapleJob.WARRIOR) || job.isA(MapleJob.DAWNWARRIOR1)) {
|
if (job.isA(Job.WARRIOR) || job.isA(Job.DAWNWARRIOR1)) {
|
||||||
if(!usedAPReset) {
|
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);
|
int sLvl = player.getSkillLevel(increaseHP);
|
||||||
|
|
||||||
if(sLvl > 0)
|
if(sLvl > 0)
|
||||||
@@ -640,7 +640,7 @@ public class AssignAPProcessor {
|
|||||||
} else {
|
} else {
|
||||||
MaxHP += 20;
|
MaxHP += 20;
|
||||||
}
|
}
|
||||||
} else if(job.isA(MapleJob.ARAN1)) {
|
} else if(job.isA(Job.ARAN1)) {
|
||||||
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
if(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||||
if (usedAPReset) {
|
if (usedAPReset) {
|
||||||
MaxHP += 20;
|
MaxHP += 20;
|
||||||
@@ -650,7 +650,7 @@ public class AssignAPProcessor {
|
|||||||
} else {
|
} else {
|
||||||
MaxHP += 28;
|
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(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||||
if (usedAPReset) {
|
if (usedAPReset) {
|
||||||
MaxHP += 6;
|
MaxHP += 6;
|
||||||
@@ -660,7 +660,7 @@ public class AssignAPProcessor {
|
|||||||
} else {
|
} else {
|
||||||
MaxHP += 6;
|
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(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||||
if (usedAPReset) {
|
if (usedAPReset) {
|
||||||
MaxHP += 16;
|
MaxHP += 16;
|
||||||
@@ -670,7 +670,7 @@ public class AssignAPProcessor {
|
|||||||
} else {
|
} else {
|
||||||
MaxHP += 16;
|
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(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||||
if (usedAPReset) {
|
if (usedAPReset) {
|
||||||
MaxHP += 16;
|
MaxHP += 16;
|
||||||
@@ -680,9 +680,9 @@ public class AssignAPProcessor {
|
|||||||
} else {
|
} else {
|
||||||
MaxHP += 16;
|
MaxHP += 16;
|
||||||
}
|
}
|
||||||
} else if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
} else if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||||
if(!usedAPReset) {
|
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);
|
int sLvl = player.getSkillLevel(increaseHP);
|
||||||
|
|
||||||
if(sLvl > 0)
|
if(sLvl > 0)
|
||||||
@@ -712,10 +712,10 @@ public class AssignAPProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int calcMpChange(Character player, boolean usedAPReset) {
|
private static int calcMpChange(Character player, boolean usedAPReset) {
|
||||||
MapleJob job = player.getJob();
|
Job job = player.getJob();
|
||||||
int MaxMP = 0;
|
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(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||||
if(!usedAPReset) {
|
if(!usedAPReset) {
|
||||||
MaxMP += (Randomizer.rand(2, 4) + (player.getInt() / 10));
|
MaxMP += (Randomizer.rand(2, 4) + (player.getInt() / 10));
|
||||||
@@ -725,9 +725,9 @@ public class AssignAPProcessor {
|
|||||||
} else {
|
} else {
|
||||||
MaxMP += 3;
|
MaxMP += 3;
|
||||||
}
|
}
|
||||||
} else if (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.BLAZEWIZARD1)) {
|
} else if (job.isA(Job.MAGICIAN) || job.isA(Job.BLAZEWIZARD1)) {
|
||||||
if(!usedAPReset) {
|
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);
|
int sLvl = player.getSkillLevel(increaseMP);
|
||||||
|
|
||||||
if(sLvl > 0)
|
if(sLvl > 0)
|
||||||
@@ -743,7 +743,7 @@ public class AssignAPProcessor {
|
|||||||
} else {
|
} else {
|
||||||
MaxMP += 18;
|
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(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||||
if(!usedAPReset) {
|
if(!usedAPReset) {
|
||||||
MaxMP += (Randomizer.rand(6, 8) + (player.getInt() / 10));
|
MaxMP += (Randomizer.rand(6, 8) + (player.getInt() / 10));
|
||||||
@@ -753,7 +753,7 @@ public class AssignAPProcessor {
|
|||||||
} else {
|
} else {
|
||||||
MaxMP += 10;
|
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(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||||
if(!usedAPReset) {
|
if(!usedAPReset) {
|
||||||
MaxMP += (Randomizer.rand(6, 8) + (player.getInt() / 10));
|
MaxMP += (Randomizer.rand(6, 8) + (player.getInt() / 10));
|
||||||
@@ -763,7 +763,7 @@ public class AssignAPProcessor {
|
|||||||
} else {
|
} else {
|
||||||
MaxMP += 10;
|
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(YamlConfig.config.server.USE_RANDOMIZE_HPMP_GAIN) {
|
||||||
if(!usedAPReset) {
|
if(!usedAPReset) {
|
||||||
MaxMP += (Randomizer.rand(7, 9) + (player.getInt() / 10));
|
MaxMP += (Randomizer.rand(7, 9) + (player.getInt() / 10));
|
||||||
@@ -788,18 +788,18 @@ public class AssignAPProcessor {
|
|||||||
return MaxMP;
|
return MaxMP;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int takeHp(MapleJob job) {
|
private static int takeHp(Job job) {
|
||||||
int MaxHP = 0;
|
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;
|
MaxHP += 54;
|
||||||
} else if (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.BLAZEWIZARD1)) {
|
} else if (job.isA(Job.MAGICIAN) || job.isA(Job.BLAZEWIZARD1)) {
|
||||||
MaxHP += 10;
|
MaxHP += 10;
|
||||||
} else if (job.isA(MapleJob.THIEF) || job.isA(MapleJob.NIGHTWALKER1)) {
|
} else if (job.isA(Job.THIEF) || job.isA(Job.NIGHTWALKER1)) {
|
||||||
MaxHP += 20;
|
MaxHP += 20;
|
||||||
} else if(job.isA(MapleJob.BOWMAN) || job.isA(MapleJob.WINDARCHER1)) {
|
} else if(job.isA(Job.BOWMAN) || job.isA(Job.WINDARCHER1)) {
|
||||||
MaxHP += 20;
|
MaxHP += 20;
|
||||||
} else if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
} else if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||||
MaxHP += 42;
|
MaxHP += 42;
|
||||||
} else {
|
} else {
|
||||||
MaxHP += 12;
|
MaxHP += 12;
|
||||||
@@ -808,18 +808,18 @@ public class AssignAPProcessor {
|
|||||||
return MaxHP;
|
return MaxHP;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int takeMp(MapleJob job) {
|
private static int takeMp(Job job) {
|
||||||
int MaxMP = 0;
|
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;
|
MaxMP += 4;
|
||||||
} else if (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.BLAZEWIZARD1)) {
|
} else if (job.isA(Job.MAGICIAN) || job.isA(Job.BLAZEWIZARD1)) {
|
||||||
MaxMP += 31;
|
MaxMP += 31;
|
||||||
} else if (job.isA(MapleJob.BOWMAN) || job.isA(MapleJob.WINDARCHER1)) {
|
} else if (job.isA(Job.BOWMAN) || job.isA(Job.WINDARCHER1)) {
|
||||||
MaxMP += 12;
|
MaxMP += 12;
|
||||||
} else if(job.isA(MapleJob.THIEF) || job.isA(MapleJob.NIGHTWALKER1)) {
|
} else if(job.isA(Job.THIEF) || job.isA(Job.NIGHTWALKER1)) {
|
||||||
MaxMP += 12;
|
MaxMP += 12;
|
||||||
} else if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
|
} else if (job.isA(Job.PIRATE) || job.isA(Job.THUNDERBREAKER1)) {
|
||||||
MaxMP += 16;
|
MaxMP += 16;
|
||||||
} else {
|
} else {
|
||||||
MaxMP += 8;
|
MaxMP += 8;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package constants.game;
|
package constants.game;
|
||||||
|
|
||||||
import client.Disease;
|
import client.Disease;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import config.YamlConfig;
|
import config.YamlConfig;
|
||||||
import constants.skills.Aran;
|
import constants.skills.Aran;
|
||||||
import provider.*;
|
import provider.*;
|
||||||
@@ -307,7 +307,7 @@ public class GameConstants {
|
|||||||
String name = jobNames.get(jobid);
|
String name = jobNames.get(jobid);
|
||||||
|
|
||||||
if(name == null) {
|
if(name == null) {
|
||||||
MapleJob job = MapleJob.getById(jobid);
|
Job job = Job.getById(jobid);
|
||||||
|
|
||||||
if(job != null) {
|
if(job != null) {
|
||||||
name = job.name().toLowerCase();
|
name = job.name().toLowerCase();
|
||||||
@@ -364,40 +364,40 @@ public class GameConstants {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte getHallOfFameBranch(MapleJob job, int mapid) {
|
public static byte getHallOfFameBranch(Job job, int mapid) {
|
||||||
if(!isHallOfFameMap(mapid)) {
|
if(!isHallOfFameMap(mapid)) {
|
||||||
return (byte) (26 + 4 * (mapid / 100000000)); // custom, 400 pnpcs available per continent
|
return (byte) (26 + 4 * (mapid / 100000000)); // custom, 400 pnpcs available per continent
|
||||||
}
|
}
|
||||||
|
|
||||||
if(job.isA(MapleJob.WARRIOR)) {
|
if(job.isA(Job.WARRIOR)) {
|
||||||
return 10;
|
return 10;
|
||||||
} else if(job.isA(MapleJob.MAGICIAN)) {
|
} else if(job.isA(Job.MAGICIAN)) {
|
||||||
return 11;
|
return 11;
|
||||||
} else if(job.isA(MapleJob.BOWMAN)) {
|
} else if(job.isA(Job.BOWMAN)) {
|
||||||
return 12;
|
return 12;
|
||||||
} else if(job.isA(MapleJob.THIEF)) {
|
} else if(job.isA(Job.THIEF)) {
|
||||||
return 13;
|
return 13;
|
||||||
} else if(job.isA(MapleJob.PIRATE)) {
|
} else if(job.isA(Job.PIRATE)) {
|
||||||
return 14;
|
return 14;
|
||||||
} else if(job.isA(MapleJob.DAWNWARRIOR1)) {
|
} else if(job.isA(Job.DAWNWARRIOR1)) {
|
||||||
return 15;
|
return 15;
|
||||||
} else if(job.isA(MapleJob.BLAZEWIZARD1)) {
|
} else if(job.isA(Job.BLAZEWIZARD1)) {
|
||||||
return 16;
|
return 16;
|
||||||
} else if(job.isA(MapleJob.WINDARCHER1)) {
|
} else if(job.isA(Job.WINDARCHER1)) {
|
||||||
return 17;
|
return 17;
|
||||||
} else if(job.isA(MapleJob.NIGHTWALKER1)) {
|
} else if(job.isA(Job.NIGHTWALKER1)) {
|
||||||
return 18;
|
return 18;
|
||||||
} else if(job.isA(MapleJob.THUNDERBREAKER1)) {
|
} else if(job.isA(Job.THUNDERBREAKER1)) {
|
||||||
return 19;
|
return 19;
|
||||||
} else if(job.isA(MapleJob.ARAN1)) {
|
} else if(job.isA(Job.ARAN1)) {
|
||||||
return 20;
|
return 20;
|
||||||
} else if(job.isA(MapleJob.EVAN1)) {
|
} else if(job.isA(Job.EVAN1)) {
|
||||||
return 21;
|
return 21;
|
||||||
} else if(job.isA(MapleJob.BEGINNER)) {
|
} else if(job.isA(Job.BEGINNER)) {
|
||||||
return 22;
|
return 22;
|
||||||
} else if(job.isA(MapleJob.NOBLESSE)) {
|
} else if(job.isA(Job.NOBLESSE)) {
|
||||||
return 23;
|
return 23;
|
||||||
} else if(job.isA(MapleJob.LEGEND)) {
|
} else if(job.isA(Job.LEGEND)) {
|
||||||
return 24;
|
return 24;
|
||||||
} else {
|
} else {
|
||||||
return 25;
|
return 25;
|
||||||
@@ -425,7 +425,7 @@ public class GameConstants {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getHallOfFameMapid(MapleJob job) {
|
public static int getHallOfFameMapid(Job job) {
|
||||||
int jobid = job.getId();
|
int jobid = job.getId();
|
||||||
|
|
||||||
if(isCygnus(jobid)) {
|
if(isCygnus(jobid)) {
|
||||||
@@ -433,15 +433,15 @@ public class GameConstants {
|
|||||||
} else if(isAran(jobid)) {
|
} else if(isAran(jobid)) {
|
||||||
return 140010110;
|
return 140010110;
|
||||||
} else {
|
} else {
|
||||||
if(job.isA(MapleJob.WARRIOR)) {
|
if(job.isA(Job.WARRIOR)) {
|
||||||
return 102000004;
|
return 102000004;
|
||||||
} else if(job.isA(MapleJob.MAGICIAN)) {
|
} else if(job.isA(Job.MAGICIAN)) {
|
||||||
return 101000004;
|
return 101000004;
|
||||||
} else if(job.isA(MapleJob.BOWMAN)) {
|
} else if(job.isA(Job.BOWMAN)) {
|
||||||
return 100000204;
|
return 100000204;
|
||||||
} else if(job.isA(MapleJob.THIEF)) {
|
} else if(job.isA(Job.THIEF)) {
|
||||||
return 103000008;
|
return 103000008;
|
||||||
} else if(job.isA(MapleJob.PIRATE)) {
|
} else if(job.isA(Job.PIRATE)) {
|
||||||
return 120000105;
|
return 120000105;
|
||||||
} else {
|
} else {
|
||||||
return 130000110; // beginner explorers are allotted with the Cygnus, available map lul
|
return 130000110; // beginner explorers are allotted with the Cygnus, available map lul
|
||||||
@@ -449,7 +449,7 @@ public class GameConstants {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getJobBranch(MapleJob job) {
|
public static int getJobBranch(Job job) {
|
||||||
int jobid = job.getId();
|
int jobid = job.getId();
|
||||||
|
|
||||||
if(jobid % 1000 == 0) {
|
if(jobid % 1000 == 0) {
|
||||||
@@ -461,7 +461,7 @@ public class GameConstants {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getJobMaxLevel(MapleJob job) {
|
public static int getJobMaxLevel(Job job) {
|
||||||
int jobBranch = getJobBranch(job);
|
int jobBranch = getJobBranch(job);
|
||||||
|
|
||||||
switch(jobBranch) {
|
switch(jobBranch) {
|
||||||
@@ -619,7 +619,7 @@ public class GameConstants {
|
|||||||
return MapleQuest.getInstance(questid).getMedalRequirement() != -1;
|
return MapleQuest.getInstance(questid).getMedalRequirement() != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasSPTable(MapleJob job) {
|
public static boolean hasSPTable(Job job) {
|
||||||
switch (job) {
|
switch (job) {
|
||||||
case EVAN:
|
case EVAN:
|
||||||
case EVAN1:
|
case EVAN1:
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ public abstract class AbstractDealDamageHandler extends AbstractPacketHandler {
|
|||||||
if(attack.magic)
|
if(attack.magic)
|
||||||
distanceToDetect += 200000;
|
distanceToDetect += 200000;
|
||||||
|
|
||||||
if(player.getJob().isA(MapleJob.ARAN1))
|
if(player.getJob().isA(Job.ARAN1))
|
||||||
distanceToDetect += 200000; // Arans have extra range over normal warriors.
|
distanceToDetect += 200000; // Arans have extra range over normal warriors.
|
||||||
|
|
||||||
if(attack.skill == Aran.COMBO_SMASH || attack.skill == Aran.BODY_PRESSURE)
|
if(attack.skill == Aran.COMBO_SMASH || attack.skill == Aran.BODY_PRESSURE)
|
||||||
@@ -625,19 +625,19 @@ public abstract class AbstractDealDamageHandler extends AbstractPacketHandler {
|
|||||||
|
|
||||||
if (magic) {
|
if (magic) {
|
||||||
// Since the skill is magic based, use the magic formula
|
// Since the skill is magic based, use the magic formula
|
||||||
if(chr.getJob() == MapleJob.IL_ARCHMAGE || chr.getJob() == MapleJob.IL_MAGE) {
|
if(chr.getJob() == Job.IL_ARCHMAGE || chr.getJob() == Job.IL_MAGE) {
|
||||||
int skillLvl = chr.getSkillLevel(ILMage.ELEMENT_AMPLIFICATION);
|
int skillLvl = chr.getSkillLevel(ILMage.ELEMENT_AMPLIFICATION);
|
||||||
if(skillLvl > 0)
|
if(skillLvl > 0)
|
||||||
calcDmgMax = calcDmgMax * SkillFactory.getSkill(ILMage.ELEMENT_AMPLIFICATION).getEffect(skillLvl).getY() / 100;
|
calcDmgMax = calcDmgMax * SkillFactory.getSkill(ILMage.ELEMENT_AMPLIFICATION).getEffect(skillLvl).getY() / 100;
|
||||||
} else if(chr.getJob() == MapleJob.FP_ARCHMAGE || chr.getJob() == MapleJob.FP_MAGE) {
|
} else if(chr.getJob() == Job.FP_ARCHMAGE || chr.getJob() == Job.FP_MAGE) {
|
||||||
int skillLvl = chr.getSkillLevel(FPMage.ELEMENT_AMPLIFICATION);
|
int skillLvl = chr.getSkillLevel(FPMage.ELEMENT_AMPLIFICATION);
|
||||||
if(skillLvl > 0)
|
if(skillLvl > 0)
|
||||||
calcDmgMax = calcDmgMax * SkillFactory.getSkill(FPMage.ELEMENT_AMPLIFICATION).getEffect(skillLvl).getY() / 100;
|
calcDmgMax = calcDmgMax * SkillFactory.getSkill(FPMage.ELEMENT_AMPLIFICATION).getEffect(skillLvl).getY() / 100;
|
||||||
} else if(chr.getJob() == MapleJob.BLAZEWIZARD3 || chr.getJob() == MapleJob.BLAZEWIZARD4) {
|
} else if(chr.getJob() == Job.BLAZEWIZARD3 || chr.getJob() == Job.BLAZEWIZARD4) {
|
||||||
int skillLvl = chr.getSkillLevel(BlazeWizard.ELEMENT_AMPLIFICATION);
|
int skillLvl = chr.getSkillLevel(BlazeWizard.ELEMENT_AMPLIFICATION);
|
||||||
if(skillLvl > 0)
|
if(skillLvl > 0)
|
||||||
calcDmgMax = calcDmgMax * SkillFactory.getSkill(BlazeWizard.ELEMENT_AMPLIFICATION).getEffect(skillLvl).getY() / 100;
|
calcDmgMax = calcDmgMax * SkillFactory.getSkill(BlazeWizard.ELEMENT_AMPLIFICATION).getEffect(skillLvl).getY() / 100;
|
||||||
} else if(chr.getJob() == MapleJob.EVAN7 || chr.getJob() == MapleJob.EVAN8 || chr.getJob() == MapleJob.EVAN9 || chr.getJob() == MapleJob.EVAN10) {
|
} else if(chr.getJob() == Job.EVAN7 || chr.getJob() == Job.EVAN8 || chr.getJob() == Job.EVAN9 || chr.getJob() == Job.EVAN10) {
|
||||||
int skillLvl = chr.getSkillLevel(Evan.MAGIC_AMPLIFICATION);
|
int skillLvl = chr.getSkillLevel(Evan.MAGIC_AMPLIFICATION);
|
||||||
if(skillLvl > 0)
|
if(skillLvl > 0)
|
||||||
calcDmgMax = calcDmgMax * SkillFactory.getSkill(Evan.MAGIC_AMPLIFICATION).getEffect(skillLvl).getY() / 100;
|
calcDmgMax = calcDmgMax * SkillFactory.getSkill(Evan.MAGIC_AMPLIFICATION).getEffect(skillLvl).getY() / 100;
|
||||||
@@ -717,7 +717,7 @@ public abstract class AbstractDealDamageHandler extends AbstractPacketHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean canCrit = false;
|
boolean canCrit = false;
|
||||||
if(chr.getJob().isA((MapleJob.BOWMAN)) || chr.getJob().isA(MapleJob.THIEF) || chr.getJob().isA(MapleJob.NIGHTWALKER1) || chr.getJob().isA(MapleJob.WINDARCHER1) || chr.getJob() == MapleJob.ARAN3 || chr.getJob() == MapleJob.ARAN4 || chr.getJob() == MapleJob.MARAUDER || chr.getJob() == MapleJob.BUCCANEER) {
|
if(chr.getJob().isA((Job.BOWMAN)) || chr.getJob().isA(Job.THIEF) || chr.getJob().isA(Job.NIGHTWALKER1) || chr.getJob().isA(Job.WINDARCHER1) || chr.getJob() == Job.ARAN3 || chr.getJob() == Job.ARAN4 || chr.getJob() == Job.MARAUDER || chr.getJob() == Job.BUCCANEER) {
|
||||||
canCrit = true;
|
canCrit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
package net.server.channel.handlers;
|
package net.server.channel.handlers;
|
||||||
|
|
||||||
import client.Client;
|
import client.Client;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import net.AbstractPacketHandler;
|
import net.AbstractPacketHandler;
|
||||||
import net.packet.InPacket;
|
import net.packet.InPacket;
|
||||||
import scripting.npc.NPCScriptManager;
|
import scripting.npc.NPCScriptManager;
|
||||||
@@ -35,7 +35,7 @@ import scripting.npc.NPCScriptManager;
|
|||||||
public class ClickGuideHandler extends AbstractPacketHandler {
|
public class ClickGuideHandler extends AbstractPacketHandler {
|
||||||
@Override
|
@Override
|
||||||
public void handlePacket(InPacket p, Client c) {
|
public void handlePacket(InPacket p, Client c) {
|
||||||
if (c.getPlayer().getJob().equals(MapleJob.NOBLESSE)) {
|
if (c.getPlayer().getJob().equals(Job.NOBLESSE)) {
|
||||||
NPCScriptManager.getInstance().start(c, 1101008, null);
|
NPCScriptManager.getInstance().start(c, 1101008, null);
|
||||||
} else {
|
} else {
|
||||||
NPCScriptManager.getInstance().start(c, 1202000, null);
|
NPCScriptManager.getInstance().start(c, 1202000, null);
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public final class CloseRangeDamageHandler extends AbstractDealDamageHandler {
|
|||||||
chr.getMap().broadcastMessage(chr, PacketCreator.giveForeignBuff(chr.getId(), stat), false);
|
chr.getMap().broadcastMessage(chr, PacketCreator.giveForeignBuff(chr.getId(), stat), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (chr.getSkillLevel(chr.isCygnus() ? SkillFactory.getSkill(15100004) : SkillFactory.getSkill(5110001)) > 0 && (chr.getJob().isA(MapleJob.MARAUDER) || chr.getJob().isA(MapleJob.THUNDERBREAKER2))) {
|
} else if (chr.getSkillLevel(chr.isCygnus() ? SkillFactory.getSkill(15100004) : SkillFactory.getSkill(5110001)) > 0 && (chr.getJob().isA(Job.MARAUDER) || chr.getJob().isA(Job.THUNDERBREAKER2))) {
|
||||||
for (int i = 0; i < attack.numAttacked; i++) {
|
for (int i = 0; i < attack.numAttacked; i++) {
|
||||||
chr.handleEnergyChargeGain();
|
chr.handleEnergyChargeGain();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
package net.server.coordinator.partysearch;
|
package net.server.coordinator.partysearch;
|
||||||
|
|
||||||
import client.Character;
|
import client.Character;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import config.YamlConfig;
|
import config.YamlConfig;
|
||||||
import net.server.audit.locks.MonitoredLockType;
|
import net.server.audit.locks.MonitoredLockType;
|
||||||
import net.server.audit.locks.MonitoredReadLock;
|
import net.server.audit.locks.MonitoredReadLock;
|
||||||
@@ -47,8 +47,8 @@ import java.util.Map.Entry;
|
|||||||
*/
|
*/
|
||||||
public class MaplePartySearchCoordinator {
|
public class MaplePartySearchCoordinator {
|
||||||
|
|
||||||
private Map<MapleJob, PartySearchStorage> storage = new HashMap<>();
|
private Map<Job, PartySearchStorage> storage = new HashMap<>();
|
||||||
private Map<MapleJob, PartySearchEchelon> upcomers = new HashMap<>();
|
private Map<Job, PartySearchEchelon> upcomers = new HashMap<>();
|
||||||
|
|
||||||
private List<Character> leaderQueue = new LinkedList<>();
|
private List<Character> leaderQueue = new LinkedList<>();
|
||||||
private final MonitoredReentrantReadWriteLock leaderQueueLock = new MonitoredReentrantReadWriteLock(MonitoredLockType.WORLD_PARTY_SEARCH_QUEUE, true);
|
private final MonitoredReentrantReadWriteLock leaderQueueLock = new MonitoredReentrantReadWriteLock(MonitoredLockType.WORLD_PARTY_SEARCH_QUEUE, true);
|
||||||
@@ -63,7 +63,7 @@ public class MaplePartySearchCoordinator {
|
|||||||
private int updateCount = 0;
|
private int updateCount = 0;
|
||||||
|
|
||||||
private static Map<Integer, Set<Integer>> mapNeighbors = fetchNeighbouringMaps();
|
private static Map<Integer, Set<Integer>> mapNeighbors = fetchNeighbouringMaps();
|
||||||
private static Map<Integer, MapleJob> jobTable = instantiateJobTable();
|
private static Map<Integer, Job> jobTable = instantiateJobTable();
|
||||||
|
|
||||||
private static Map<Integer, Set<Integer>> fetchNeighbouringMaps() {
|
private static Map<Integer, Set<Integer>> fetchNeighbouringMaps() {
|
||||||
Map<Integer, Set<Integer>> mapLinks = new HashMap<>();
|
Map<Integer, Set<Integer>> mapLinks = new HashMap<>();
|
||||||
@@ -104,33 +104,33 @@ public class MaplePartySearchCoordinator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Map<Integer, MapleJob> instantiateJobTable() {
|
private static Map<Integer, Job> instantiateJobTable() {
|
||||||
Map<Integer, MapleJob> table = new HashMap<>();
|
Map<Integer, Job> table = new HashMap<>();
|
||||||
|
|
||||||
List<Pair<Integer, Integer>> jobSearchTypes = new LinkedList<Pair<Integer, Integer>>() {{
|
List<Pair<Integer, Integer>> jobSearchTypes = new LinkedList<Pair<Integer, Integer>>() {{
|
||||||
add(new Pair<>(MapleJob.MAPLELEAF_BRIGADIER.getId(), 0));
|
add(new Pair<>(Job.MAPLELEAF_BRIGADIER.getId(), 0));
|
||||||
add(new Pair<>(0, 0));
|
add(new Pair<>(0, 0));
|
||||||
add(new Pair<>(MapleJob.ARAN1.getId(), 0));
|
add(new Pair<>(Job.ARAN1.getId(), 0));
|
||||||
add(new Pair<>(100, 3));
|
add(new Pair<>(100, 3));
|
||||||
add(new Pair<>(MapleJob.DAWNWARRIOR1.getId(), 0));
|
add(new Pair<>(Job.DAWNWARRIOR1.getId(), 0));
|
||||||
add(new Pair<>(200, 3));
|
add(new Pair<>(200, 3));
|
||||||
add(new Pair<>(MapleJob.BLAZEWIZARD1.getId(), 0));
|
add(new Pair<>(Job.BLAZEWIZARD1.getId(), 0));
|
||||||
add(new Pair<>(500, 2));
|
add(new Pair<>(500, 2));
|
||||||
add(new Pair<>(MapleJob.THUNDERBREAKER1.getId(), 0));
|
add(new Pair<>(Job.THUNDERBREAKER1.getId(), 0));
|
||||||
add(new Pair<>(400, 2));
|
add(new Pair<>(400, 2));
|
||||||
add(new Pair<>(MapleJob.NIGHTWALKER1.getId(), 0));
|
add(new Pair<>(Job.NIGHTWALKER1.getId(), 0));
|
||||||
add(new Pair<>(300, 2));
|
add(new Pair<>(300, 2));
|
||||||
add(new Pair<>(MapleJob.WINDARCHER1.getId(), 0));
|
add(new Pair<>(Job.WINDARCHER1.getId(), 0));
|
||||||
add(new Pair<>(MapleJob.EVAN1.getId(), 0));
|
add(new Pair<>(Job.EVAN1.getId(), 0));
|
||||||
}};
|
}};
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Pair<Integer, Integer> p : jobSearchTypes) {
|
for (Pair<Integer, Integer> p : jobSearchTypes) {
|
||||||
table.put(i, MapleJob.getById(p.getLeft()));
|
table.put(i, Job.getById(p.getLeft()));
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
for (int j = 1; j <= p.getRight(); j++) {
|
for (int j = 1; j <= p.getRight(); j++) {
|
||||||
table.put(i, MapleJob.getById(p.getLeft() + 10 * j));
|
table.put(i, Job.getById(p.getLeft() + 10 * j));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,18 +141,18 @@ public class MaplePartySearchCoordinator {
|
|||||||
private class LeaderSearchMetadata {
|
private class LeaderSearchMetadata {
|
||||||
private int minLevel;
|
private int minLevel;
|
||||||
private int maxLevel;
|
private int maxLevel;
|
||||||
private List<MapleJob> searchedJobs;
|
private List<Job> searchedJobs;
|
||||||
|
|
||||||
private int reentryCount;
|
private int reentryCount;
|
||||||
|
|
||||||
private List<MapleJob> decodeSearchedJobs(int jobsSelected) {
|
private List<Job> decodeSearchedJobs(int jobsSelected) {
|
||||||
List<MapleJob> searchedJobs = new LinkedList<>();
|
List<Job> searchedJobs = new LinkedList<>();
|
||||||
|
|
||||||
int topByte = (int)((Math.log(jobsSelected) / Math.log(2)) + 1e-5);
|
int topByte = (int)((Math.log(jobsSelected) / Math.log(2)) + 1e-5);
|
||||||
|
|
||||||
for (int i = 0; i <= topByte; i++) {
|
for (int i = 0; i <= topByte; i++) {
|
||||||
if (jobsSelected % 2 == 1) {
|
if (jobsSelected % 2 == 1) {
|
||||||
MapleJob job = jobTable.get(i);
|
Job job = jobTable.get(i);
|
||||||
if (job != null) {
|
if (job != null) {
|
||||||
searchedJobs.add(job);
|
searchedJobs.add(job);
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,7 @@ public class MaplePartySearchCoordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MaplePartySearchCoordinator() {
|
public MaplePartySearchCoordinator() {
|
||||||
for (MapleJob job : jobTable.values()) {
|
for (Job job : jobTable.values()) {
|
||||||
storage.put(job, new PartySearchStorage());
|
storage.put(job, new PartySearchStorage());
|
||||||
upcomers.put(job, new PartySearchEchelon());
|
upcomers.put(job, new PartySearchEchelon());
|
||||||
}
|
}
|
||||||
@@ -188,7 +188,7 @@ public class MaplePartySearchCoordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void detachPlayer(Character chr) {
|
public void detachPlayer(Character chr) {
|
||||||
MapleJob psJob = getPartySearchJob(chr.getJob());
|
Job psJob = getPartySearchJob(chr.getJob());
|
||||||
|
|
||||||
if (!upcomers.get(psJob).detachPlayer(chr)) {
|
if (!upcomers.get(psJob).detachPlayer(chr)) {
|
||||||
storage.get(psJob).detachPlayer(chr);
|
storage.get(psJob).detachPlayer(chr);
|
||||||
@@ -196,24 +196,24 @@ public class MaplePartySearchCoordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updatePartySearchStorage() {
|
public void updatePartySearchStorage() {
|
||||||
for (Entry<MapleJob, PartySearchEchelon> psUpdate : upcomers.entrySet()) {
|
for (Entry<Job, PartySearchEchelon> psUpdate : upcomers.entrySet()) {
|
||||||
storage.get(psUpdate.getKey()).updateStorage(psUpdate.getValue().exportEchelon());
|
storage.get(psUpdate.getKey()).updateStorage(psUpdate.getValue().exportEchelon());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MapleJob getPartySearchJob(MapleJob job) {
|
private static Job getPartySearchJob(Job job) {
|
||||||
if (job.getJobNiche() == 0) {
|
if (job.getJobNiche() == 0) {
|
||||||
return MapleJob.BEGINNER;
|
return Job.BEGINNER;
|
||||||
} else if (job.getId() < 600) { // explorers
|
} else if (job.getId() < 600) { // explorers
|
||||||
return MapleJob.getById((job.getId() / 10) * 10);
|
return Job.getById((job.getId() / 10) * 10);
|
||||||
} else if (job.getId() >= 1000) {
|
} else if (job.getId() >= 1000) {
|
||||||
return MapleJob.getById((job.getId() / 100) * 100);
|
return Job.getById((job.getId() / 100) * 100);
|
||||||
} else {
|
} else {
|
||||||
return MapleJob.MAPLELEAF_BRIGADIER;
|
return Job.MAPLELEAF_BRIGADIER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Character fetchPlayer(int callerCid, int callerMapid, MapleJob job, int minLevel, int maxLevel) {
|
private Character fetchPlayer(int callerCid, int callerMapid, Job job, int minLevel, int maxLevel) {
|
||||||
return storage.get(getPartySearchJob(job)).callPlayer(callerCid, callerMapid, minLevel, maxLevel);
|
return storage.get(getPartySearchJob(job)).callPlayer(callerCid, callerMapid, minLevel, maxLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ public class MaplePartySearchCoordinator {
|
|||||||
|
|
||||||
int leaderCid = leader.getId();
|
int leaderCid = leader.getId();
|
||||||
int leaderMapid = leader.getMapId();
|
int leaderMapid = leader.getMapId();
|
||||||
for (MapleJob searchJob : settings.searchedJobs) {
|
for (Job searchJob : settings.searchedJobs) {
|
||||||
Character chr = fetchPlayer(leaderCid, leaderMapid, searchJob, minLevel, maxLevel);
|
Character chr = fetchPlayer(leaderCid, leaderMapid, searchJob, minLevel, maxLevel);
|
||||||
if (chr != null) {
|
if (chr != null) {
|
||||||
return chr;
|
return chr;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
package net.server.task;
|
package net.server.task;
|
||||||
|
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import config.YamlConfig;
|
import config.YamlConfig;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import tools.DatabaseConnection;
|
import tools.DatabaseConnection;
|
||||||
@@ -96,7 +96,7 @@ public class RankingLoginTask implements Runnable {
|
|||||||
|
|
||||||
for (int j = 0; j < Server.getInstance().getWorldsSize(); j++) {
|
for (int j = 0; j < Server.getInstance().getWorldsSize(); j++) {
|
||||||
updateRanking(-1, j); //overall ranking
|
updateRanking(-1, j); //overall ranking
|
||||||
for (int i = 0; i <= MapleJob.getMax(); i++) {
|
for (int i = 0; i <= Job.getMax(); i++) {
|
||||||
updateRanking(i, j);
|
updateRanking(i, j);
|
||||||
}
|
}
|
||||||
con.commit();
|
con.commit();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
package net.server.world;
|
package net.server.world;
|
||||||
|
|
||||||
import client.Character;
|
import client.Character;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
|
|
||||||
public class MaplePartyCharacter {
|
public class MaplePartyCharacter {
|
||||||
private String name;
|
private String name;
|
||||||
@@ -32,7 +32,7 @@ public class MaplePartyCharacter {
|
|||||||
private int jobid;
|
private int jobid;
|
||||||
private int mapid;
|
private int mapid;
|
||||||
private boolean online;
|
private boolean online;
|
||||||
private MapleJob job;
|
private Job job;
|
||||||
private Character character;
|
private Character character;
|
||||||
|
|
||||||
public MaplePartyCharacter(Character maplechar) {
|
public MaplePartyCharacter(Character maplechar) {
|
||||||
@@ -56,7 +56,7 @@ public class MaplePartyCharacter {
|
|||||||
return character;
|
return character;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleJob getJob() {
|
public Job getJob() {
|
||||||
return job;
|
return job;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class AbstractPlayerInteraction {
|
|||||||
return getPlayer().getJob().getId();
|
return getPlayer().getJob().getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleJob getJob(){
|
public Job getJob(){
|
||||||
return getPlayer().getJob();
|
return getPlayer().getJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -353,10 +353,10 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void changeJobById(int a) {
|
public void changeJobById(int a) {
|
||||||
getPlayer().changeJob(MapleJob.getById(a));
|
getPlayer().changeJob(Job.getById(a));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeJob(MapleJob job) {
|
public void changeJob(Job job) {
|
||||||
getPlayer().changeJob(job);
|
getPlayer().changeJob(job);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ public class MapleItemInformationProvider {
|
|||||||
|
|
||||||
// thanks GMChuck for detecting player sensitive data being cached into getSlotMax
|
// thanks GMChuck for detecting player sensitive data being cached into getSlotMax
|
||||||
if (ItemConstants.isThrowingStar(itemId)) {
|
if (ItemConstants.isThrowingStar(itemId)) {
|
||||||
if(c.getPlayer().getJob().isA(MapleJob.NIGHTWALKER1)) {
|
if(c.getPlayer().getJob().isA(Job.NIGHTWALKER1)) {
|
||||||
ret += c.getPlayer().getSkillLevel(SkillFactory.getSkill(NightWalker.CLAW_MASTERY)) * 10;
|
ret += c.getPlayer().getSkillLevel(SkillFactory.getSkill(NightWalker.CLAW_MASTERY)) * 10;
|
||||||
} else {
|
} else {
|
||||||
ret += c.getPlayer().getSkillLevel(SkillFactory.getSkill(Assassin.CLAW_MASTERY)) * 10;
|
ret += c.getPlayer().getSkillLevel(SkillFactory.getSkill(Assassin.CLAW_MASTERY)) * 10;
|
||||||
@@ -1587,7 +1587,7 @@ public class MapleItemInformationProvider {
|
|||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
Collection<Item> itemz = new LinkedList<>();
|
Collection<Item> itemz = new LinkedList<>();
|
||||||
if (chr.getJob() == MapleJob.SUPERGM || chr.getJob() == MapleJob.GM) {
|
if (chr.getJob() == Job.SUPERGM || chr.getJob() == Job.GM) {
|
||||||
for (Item item : items) {
|
for (Item item : items) {
|
||||||
Equip equip = (Equip) item;
|
Equip equip = (Equip) item;
|
||||||
equip.wear(true);
|
equip.wear(true);
|
||||||
@@ -1609,7 +1609,7 @@ public class MapleItemInformationProvider {
|
|||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}*/
|
}*/
|
||||||
int tdex = chr.getDex(), tstr = chr.getStr(), tint = chr.getInt(), tluk = chr.getLuk(), fame = chr.getFame();
|
int tdex = chr.getDex(), tstr = chr.getStr(), tint = chr.getInt(), tluk = chr.getLuk(), fame = chr.getFame();
|
||||||
if (chr.getJob() != MapleJob.SUPERGM || chr.getJob() != MapleJob.GM) {
|
if (chr.getJob() != Job.SUPERGM || chr.getJob() != Job.GM) {
|
||||||
for (Item item : inv.list()) {
|
for (Item item : inv.list()) {
|
||||||
Equip equip = (Equip) item;
|
Equip equip = (Equip) item;
|
||||||
tdex += equip.getDex();
|
tdex += equip.getDex();
|
||||||
@@ -1675,7 +1675,7 @@ public class MapleItemInformationProvider {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chr.getJob() == MapleJob.SUPERGM || chr.getJob() == MapleJob.GM) {
|
if (chr.getJob() == Job.SUPERGM || chr.getJob() == Job.GM) {
|
||||||
equip.wear(true);
|
equip.wear(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1395,10 +1395,10 @@ public class MapleStatEffect {
|
|||||||
if (primary) {
|
if (primary) {
|
||||||
if (mpCon != 0) {
|
if (mpCon != 0) {
|
||||||
double mod = 1.0;
|
double mod = 1.0;
|
||||||
boolean isAFpMage = applyfrom.getJob().isA(MapleJob.FP_MAGE);
|
boolean isAFpMage = applyfrom.getJob().isA(Job.FP_MAGE);
|
||||||
boolean isCygnus = applyfrom.getJob().isA(MapleJob.BLAZEWIZARD2);
|
boolean isCygnus = applyfrom.getJob().isA(Job.BLAZEWIZARD2);
|
||||||
boolean isEvan = applyfrom.getJob().isA(MapleJob.EVAN7);
|
boolean isEvan = applyfrom.getJob().isA(Job.EVAN7);
|
||||||
if (isAFpMage || isCygnus || isEvan || applyfrom.getJob().isA(MapleJob.IL_MAGE)) {
|
if (isAFpMage || isCygnus || isEvan || applyfrom.getJob().isA(Job.IL_MAGE)) {
|
||||||
Skill amp = isAFpMage ? SkillFactory.getSkill(FPMage.ELEMENT_AMPLIFICATION) : (isCygnus ? SkillFactory.getSkill(BlazeWizard.ELEMENT_AMPLIFICATION) : (isEvan ? SkillFactory.getSkill(Evan.MAGIC_AMPLIFICATION) : SkillFactory.getSkill(ILMage.ELEMENT_AMPLIFICATION)));
|
Skill amp = isAFpMage ? SkillFactory.getSkill(FPMage.ELEMENT_AMPLIFICATION) : (isCygnus ? SkillFactory.getSkill(BlazeWizard.ELEMENT_AMPLIFICATION) : (isEvan ? SkillFactory.getSkill(Evan.MAGIC_AMPLIFICATION) : SkillFactory.getSkill(ILMage.ELEMENT_AMPLIFICATION)));
|
||||||
int ampLevel = applyfrom.getSkillLevel(amp);
|
int ampLevel = applyfrom.getSkillLevel(amp);
|
||||||
if (ampLevel > 0) {
|
if (ampLevel > 0) {
|
||||||
@@ -1421,7 +1421,7 @@ public class MapleStatEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int alchemistModifyVal(Character chr, int val, boolean withX) {
|
private int alchemistModifyVal(Character chr, int val, boolean withX) {
|
||||||
if (!skill && (chr.getJob().isA(MapleJob.HERMIT) || chr.getJob().isA(MapleJob.NIGHTWALKER3))) {
|
if (!skill && (chr.getJob().isA(Job.HERMIT) || chr.getJob().isA(Job.NIGHTWALKER3))) {
|
||||||
MapleStatEffect alchemistEffect = getAlchemistEffect(chr);
|
MapleStatEffect alchemistEffect = getAlchemistEffect(chr);
|
||||||
if (alchemistEffect != null) {
|
if (alchemistEffect != null) {
|
||||||
return (int) (val * ((withX ? alchemistEffect.getX() : alchemistEffect.getY()) / 100.0));
|
return (int) (val * ((withX ? alchemistEffect.getX() : alchemistEffect.getY()) / 100.0));
|
||||||
|
|||||||
@@ -1204,7 +1204,7 @@ public class MapleMonster extends AbstractLoadedMapleLife {
|
|||||||
overtimeAction = new DamageTask(poisonDamage, from, status, 0);
|
overtimeAction = new DamageTask(poisonDamage, from, status, 0);
|
||||||
overtimeDelay = 1000;
|
overtimeDelay = 1000;
|
||||||
} else if (venom) {
|
} else if (venom) {
|
||||||
if (from.getJob() == MapleJob.NIGHTLORD || from.getJob() == MapleJob.SHADOWER || from.getJob().isA(MapleJob.NIGHTWALKER3)) {
|
if (from.getJob() == Job.NIGHTLORD || from.getJob() == Job.SHADOWER || from.getJob().isA(Job.NIGHTWALKER3)) {
|
||||||
int poisonLevel, matk, jobid = from.getJob().getId();
|
int poisonLevel, matk, jobid = from.getJob().getId();
|
||||||
int skillid = (jobid == 412 ? NightLord.VENOMOUS_STAR : (jobid == 422 ? Shadower.VENOMOUS_STAB : NightWalker.VENOM));
|
int skillid = (jobid == 412 ? NightLord.VENOMOUS_STAR : (jobid == 422 ? Shadower.VENOMOUS_STAB : NightWalker.VENOM));
|
||||||
poisonLevel = from.getSkillLevel(SkillFactory.getSkill(skillid));
|
poisonLevel = from.getSkillLevel(SkillFactory.getSkill(skillid));
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
package server.quest.actions;
|
package server.quest.actions;
|
||||||
|
|
||||||
import client.Character;
|
import client.Character;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import client.Skill;
|
import client.Skill;
|
||||||
import client.SkillFactory;
|
import client.SkillFactory;
|
||||||
import provider.MapleData;
|
import provider.MapleData;
|
||||||
@@ -114,7 +114,7 @@ public class SkillAction extends MapleQuestAction {
|
|||||||
return masterLevel;
|
return masterLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean jobsContains(MapleJob job) {
|
public boolean jobsContains(Job job) {
|
||||||
return jobs.contains(job.getId());
|
return jobs.contains(job.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
package server.quest.requirements;
|
package server.quest.requirements;
|
||||||
|
|
||||||
import client.Character;
|
import client.Character;
|
||||||
import client.MapleJob;
|
import client.Job;
|
||||||
import provider.MapleData;
|
import provider.MapleData;
|
||||||
import provider.MapleDataTool;
|
import provider.MapleDataTool;
|
||||||
import server.quest.MapleQuest;
|
import server.quest.MapleQuest;
|
||||||
@@ -58,7 +58,7 @@ public class JobRequirement extends MapleQuestRequirement {
|
|||||||
@Override
|
@Override
|
||||||
public boolean check(Character chr, Integer npcid) {
|
public boolean check(Character chr, Integer npcid) {
|
||||||
for(Integer job : jobs) {
|
for(Integer job : jobs) {
|
||||||
if (chr.getJob().equals(MapleJob.getById(job)) || chr.isGM()) {
|
if (chr.getJob().equals(Job.getById(job)) || chr.isGM()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1915,7 +1915,7 @@ public class PacketCreator {
|
|||||||
p.writeShort(chr.getJob().getId());
|
p.writeShort(chr.getJob().getId());
|
||||||
|
|
||||||
/* replace "p.writeShort(chr.getJob().getId())" with this snippet for 3rd person FJ animation on all classes
|
/* replace "p.writeShort(chr.getJob().getId())" with this snippet for 3rd person FJ animation on all classes
|
||||||
if (chr.getJob().isA(MapleJob.HERMIT) || chr.getJob().isA(MapleJob.DAWNWARRIOR2) || chr.getJob().isA(MapleJob.NIGHTWALKER2)) {
|
if (chr.getJob().isA(Job.HERMIT) || chr.getJob().isA(Job.DAWNWARRIOR2) || chr.getJob().isA(Job.NIGHTWALKER2)) {
|
||||||
p.writeShort(chr.getJob().getId());
|
p.writeShort(chr.getJob().getId());
|
||||||
} else {
|
} else {
|
||||||
p.writeShort(412);
|
p.writeShort(412);
|
||||||
|
|||||||
Reference in New Issue
Block a user