Map chair patch + other minor fixes
Patched map chair skill not disposing heal task properly in case of player changing maps while resting.
This commit is contained in:
@@ -1836,7 +1836,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
}
|
||||
|
||||
public void stopChairTask() {
|
||||
private void stopChairTask() {
|
||||
chrLock.lock();
|
||||
try {
|
||||
if (chairRecoveryTask != null) {
|
||||
@@ -1848,8 +1848,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
}
|
||||
|
||||
public void startChairTask() {
|
||||
if(!ServerConstants.USE_CHAIR_EXTRAHEAL || chair.get() == 0) return;
|
||||
private void startChairTask() {
|
||||
if(chair.get() == 0) return;
|
||||
|
||||
final int healInterval = 5000;
|
||||
final byte healHP = (byte) Math.max(ServerConstants.CHAIR_EXTRA_HEAL_HP, 1);
|
||||
@@ -3344,6 +3344,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
|
||||
public void unregisterChairBuff() {
|
||||
if(!ServerConstants.USE_CHAIR_EXTRAHEAL) return;
|
||||
|
||||
int skillId = getJobMapChair(job);
|
||||
int skillLv = getSkillLevel(skillId);
|
||||
if(skillLv > 0) {
|
||||
@@ -3353,6 +3355,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
|
||||
public void registerChairBuff() {
|
||||
if(!ServerConstants.USE_CHAIR_EXTRAHEAL) return;
|
||||
|
||||
int skillId = getJobMapChair(job);
|
||||
int skillLv = getSkillLevel(skillId);
|
||||
if(skillLv > 0) {
|
||||
@@ -7827,11 +7831,11 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
extraRecoveryTask.cancel(false);
|
||||
}
|
||||
|
||||
unregisterChairBuff();
|
||||
cancelBuffExpireTask();
|
||||
cancelDiseaseExpireTask();
|
||||
cancelSkillCooldownTask();
|
||||
cancelExpirationTask();
|
||||
stopChairTask();
|
||||
|
||||
for (ScheduledFuture<?> sf : timers) {
|
||||
sf.cancel(false);
|
||||
|
||||
@@ -1310,6 +1310,7 @@ public class MapleClient {
|
||||
merchant.removeVisitor(getPlayer());
|
||||
}
|
||||
}
|
||||
player.unregisterChairBuff();
|
||||
server.getPlayerBuffStorage().addBuffsToStorage(player.getId(), player.getAllBuffs());
|
||||
player.setAwayFromWorld(true);
|
||||
player.cancelAllBuffs(true);
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ServerConstants {
|
||||
public static final boolean USE_EQUIPMNT_LVLUP_SLOTS = true;//Equips can upgrade slots at level up.
|
||||
public static final boolean USE_EQUIPMNT_LVLUP_POWER = true;//Enable more powerful stat upgrades at equip level up.
|
||||
public static final boolean USE_SPIKES_AVOID_BANISH = true; //Shoes equipped with spikes prevents mobs from banishing wearer.
|
||||
public static final boolean USE_CHAIR_EXTRAHEAL = true; //Enable map chairs to further recover player's HP and MP.
|
||||
public static final boolean USE_CHAIR_EXTRAHEAL = true; //Enable map chairs to further recover player's HP and MP (player must have the Chair Mastery skill).
|
||||
public static final int MAX_EQUIPMNT_LVLUP_STAT_UP = 10000; //Max stat upgrade an equipment can have on a levelup.
|
||||
public static final int MAX_EQUIPMNT_STAT = 32767; //Max stat on an equipment by leveling up.
|
||||
public static final int USE_EQUIPMNT_LVLUP = 7; //All equips lvlup at max level of N, set 1 to disable.
|
||||
|
||||
@@ -57,6 +57,7 @@ public class EnterCashShopHandler extends AbstractMaplePacketHandler {
|
||||
|
||||
mc.closePlayerInteractions();
|
||||
|
||||
mc.unregisterChairBuff();
|
||||
Server.getInstance().getPlayerBuffStorage().addBuffsToStorage(mc.getId(), mc.getAllBuffs());
|
||||
mc.setAwayFromWorld(true);
|
||||
mc.cancelAllBuffs(true);
|
||||
@@ -64,7 +65,6 @@ public class EnterCashShopHandler extends AbstractMaplePacketHandler {
|
||||
mc.cancelDiseaseExpireTask();
|
||||
mc.cancelSkillCooldownTask();
|
||||
mc.cancelExpirationTask();
|
||||
mc.stopChairTask();
|
||||
|
||||
c.announce(MaplePacketCreator.openCashShop(c, false));
|
||||
c.announce(MaplePacketCreator.showCashInventory(c));
|
||||
|
||||
@@ -66,6 +66,7 @@ public final class EnterMTSHandler extends AbstractMaplePacketHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
chr.unregisterChairBuff();
|
||||
Server.getInstance().getPlayerBuffStorage().addBuffsToStorage(chr.getId(), chr.getAllBuffs());
|
||||
chr.setAwayFromWorld(true);
|
||||
chr.cancelAllBuffs(true);
|
||||
@@ -73,7 +74,6 @@ public final class EnterMTSHandler extends AbstractMaplePacketHandler {
|
||||
chr.cancelDiseaseExpireTask();
|
||||
chr.cancelSkillCooldownTask();
|
||||
chr.cancelExpirationTask();
|
||||
chr.stopChairTask();
|
||||
|
||||
chr.saveToDB();
|
||||
chr.getMap().removePlayer(c.getPlayer());
|
||||
|
||||
@@ -84,7 +84,7 @@ public class Ellinia extends GachaponItems {
|
||||
1060052, 1072029, 1472002, 1082031, 1060023,
|
||||
//pirateEquips = {
|
||||
1002625, 1002616, 1482005, 1052098, 1482003,
|
||||
1482001, 1492004, 1002622, 1492005, 1082195,
|
||||
1482001, 1492004, 1002622, 1492005, 1082195
|
||||
};
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class Ellinia extends GachaponItems {
|
||||
return new int [] { 1372035, 1372036, 1372037, 1372038, 1372039,
|
||||
1372040, 1372041, 1372042, 1382045, 1382046,
|
||||
1382047, 1382048, 1382049, 1382050, 1382051,
|
||||
1382052, };
|
||||
1382052 };
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2137,6 +2137,8 @@ public class MapleMap {
|
||||
*/
|
||||
|
||||
public void removePlayer(MapleCharacter chr) {
|
||||
chr.unregisterChairBuff();
|
||||
|
||||
chrWLock.lock();
|
||||
try {
|
||||
removePartyMemberInternal(chr);
|
||||
|
||||
Reference in New Issue
Block a user