Fixed quest rewarding + Lethal attacks in Dojo

Fixed quests not giving items in some cases, lethal damages rendering
dojo uncompletable and added new scripts.
This commit is contained in:
ronancpl
2017-04-07 21:42:42 -03:00
parent f6935d3d3b
commit c8f905e1a5
23 changed files with 7503 additions and 6922 deletions
+23 -8
View File
@@ -178,14 +178,29 @@ public class ItemAction extends MapleQuestAction {
if (item.getGender() != 2 && item.getGender() != chr.getGender()) {
return false;
}
if(item.getJob() != -1) {
if (item.getJob() != chr.getJob().getId()) {
return false;
} else if (MapleJob.getBy5ByteEncoding(item.getJob()).getId() / 100 != chr.getJob().getId() / 100) {
return false;
}
}
if (item.job > 0) {
final List<Integer> code = getJobBy5ByteEncoding(item.getJob());
boolean jobFound = false;
for (int codec : code) {
if (codec / 100 == chr.getJob().getId() / 100) {
jobFound = true;
break;
}
}
/*
if (!jobFound && item.jobEx > 0) {
final List<Integer> codeEx = getJobBySimpleEncoding(item.jobEx);
for (int codec : codeEx) {
if ((codec / 100 % 10) == (chr.getJob().getId() / 100 % 10)) {
jobFound = true;
break;
}
}
}
*/
return jobFound;
}
return true;
}