Chase functionality (/c name) to warp to the exact location of the target

This commit is contained in:
RubenD96
2021-04-22 22:03:59 +02:00
parent f6452b2320
commit ade50bad5e
3 changed files with 23 additions and 3 deletions

View File

@@ -33,6 +33,7 @@ import tools.FilePrinter;
import tools.MaplePacketCreator;
import tools.data.input.SeekableLittleEndianAccessor;
import java.awt.*;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Calendar;
@@ -79,7 +80,13 @@ public final class ChangeMapHandler extends AbstractMaplePacketHandler {
String startwp = slea.readMapleAsciiString();
MaplePortal portal = chr.getMap().getPortal(startwp);
slea.readByte();
boolean wheel = slea.readShort() > 0;
boolean wheel = slea.readByte() > 0;
boolean chasing = slea.readByte() == 1 && chr.isGM();
if (chasing) {
chr.setChasing(true);
chr.setPosition(new Point(slea.readInt(), slea.readInt()));
}
if (targetid != -1) {
if (!chr.isAlive()) {