Handlers read from InPacket instead of SeekableLittleEndianAccessor

This commit is contained in:
P0nk
2021-08-22 22:10:19 +02:00
parent 2232022cf1
commit da2d8abc56
182 changed files with 1223 additions and 1230 deletions

View File

@@ -3,7 +3,7 @@ package net.server.channel.handlers;
import client.MapleClient;
import client.keybind.MapleQuickslotBinding;
import net.AbstractMaplePacketHandler;
import tools.data.input.SeekableLittleEndianAccessor;
import net.packet.InPacket;
/**
*
@@ -12,10 +12,10 @@ import tools.data.input.SeekableLittleEndianAccessor;
public class QuickslotKeyMappedModifiedHandler extends AbstractMaplePacketHandler
{
@Override
public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c)
public void handlePacket(InPacket p, MapleClient c)
{
// Invalid size for the packet.
if(slea.available() != MapleQuickslotBinding.QUICKSLOT_SIZE * Integer.BYTES ||
if(p.available() != MapleQuickslotBinding.QUICKSLOT_SIZE * Integer.BYTES ||
// not logged in-game
c.getPlayer() == null)
{
@@ -26,7 +26,7 @@ public class QuickslotKeyMappedModifiedHandler extends AbstractMaplePacketHandle
for(int i = 0; i < MapleQuickslotBinding.QUICKSLOT_SIZE; i++)
{
aQuickslotKeyMapped[i] = (byte) slea.readInt();
aQuickslotKeyMapped[i] = (byte) p.readInt();
}
c.getPlayer().changeQuickslotKeybinding(aQuickslotKeyMapped);