Fixed minor skill exploits + EXP system

Fixed minor issues regarding exploits with some skills available on the
"empowerme" command, and fixed an error with the EXP system.
This commit is contained in:
ronancpl
2017-06-06 11:48:32 -03:00
parent 83d20e3c8b
commit dbac58e871
36 changed files with 130 additions and 62 deletions

View File

@@ -708,9 +708,11 @@ public class MapleStatEffect {
AutobanFactory.MPCON.addPoint(applyfrom.getAutobanManager(), "mpCon hack for skill:" + sourceid + "; Player MP: " + applyto.getMp() + " MP Needed: " + getMpCon());
} */
if (hpchange != 0) {
if (hpchange < 0 && (-hpchange) >= applyto.getHp() && (!applyto.hasDisease(MapleDisease.ZOMBIFY) || hpCon == 0)) {
applyto.getClient().announce(MaplePacketCreator.enableActions());
return false;
if (hpchange < 0 && (-hpchange) >= applyto.getHp() && (!applyto.hasDisease(MapleDisease.ZOMBIFY) || hpCon > 0)) {
if(!ServerConstants.USE_PERMISSIVE_BUFFS) {
applyto.getClient().announce(MaplePacketCreator.enableActions());
return false;
}
}
int newHp = applyto.getHp() + hpchange;
if (newHp < 1) {
@@ -722,8 +724,13 @@ public class MapleStatEffect {
int newMp = applyto.getMp() + mpchange;
if (mpchange != 0) {
if (mpchange < 0 && -mpchange > applyto.getMp()) {
applyto.getClient().announce(MaplePacketCreator.enableActions());
return false;
if(!ServerConstants.USE_PERMISSIVE_BUFFS) {
applyto.getClient().announce(MaplePacketCreator.enableActions());
return false;
}
else {
newMp = 0;
}
}
applyto.setMp(newMp);