Package l2p.gameserver.network

Examples of l2p.gameserver.network.L2GameClient


                        DatabaseUtils.closeDatabaseCSR(con, st, rs);
                    }
                    GArray<HashMap<String, Object>> list = mysql
                            .getAll("SELECT `obj_id`, `value`, (SELECT `account_name` FROM `characters` WHERE `characters`.`obj_Id` = `character_variables`.`obj_id` LIMIT 1) AS `account_name` FROM `character_variables` WHERE name LIKE 'offline'");
                    for (HashMap<String, Object> e : list) {
                        L2GameClient client = new L2GameClient(new MMOConnection<L2GameClient>(null), true);
                        client.setCharSelection((Integer) e.get("obj_id"));
                        L2Player p = client.loadCharFromDisk(0);
                        if (p == null || p.isDead()) {
                            continue;
                        }
                        client.setLoginName(e.get("account_name") == null ? "OfflineTrader_" + p.getName() : (String) e
                                .get("account_name"));
                        client.OnOfflineTrade();
                        p.restoreBonus();
                        p.spawnMe();
                        p.updateTerritories();
                        p.setOnlineStatus(false);
                        p.setOfflineMode(true);
View Full Code Here


          }
          if(player.getOlympiadObserveId() > 0)
          {
            Log.add("Olympiad info: " + _name + " crashed coz player.getOlympiadObserveId() > 0", "olympiad");
          }
          L2GameClient client = player.getNetConnection();
          if(client == null)
          {
            Log.add("Olympiad info: " + _name + " crashed: client == null", "olympiad");
          }
          else
          {
            MMOConnection conn = client.getConnection();
            if(conn == null)
            {
              Log.add("Olympiad info: " + _name + " crashed coz conn == null", "olympiad");
            }
            else if(conn.isClosed())
View Full Code Here

    L2Player player = _player;
    if(player == null || player.isLogoutStarted() || !player.isOnline() || player.getOlympiadGameId() == -1 || player.getOlympiadObserveId() > 0)
    {
      return false;
    }
    L2GameClient client = player.getNetConnection();
    if(client == null)
    {
      return false;
    }
    MMOConnection conn = client.getConnection();
    if(conn == null || conn.isClosed())
    {
      return false;
    }
    return true;
View Full Code Here

    _targetLoc.y = readD();
    _targetLoc.z = readD();
    _originLoc.x = readD();
    _originLoc.y = readD();
    _originLoc.z = readD();
    L2GameClient client = getClient();
    L2Player activeChar = client.getActiveChar();
    if(activeChar == null)
    {
      return;
    }
    if(_buf.hasRemaining())
    {
      _moveMovement = readD();
    }
    else
    {
      _log.warning("Incompatible client found: L2Walker " + client.getLoginName() + "/" + client.getIpAddr());
      if(Config.L2WALKER_PUNISHMENT != 0)
      {
        Log.LogChar(activeChar, Log.L2WalkerFound, client.getLoginName());
        if(Config.L2WALKER_PUNISHMENT == 2)
        {
          LSConnection.getInstance().sendPacket(new ChangeAccessLevel(client.getLoginName(), -66, "Walker Autoban", -1));
          activeChar.setAccessLevel(-66);
        }
        activeChar.logout(false, false, true, true);
      }
    }
View Full Code Here

  }

  @Override
  public void runImpl()
  {
    L2GameClient client = getClient();
    try
    {
      client.markRestoredChar(_charSlot);
    }
    catch(Exception e)
    {
    }
    CharacterSelectionInfo cl = new CharacterSelectionInfo(client.getLoginName(), client.getSessionId().playOkID1);
    sendPacket(cl);
    client.setCharSelection(cl.getCharInfo());
  }
View Full Code Here

  }

  @Override
  public void runImpl()
  {
    L2GameClient client = getClient();
    L2Player activeChar = client.getActiveChar();
    Collection<L2GameServerPacket> packets = new GArray<L2GameServerPacket>();
    if(activeChar == null)
    {
      client.closeNow(false);
      return;
    }
    boolean first = activeChar.entering;
    if(first)
    {
View Full Code Here

  }

  @Override
  public void runImpl()
  {
    L2GameClient client = getClient();
    if(client.getActiveChar() != null)
    {
      return;
    }
    L2Player activeChar = client.loadCharFromDisk(_charSlot);
    if(activeChar == null)
    {
      return;
    }
    if(AutoBan.isBanned(activeChar.getObjectId()))
    {
      activeChar.setAccessLevel(-100);
      activeChar.logout(false, false, true, true);
      return;
    }
    if(activeChar.getAccessLevel() < 0)
    {
      activeChar.setAccessLevel(0);
    }
    if(Config.SERVER_GMONLY && !activeChar.isGM())
    {
      return;
    }
    client.setState(GameClientState.IN_GAME);
    sendPacket(new CharSelected(activeChar, client.getSessionId().playOkID1));
  }
View Full Code Here

      {
        sendPacket(new CharacterDeleteFail(CharacterDeleteFail.REASON_YOU_MAY_NOT_DELETE_CLAN_MEMBER));
      }
      return;
    }
    L2GameClient client = getClient();
    try
    {
      if(Config.DELETE_DAYS == 0)
      {
        client.deleteChar(_charSlot);
      }
      else
      {
        client.markToDeleteChar(_charSlot);
      }
    }
    catch(Exception e)
    {
      _log.log(Level.SEVERE, "Error:", e);
    }
    sendPacket(new CharacterDeleteSuccess());
    CharacterSelectionInfo cl = new CharacterSelectionInfo(client.getLoginName(), client.getSessionId().playOkID1);
    sendPacket(cl);
    client.setCharSelection(cl.getCharInfo());
  }
View Full Code Here

  @Override
  public void runImpl()
  {
    SessionKey key = new SessionKey(_loginKey1, _loginKey2, _playKey1, _playKey2);
    final L2GameClient client = getClient();
    client.setSessionId(key);
    client.setLoginName(_loginName);
    if(Config.GG_CHECK)
    {
      client.sendPacket(Msg.GameGuardQuery);
      ThreadPoolManager.getInstance().scheduleAi(new GGTest(client), 500, true);
    }
    LSConnection.getInstance().addWaitingClient(client);
  }
View Full Code Here

      readImpl();
      return true;
    }
    catch(Exception e)
    {
      L2GameClient client = getClient();
      _log.severe("Client: " + client + " from IP: " + client.getIpAddr() + " - Failed reading: " + getType() + "(" + getClass().getName() + ") - L2P Server Version: " + Config.SERVER_VERSION);
      _log.severe("Buffer: " + getByteBuffer() + " / Connection: " + client.getConnection());
      e.printStackTrace();
      handleIncompletePacket();
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of l2p.gameserver.network.L2GameClient

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.