More concurrency fixes + Zombify + BPQ available
Fixed some inconsistencies due to race conditions in the project, added Zombify monster effect, made BPQ available and some minor patches.
This commit is contained in:
@@ -699,7 +699,8 @@ 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()) {
|
||||
if (hpchange < 0 && (-hpchange) > applyto.getHp() && !applyto.hasDisease(MapleDisease.ZOMBIFY)) {
|
||||
applyto.getClient().announce(MaplePacketCreator.enableActions());
|
||||
return false;
|
||||
}
|
||||
int newHp = applyto.getHp() + hpchange;
|
||||
@@ -712,6 +713,7 @@ public class MapleStatEffect {
|
||||
int newMp = applyto.getMp() + mpchange;
|
||||
if (mpchange != 0) {
|
||||
if (mpchange < 0 && -mpchange > applyto.getMp()) {
|
||||
applyto.getClient().announce(MaplePacketCreator.enableActions());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1037,12 +1039,18 @@ public class MapleStatEffect {
|
||||
} else {
|
||||
hpchange += hp;
|
||||
}
|
||||
} else {
|
||||
if (applyfrom.hasDisease(MapleDisease.ZOMBIFY)) {
|
||||
hpchange /= 2;
|
||||
}
|
||||
} else { // assumption: this is heal
|
||||
hpchange += makeHealHP(hp / 100.0, applyfrom.getTotalMagic(), 3, 5);
|
||||
if (applyfrom.hasDisease(MapleDisease.ZOMBIFY)) {
|
||||
hpchange = -hpchange;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hpR != 0) {
|
||||
hpchange += (int) (applyfrom.getCurrentMaxHp() * hpR);
|
||||
hpchange += (int) (applyfrom.getCurrentMaxHp() * hpR) / (applyfrom.hasDisease(MapleDisease.ZOMBIFY) ? 2 : 1);
|
||||
applyfrom.checkBerserk();
|
||||
}
|
||||
if (primary) {
|
||||
|
||||
Reference in New Issue
Block a user