private void changeMapInternal(final MapleMap to, final Point pos, byte[] warpPacket, final MaplePortal pto) {
        if (to == null) {
            return;
        }
        //if (getAntiMacro().inProgress()) {
        //    dropMessage(5, "You cannot use it in the middle of the Lie Detector Test.");
        //    return;
        //}
        final int nowmapid = map.getId();
        if (eventInstance != null) {
            eventInstance.changedMap(this, to.getId());
        }
        final boolean pyramid = pyramidSubway != null;
        if (map.getId() == nowmapid) {
            client.getSession().write(warpPacket);
            final boolean shouldChange = !isClone() && client.getChannelServer().getPlayerStorage().getCharacterById(getId()) != null;
            final boolean shouldState = map.getId() == to.getId();
            if (shouldChange && shouldState) {
                to.setCheckStates(false);
            }
            map.removePlayer(this);
            if (ServerConstants.AntiKS) {
                try {
                    MapleQuestStatus stat = getQuestNoAdd(MapleQuest.getInstance(732648172));
                    boolean antiks;
                    if (stat == null || stat.getCustomData() == null) {
                        antiks = false;
                        stat.setCustomData(antiks + ";" + 0);
                    } else {
                        String[] statss = stat.getCustomData().split(";");
                        try {
                            antiks = Boolean.parseBoolean(statss[0]);
                        } catch (Exception ex) {
                            antiks = false;
                        }
                        List<MapleMonster> monsters = map.getAllMonster();
                        for (MapleMapObject mmo : monsters) {
                            MapleMonster m = (MapleMonster) mmo;
                            if (m.getBelongsTo() == getId()) {
                                stat.setCustomData(antiks + ";" + (Integer.parseInt(statss[1]) - 1));
                                m.expireAntiKS();
                            }
                        }
                    }
                } catch (Exception e) {
                }
            }
            if (shouldChange) {
                map = to;
                setPosition(pos);
                to.addPlayer(this);
                stats.relocHeal(this);
                if (shouldState) {
                    to.setCheckStates(true);
                }
            }
        }
        if (pyramid && pyramidSubway != null) { //checks if they had pyramid before AND after changing
            pyramidSubway.onChangeMap(this, to.getId());
        }
        updateDeathCount();

        if (deathCount < 1) {
//            dropMessage(0, "I must be very talented if I died so many times!");
//            World.Broadcast.broadcastMessage(CField.getGameMessage(name + " has somehow died 99 times! He is very talented!", (short) 13));
//            deathCount = 99;
//            client.getSession().write(EffectPacket.updateDeathCount(99)); //for fun
        }
    }