Change channel transition patch

Solved an issue where players were being unable to return to the game once changing channels.
This commit is contained in:
ronancpl
2019-03-28 17:09:18 -03:00
parent 16deacb426
commit 0b6951527d
6 changed files with 14 additions and 4 deletions

View File

@@ -150,7 +150,8 @@ public class MapleServerHandler extends IoHandlerAdapter {
MapleClient client = (MapleClient) session.getAttribute(MapleClient.CLIENT_KEY);
if (client != null) {
try {
if (!session.containsAttribute(MapleClient.CLIENT_CASH_SHOP)) {
// client freeze issues on session transition states found thanks to yolinlin, Omo Oppa, Nozphex
if (!session.containsAttribute(MapleClient.CLIENT_TRANSITION)) {
client.disconnect(false, false);
}
} catch (Throwable t) {

View File

@@ -65,6 +65,7 @@ public class EnterCashShopHandler extends AbstractMaplePacketHandler {
mc.unregisterChairBuff();
Server.getInstance().getPlayerBuffStorage().addBuffsToStorage(mc.getId(), mc.getAllBuffs());
Server.getInstance().getPlayerBuffStorage().addDiseasesToStorage(mc.getId(), mc.getAllDiseases());
mc.setSessionTransitionState();
mc.setAwayFromChannelWorld();
mc.notifyMapTransferToPartner(-1);
mc.removeIncomingInvites();

View File

@@ -91,6 +91,7 @@ public final class EnterMTSHandler extends AbstractMaplePacketHandler {
chr.unregisterChairBuff();
Server.getInstance().getPlayerBuffStorage().addBuffsToStorage(chr.getId(), chr.getAllBuffs());
Server.getInstance().getPlayerBuffStorage().addDiseasesToStorage(chr.getId(), chr.getAllDiseases());
chr.setSessionTransitionState();
chr.setAwayFromChannelWorld();
chr.notifyMapTransferToPartner(-1);
chr.removeIncomingInvites();