Refactor various minor things

This commit is contained in:
P0nk
2022-08-02 17:45:47 +02:00
parent 4fd1daada4
commit 5afb09d798
6 changed files with 19 additions and 16 deletions

View File

@@ -61,8 +61,8 @@ public abstract class AbstractMovementPacketHandler extends AbstractPacketHandle
res.add(alm);
break;
}
case 1:
case 2:
case 1: // jump
case 2: // knockback
case 6: // fj
case 12:
case 13: // Shot-jump-back thing
@@ -79,8 +79,8 @@ public abstract class AbstractMovementPacketHandler extends AbstractPacketHandle
res.add(rlm);
break;
}
case 3:
case 4: // tele... -.-
case 3: // teleport disappear
case 4: // teleport appear
case 7: // assaulter
case 8: // assassinate
case 9: // rush

View File

@@ -33,7 +33,7 @@ public final class ReactorHitHandler extends AbstractPacketHandler {
@Override
public final void handlePacket(InPacket p, Client c) {
//System.out.println(slea); //To see if there are any differences with packets
//CD 00 6B 00 00 00 01 00 00 00 03 00 00 00 20 03 F7 03 00 00
//[CD 00] [6B 00 00 00] [01 00 00 00] [03 00] [00 00 20 03] [F7 03 00 00]
//[CD 00] [66 00 00 00] [00 00 00 00] [02 00] [00 00 19 01] [00 00 00 00]
int oid = p.readInt();
int charPos = p.readInt();

View File

@@ -36,12 +36,14 @@ public final class TouchReactorHandler extends AbstractPacketHandler {
public final void handlePacket(InPacket p, Client c) {
int oid = p.readInt();
Reactor reactor = c.getPlayer().getMap().getReactorByOid(oid);
if (reactor != null) {
if (p.readByte() != 0) {
ReactorScriptManager.getInstance().touch(c, reactor);
} else {
ReactorScriptManager.getInstance().untouch(c, reactor);
}
if (reactor == null) {
return;
}
if (p.readByte() != 0) {
ReactorScriptManager.getInstance().touch(c, reactor);
} else {
ReactorScriptManager.getInstance().untouch(c, reactor);
}
}
}