Package net.sf.l2j.gameserver.model

Examples of net.sf.l2j.gameserver.model.L2Object


    if (DEBUG)
    {
      int cnt = 0;
      for (int i=0; i < _table.length; i++)
      {
        L2Object obj = _table[i];
        if (obj == null) {
          assert _keys[i] == 0 || _keys[i] == 0x80000000;
        } else {
          cnt++;
          assert obj.getObjectId() == (_keys[i] & 0x7FFFFFFF);
        }
      }
      assert cnt == _count;
    }
  }
View Full Code Here


    // over all old entries
  next_entry:
    for (int i=0; i < _table.length; i++)
    {
      L2Object obj = _table[i];
      if (obj == null)
        continue;
      final int hashcode = _keys[i] & 0x7FFFFFFF;
      if (Config.ASSERT) assert hashcode == obj.getObjectId();
      int seed = hashcode;
      int incr = 1 + (((seed >> 5) + 1) % (newSize - 1));
      int ntry = 0;
      do
      {
View Full Code Here

        if (player == null) return;

        // Alt game - Karma punishment
        if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && player.getKarma() > 0) return;

        L2Object target = player.getTarget();
        if (!player.isGM() && (target == null                // No target (ie GM Shop)
            || !(target instanceof L2MerchantInstance || target instanceof L2FishermanInstance || target instanceof L2MercManagerInstance || target instanceof L2ClanHallManagerInstance || target instanceof L2CastleChamberlainInstance// Target not a merchant, fisherman or mercmanager
          || !player.isInsideRadius(target, L2NpcInstance.INTERACTION_DISTANCE, false, false)   // Distance is too far
              )) return;
View Full Code Here

    return (level >= REQUIRED_LEVEL);
  }

  private void disconnectCharacter(L2PcInstance activeChar)
  {
    L2Object target = activeChar.getTarget();
    L2PcInstance player = null;
    if (target instanceof L2PcInstance) {
      player = (L2PcInstance)target;
    } else {
      return;
View Full Code Here

  {
    L2PcInstance player = getClient().getActiveChar();
    if (player == null)
      return;

    L2Object target = player.getTarget();

    if (!(target instanceof L2ManorManagerInstance))
      target = player.getLastFolkNPC();

    if (!player.isGM()
View Full Code Here

      // if the player is in a party, gather a list of all matching party members (possibly
      // including this player)
      FastList<L2PcInstance> candidates = new FastList<L2PcInstance>();
     
      // get the target for enforcing distance limitations.
      L2Object target = player.getTarget();
      if (target == null) target = player;
     
      for(L2PcInstance partyMember: party.getPartyMembers())
      {
        temp = partyMember.getQuestState(getName());
View Full Code Here

      // if the player is in a party, gather a list of all matching party members (possibly
      // including this player)
      FastList<L2PcInstance> candidates = new FastList<L2PcInstance>();

      // get the target for enforcing distance limitations.
      L2Object target = player.getTarget();
      if (target == null) target = player;
     
      for(L2PcInstance partyMember: party.getPartyMembers())
      {
        temp = partyMember.getQuestState(getName());
View Full Code Here

    if ((castle == null  || castle.getCastleId() < 0) && clanhall == null)
      // No castle specified
      showCastleSelectPage(activeChar);
    else
    {
      L2Object target = activeChar.getTarget();
      L2PcInstance player = null;
      if (target instanceof L2PcInstance)
        player = (L2PcInstance)target;

      if (command.equalsIgnoreCase("admin_add_attacker"))
View Full Code Here

    }

    String[] cmdParams = command.split(" ");
    long banLength = -1;

    L2Object targetObject = null;
    L2PcInstance targetPlayer = null;

    if (cmdParams.length > 1)
        {
      targetPlayer = L2World.getInstance().getPlayer(cmdParams[1]);
View Full Code Here

        return false;

    if (command.startsWith("admin_polymorph"))
    {
      StringTokenizer st = new StringTokenizer(command);
      L2Object target = activeChar.getTarget();
      try
      {
        st.nextToken();
        String p1 = st.nextToken();
        if (st.hasMoreTokens())
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.model.L2Object

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.