Package lineage2.gameserver.network

Examples of lineage2.gameserver.network.GameClient


      if (cha.isPlayer())
      {
        Player player = cha.getPlayer();
        if (!player.getVarB("@ti_present_video"))
        {
          QuestState qs = player.getQuestState(_10320_LetsGototheCentralSquare.class);
          if ((qs != null) && (qs.getCond() == 1))
          {
            player.showQuestMovie(SceneMovie.si_illusion_02_que);
          }
          else
          {
View Full Code Here


   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    GameClient client = getClient();
    if (Config.SECOND_AUTH_ENABLED && !client.getSecondaryAuth().isAuthed())
    {
      client.getSecondaryAuth().openDialog();
      return;
    }
    if (client.getActiveChar() != null)
    {
      return;
    }
    int objId = client.getObjectIdForSlot(_charSlot);
    if (AutoBan.isBanned(objId))
    {
      sendPacket(ActionFail.STATIC);
      return;
    }
    Player activeChar = client.loadCharFromDisk(_charSlot);
    if (activeChar == null)
    {
      sendPacket(ActionFail.STATIC);
      return;
    }
    if (activeChar.getAccessLevel() < 0)
    {
      activeChar.setAccessLevel(0);
    }
    client.setState(GameClientState.IN_GAME);
    sendPacket(new CharSelected(activeChar, client.getSessionKey().playOkID1));
  }
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    GameClient client = getClient();
    Player activeChar = client.getActiveChar();
    if (activeChar == null)
    {
      client.closeNow(false);
      return;
    }
    int MyObjectId = activeChar.getObjectId();
    Long MyStoreId = activeChar.getStoredId();
    for(Castle castle : ResidenceHolder.getInstance().getResidenceList(Castle.class))
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    GameClient client = LoginServerCommunication.getInstance().removeWaitingClient(account);
    if (client == null)
    {
      return;
    }
    Player activeChar = client.getActiveChar();
    if (activeChar == null)
    {
      return;
    }
    if (changed)
View Full Code Here

   */
  @Override
  protected void runImpl()
  {
    SessionKey skey = new SessionKey(loginOkId1, loginOkId2, playOkId1, playOkId2);
    GameClient client = LoginServerCommunication.getInstance().removeWaitingClient(account);
    if (client == null)
    {
      return;
    }
    if (authed && client.getSessionKey().equals(skey))
    {
      client.setAuthed(true);
      client.setState(GameClient.GameClientState.AUTHED);
      switch (Config.SERVICES_RATE_TYPE)
      {
        case Bonus.NO_BONUS:
          bonus = 1.;
          bonusExpire = 0;
          break;
        case Bonus.BONUS_GLOBAL_ON_GAMESERVER:
          double[] bonuses = AccountBonusDAO.getInstance().select(account);
          bonus = bonuses[0];
          bonusExpire = (int) bonuses[1];
          break;
      }
      client.setBonus(bonus);
      client.setBonusExpire(bonusExpire);
      if (Config.SECOND_AUTH_ENABLED)
      {
        client.setSecondaryAuth(new SecondaryPasswordAuth(client, _2ndPassword, _2ndWrongAttempts, _2ndUnbanTime));
      }
      GameClient oldClient = LoginServerCommunication.getInstance().addAuthedClient(client);
      if (oldClient != null)
      {
        oldClient.setAuthed(false);
        Player activeChar = oldClient.getActiveChar();
        if (activeChar != null)
        {
          activeChar.sendPacket(Msg.ANOTHER_PERSON_HAS_LOGGED_IN_WITH_THE_SAME_ACCOUNT);
          activeChar.logout();
        }
        else
        {
          oldClient.close(ServerClose.STATIC);
        }
      }
      sendPacket(new PlayerInGame(client.getLogin()));
      CharacterSelectionInfo csi = new CharacterSelectionInfo(client.getLogin(), client.getSessionKey().playOkID1);
      ExLoginVitalityEffectInfo vl = new ExLoginVitalityEffectInfo(csi.getCharInfo());
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    GameClient client = LoginServerCommunication.getInstance().removeWaitingClient(account);
    if (client == null)
    {
      client = LoginServerCommunication.getInstance().removeAuthedClient(account);
    }
    if (client == null)
    {
      return;
    }
    Player activeChar = client.getActiveChar();
    if (activeChar != null)
    {
      activeChar.sendPacket(Msg.ANOTHER_PERSON_HAS_LOGGED_IN_WITH_THE_SAME_ACCOUNT);
      activeChar.kick();
    }
    else
    {
      client.close(ServerClose.STATIC);
    }
  }
View Full Code Here

      {
        sendPacket(new CharacterDeleteFail(CharacterDeleteFail.REASON_DELETION_FAILED));
      }
      return;
    }
    GameClient client = getClient();
    try
    {
      if (Config.DELETE_DAYS == 0)
      {
        client.deleteChar(_charSlot);
      }
      else
      {
        client.markToDeleteChar(_charSlot);
      }
    }
    catch (Exception e)
    {
      _log.error("Error:", e);
    }
    sendPacket(new CharacterDeleteSuccess());
    CharacterSelectionInfo cl = new CharacterSelectionInfo(client.getLogin(), client.getSessionKey().playOkID1);
    ExLoginVitalityEffectInfo vl = new ExLoginVitalityEffectInfo(cl.getCharInfo());
    sendPacket(cl, vl);
    client.setCharSelection(cl.getCharInfo());
  }
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    GameClient client = getClient();
    try
    {
      client.markRestoredChar(_charSlot);
    }
    catch (Exception e)
    {
    }
    CharacterSelectionInfo cl = new CharacterSelectionInfo(client.getLogin(), client.getSessionKey().playOkID1);
    ExLoginVitalityEffectInfo vl = new ExLoginVitalityEffectInfo(cl.getCharInfo());
    sendPacket(cl, vl);
    client.setCharSelection(cl.getCharInfo());
  }
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    GameClient client = getClient();
    Player activeChar = client.getActiveChar();
    Player newMentee = World.getPlayer(_newMentee);
    if (newMentee == null)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.THAT_PLAYER_IS_NOT_ONLINE));
      return;
View Full Code Here

          else
          {
            level = -100;
          }
          LoginServerCommunication.getInstance().sendPacket(new ChangeAccessLevel(account, level, banExpire));
          GameClient client = LoginServerCommunication.getInstance().getAuthedClient(account);
          if (client != null)
          {
            Player player = client.getActiveChar();
            if (player != null)
            {
              player.kick();
              activeChar.sendMessage("Player " + player.getName() + " kicked.");
            }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.GameClient

Copyright © 2018 www.massapicom. 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.