Switch to Maven file structure

This commit is contained in:
P0nk
2021-03-30 21:07:35 +02:00
parent 4acc5675d6
commit 813643036b
817 changed files with 16 additions and 0 deletions

View File

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