Package l2p.gameserver.loginservercon.lspackets

Source Code of l2p.gameserver.loginservercon.lspackets.MoveCharToAccResponse

package l2p.gameserver.loginservercon.lspackets;

import l2p.extensions.multilang.CustomMessage;
import l2p.extensions.scripts.Functions;
import l2p.gameserver.loginservercon.AttLS;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.network.L2GameClient;

/**
* @Author: Abaddon
*/
public class MoveCharToAccResponse extends LoginServerBasePacket
{
  public MoveCharToAccResponse(byte[] decrypt, AttLS loginServer)
  {
    super(decrypt, loginServer);
  }

  @Override
  public void read()
  {
    String account = readS();
    int changed = readD();
    L2GameClient client = getLoginServer().getCon().getAccountInGame(account);
    if(client == null)
    {
      return;
    }
    L2Player activeChar = client.getActiveChar();
    if(activeChar == null)
    {
      return;
    }
    if(changed == 2)
    {
      Functions.show(new CustomMessage("scripts.commands.user.account.ResultTrue", activeChar), activeChar);
    }
    else if(changed == 1)
    {
      Functions.show(new CustomMessage("scripts.commands.user.account.ResultNoTarget", activeChar), activeChar);
    }
    else if(changed == 0)
    {
      Functions.show(new CustomMessage("scripts.commands.user.account.ResultWrongPass", activeChar), activeChar);
    }
  }
}
TOP

Related Classes of l2p.gameserver.loginservercon.lspackets.MoveCharToAccResponse

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.