GuildPQ fix

Fixed some issues with GPQ startup crashing the leader when doing the
map transition.
This commit is contained in:
ronancpl
2017-09-22 23:26:46 -03:00
parent 8794cc8f31
commit 7bbf512797
39 changed files with 4961 additions and 4969 deletions

View File

@@ -1063,6 +1063,10 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
if (getEventInstance() != null) getEventInstance().changedMap(this, map);
}
private void eventAfterChangedMap(int map) {
if (getEventInstance() != null) getEventInstance().afterChangedMap(this, map);
}
public boolean canRecoverLastBanish() {
return System.currentTimeMillis() - this.banishTime < 5 * 60 * 1000;
}
@@ -1159,6 +1163,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
canWarpCounter--;
if(canWarpCounter == 0) canWarpMap = true;
eventAfterChangedMap(this.getMapId());
}
public void changeMap(final MapleMap target, final Point pos) {
@@ -1171,6 +1177,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
canWarpCounter--;
if(canWarpCounter == 0) canWarpMap = true;
eventAfterChangedMap(this.getMapId());
}
private boolean buffMapProtection() {
@@ -2966,9 +2974,12 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
try {
Map<MapleBuffStat, MapleBuffStatValueHolder> stats = new LinkedHashMap<>();
Map<MapleBuffStat, MapleBuffStatValueHolder> buffList = buffEffects.remove(effect.getBuffSourceId());
for (Entry<MapleBuffStat, MapleBuffStatValueHolder> stateffect : buffList.entrySet()) {
stats.put(stateffect.getKey(), stateffect.getValue());
buffEffectsCount.put(stateffect.getKey(), (byte)(buffEffectsCount.get(stateffect.getKey()) - 1));
if(buffList != null) {
for (Entry<MapleBuffStat, MapleBuffStatValueHolder> stateffect : buffList.entrySet()) {
stats.put(stateffect.getKey(), stateffect.getValue());
buffEffectsCount.put(stateffect.getKey(), (byte)(buffEffectsCount.get(stateffect.getKey()) - 1));
}
}
return stats;