Concurrency fix + new scripts

Fixed some situation involving concurrency upon using getCharacters()
from MapleMap, added scripts and other bug fixes.
This commit is contained in:
ronancpl
2017-04-08 19:29:27 -03:00
parent c8f905e1a5
commit 7dc163fc76
38 changed files with 684 additions and 180 deletions

View File

@@ -64,13 +64,12 @@ public final class SkillBookHandler extends AbstractMaplePacketHandler {
canuse = false;
} else if ((player.getSkillLevel(skill2) >= skilldata.get("reqSkillLevel") || skilldata.get("reqSkillLevel") == 0) && player.getMasterLevel(skill2) < skilldata.get("masterLevel")) {
canuse = true;
if (Randomizer.nextInt(101) < skilldata.get("success") && skilldata.get("success") != 0) {
if (MapleItemInformationProvider.rollSuccessChance(skilldata.get("success"))) {
success = true;
player.changeSkillLevel(skill2, player.getSkillLevel(skill2), Math.max(skilldata.get("masterLevel"), player.getMasterLevel(skill2)), -1);
} else {
success = false;
player.dropMessage("The skill book lights up, but the skill winds up as if nothing happened.");
//player.dropMessage("The skill book lights up, but the skill winds up as if nothing happened.");
}
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, slot, (short) 1, false);
} else {