public static void doLoginMapCheck(MapleCharacter ret) {
        MapleMapFactory mapFactory = ChannelServer.getInstance(ret.client.getChannel()).getMapFactory();
        ret.map = mapFactory.getMap(ret.mapid);
        if (ret.map == null) { //char is on a map that doesn't exist warp it to henesys
            ret.map = mapFactory.getMap(100000000);
        }
        if (ret.inJail()) {
            ret.scheduleUnJail();
        }
        MaplePortal portal = ret.map.getPortal(ret.initialSpawnPoint);
        if (portal == null) {
            portal = ret.map.getPortal(0); // char is on a spawnpoint that doesn't exist - select the first spawnpoint instead
            ret.initialSpawnPoint = 0;
        }
        ret.setPosition(portal.getPosition());
    }