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:
ronancpl
2017-10-22 02:04:36 -02:00
parent e993c8c7b0
commit d91c893400
31 changed files with 41 additions and 26 deletions

View File

@@ -1,4 +1,4 @@
#Sun, 22 Oct 2017 00:39:49 -0200
#Sun, 22 Oct 2017 01:52:47 -0200
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=

BIN
dist/MapleSolaxia.jar vendored

Binary file not shown.

View File

@@ -595,4 +595,5 @@ Consertado bugs envolvendo ganho de EXP em party, para casos onde o level do mob
21 - 22 Outubro 2017,
Bonus de Map chair rearranjado como uma skill, buffando jogador no momento que a codição de ativação é atingida.
Hired Merchant agora verifica devidamente se jogador possui slot antes de liberar a compra de um item.
Pequeno conserto de acesso concorrente com o Storage.
Pequeno conserto de acesso concorrente com o Storage.
Corrigido Map chair não removendo task corretamente caso jogador mude de mapa inesperadamente.

View File

@@ -1,16 +1,6 @@
function enter(pi) {
var questProgress = pi.getQuestProgress(2330, 3300005) + pi.getQuestProgress(2330, 3300006) + pi.getQuestProgress(2330, 3300007); //3 Yetis
if(questProgress == 3 && !pi.hasItem(4032388) && !pi.isQuestCompleted(2332)){
if(pi.canHold(4032388)){
pi.getPlayer().message("You have aquired a key to the Wedding Hall. King Pepe must have dropped it.")
pi.gainItem(4032388, 1);
}
else{
pi.getPlayer().message("Please make room in your ETC inventory.");
}
}
if(pi.isQuestStarted(2330) && questProgress < 3){
pi.openNpc(1300013);
}

View File

@@ -1,9 +1,26 @@
function enter(pi) {
var eim = pi.getEventInstance();
eim.stopEventTimer();
eim.dispose();
if(eim != null) {
eim.stopEventTimer();
eim.dispose();
}
pi.playPortalSound();
pi.warp(106021400, 2);
return true;
var questProgress = pi.getQuestProgress(2330, 3300005) + pi.getQuestProgress(2330, 3300006) + pi.getQuestProgress(2330, 3300007); //3 Yetis
if(questProgress == 3 && !pi.hasItem(4032388)) {
if(pi.canHold(4032388)){
pi.getPlayer().message("You have aquired a key to the Wedding Hall. King Pepe must have dropped it.")
pi.gainItem(4032388, 1);
pi.playPortalSound();
pi.warp(106021400, 2);
return true;
} else {
pi.getPlayer().message("Please make room in your ETC inventory.");
return false;
}
} else {
pi.playPortalSound();
pi.warp(106021400, 2);
return true;
}
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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.

View File

@@ -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));

View File

@@ -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());

View File

@@ -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

View File

@@ -2137,6 +2137,8 @@ public class MapleMap {
*/
public void removePlayer(MapleCharacter chr) {
chr.unregisterChairBuff();
chrWLock.lock();
try {
removePartyMemberInternal(chr);