Package l2p.gameserver.clientpackets

Source Code of l2p.gameserver.clientpackets.RequestSaveKeyMapping

package l2p.gameserver.clientpackets;

import l2p.gameserver.model.L2Player;
import l2p.gameserver.serverpackets.ExUISetting;

/**
* format: (ch)db
*/
public class RequestSaveKeyMapping extends L2GameClientPacket
{
  private byte[] _data;

  @Override
  protected void readImpl()
  {
    int length = readD();
    if(length > _buf.remaining() || length > Short.MAX_VALUE || length < 0)
    {
      _data = null;
      return;
    }
    _data = new byte[length];
    readB(_data);
  }

  @Override
  protected void runImpl()
  {
    if(_data == null)
    {
      return;
    }
    L2Player player = getClient().getActiveChar();
    if(player != null)
    {
      player.setKeyBindings(_data);
      player.sendPacket(new ExUISetting(_data));
    }
  }
}
TOP

Related Classes of l2p.gameserver.clientpackets.RequestSaveKeyMapping

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.