[Small Fix] - Change Map Error (Most repacks)

Joined
Mar 17, 2009
Messages
1,917
Reaction score
539
MapleCharacter ChangeMap from:
PHP:
public void changeMap(final MapleMap to, final MaplePortal pto) {
        if (to.getId() == 100000200 || to.getId() == 211000100 || to.getId() == 220000300) {
            changeMapInternal(to, pto.getPosition(), MaplePacketCreator.getWarpToMap(to, pto.getId() - 2, this));
        } else {
            changeMapInternal(to, pto.getPosition(), MaplePacketCreator.getWarpToMap(to, pto.getId(), this));
        }
    }

To:

PHP:
public void changeMap(final MapleMap to, final MaplePortal pto) {
 changeMapInternal(to, pto.getPosition(), MaplePacketCreator.getWarpToMap(to, pto.getId(), this));
    }

Credits to Kev for fixing it. (He told me to release it)

The problem was doing this:
Sparrow - [Small Fix] - Change Map Error (Most repacks) - RaGEZONE Forums


Red Square = Where it goes to.
Green Square = Where it should go to.
Purple Square = Closer up of correct portal
 
1. 넣고 싶은 자바 파일에 넣어줍니다.
public static boolean getErrorMapChange(MapleClient c) {//by noeul
HashMap<String, String> bugmap = new HashMap<String, String>();
try {
FileReader fl = new FileReader("option/errormapchange.properties");
BufferedReader br = new BufferedReader(fl);
String[] readSplit = new String[2];
String readLine = null;
while((readLine = br.readLine()) != null) {
readSplit = readLine.split(" - ");
bugmap.put(readSplit[0], readSplit[1]);
}
fl.close();
br.close();
} catch(Exception e) {
System.out.print(e);
}
for (Entry<String, String> entry : bugmap.entrySet()) {
if (c.getPlayer().getMapId() == Integer.parseInt(entry.getKey())) {
MapleMap target = c.getChannelServer().getMapFactory().getMap(Integer.parseInt(entry.getValue()));
c.getPlayer().changeMap(target, target.getPortal(0));
}
}
return true;
}

2. MapleMap.java
if (hasClock()) {
Calendar cal = Calendar.getInstance();
int hour = cal.get(Calendar.HOUR_OF_DAY);
int min = cal.get(Calendar.MINUTE);
int second = cal.get(Calendar.SECOND);
chr.getClient().getSession().write((MaplePacketCreator.getClockTime(hour, min, second)));
}
위의 소스 밑에 밑에 있는 것을 넣어주세요.
자바파일.getErrorMapChange(chr.getClient());//by noeul

3. 팩안에 option폴더를 만들고 errormapchange.properties를 생성하시고 사용은 팅맵 - 이동맵 해주시면 됩니다.
 
1. 넣고 싶은 자바 파일에 넣어줍니다.
public static boolean getErrorMapChange(MapleClient c) {//by noeul
HashMap<String, String> bugmap = new HashMap<String, String>();
try {
FileReader fl = new FileReader("option/errormapchange.properties");
BufferedReader br = new BufferedReader(fl);
String[] readSplit = new String[2];
String readLine = null;
while((readLine = br.readLine()) != null) {
readSplit = readLine.split(" - ");
bugmap.put(readSplit[0], readSplit[1]);
}
fl.close();
br.close();
} catch(Exception e) {
System.out.print(e);
}
for (Entry<String, String> entry : bugmap.entrySet()) {
if (c.getPlayer().getMapId() == Integer.parseInt(entry.getKey())) {
MapleMap target = c.getChannelServer().getMapFactory().getMap(Integer.parseInt(entry.getValue()));
c.getPlayer().changeMap(target, target.getPortal(0));
}
}
return true;
}

2. MapleMap.java
if (hasClock()) {
Calendar cal = Calendar.getInstance();
int hour = cal.get(Calendar.HOUR_OF_DAY);
int min = cal.get(Calendar.MINUTE);
int second = cal.get(Calendar.SECOND);
chr.getClient().getSession().write((MaplePacketCreator.getClockTime(hour, min, second)));
}
위의 소스 밑에 밑에 있는 것을 넣어주세요.
자바파일.getErrorMapChange(chr.getClient());//by noeul

3. 팩안에 option폴더를 만들고 errormapchange.properties를 생성하시고 사용은 팅맵 - 이동맵 해주시면 됩니다.
Don't use 'whatever that language is' language.

Oh and, what is this I don't even....
 
Back