Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Playable.sendPacket()


      range = 10;
    }
    boolean canSee = GeoEngine.canSeeTarget(actor, attack_target, false);
    if(!canSee && (range > 200 || Math.abs(actor.getZ() - attack_target.getZ()) > 200))
    {
      actor.sendPacket(Msg.CANNOT_SEE_TARGET);
      onAttackFail();
      actor.sendActionFailed();
      return;
    }
    range += actor.getMinDistance(attack_target);
View Full Code Here


    }
    if(actor.isInRangeZ(attack_target, range))
    {
      if(!canSee)
      {
        actor.sendPacket(Msg.CANNOT_SEE_TARGET);
        onAttackFail();
        actor.sendActionFailed();
        return;
      }
      clientStopMoving(false);
View Full Code Here

    }
    boolean canSee = _skill.getSkillType() == SkillType.TAKECASTLE || _skill.getSkillType() == SkillType.TAKEFORTRESS || GeoEngine.canSeeTarget(actor, attack_target, actor.isFlying());
    boolean noRangeSkill = _skill.getCastRange() == 32767;
    if(!noRangeSkill && !canSee && (range > 200 || Math.abs(actor.getZ() - attack_target.getZ()) > 200))
    {
      actor.sendPacket(Msg.CANNOT_SEE_TARGET);
      setIntention(AI_INTENTION_ACTIVE);
      actor.sendActionFailed();
      return;
    }
    range += actor.getMinDistance(attack_target);
View Full Code Here

    }
    if(actor.isInRangeZ(attack_target, range) || noRangeSkill)
    {
      if(!noRangeSkill && !canSee)
      {
        actor.sendPacket(Msg.CANNOT_SEE_TARGET);
        setIntention(AI_INTENTION_ACTIVE);
        actor.sendActionFailed();
        return;
      }
      // Если скилл имеет следующее действие, назначим это действие после окончания действия скилла
View Full Code Here

    {
      ThreadPoolManager.getInstance().executePathfind(new ExecuteFollow(actor, attack_target, range - 20));
    }
    else
    {
      actor.sendPacket(Msg.YOUR_TARGET_IS_OUT_OF_RANGE);
      setIntention(AI_INTENTION_ACTIVE);
      actor.sendActionFailed();
    }
  }
View Full Code Here

          }
          break;
      }
      if(actorStoredTarget != target)
      {
        actor.sendPacket(new MyTargetSelected(target.getObjectId(), 0));
      }
    }
  }

  @Override
View Full Code Here

      for(int i = 1; i < count; i++)
      {
        player.getInventory().addItem(ItemTable.getInstance().createItem(item_id));
      }
    }
    player.sendPacket(SystemMessage.obtainItems(item_id, count, 0));
  }

  /**
   * Возвращает количество предметов в инвентаре чара.
   *
 
View Full Code Here

      }
    }
    removed -= count;
    if(removed > 0)
    {
      player.sendPacket(SystemMessage.removeItems(item_id, removed));
    }
    return removed;
  }

  public static void removeItemByObjId(L2Playable playable, int item_obj_id, int count)
View Full Code Here

        int item_id = item.getItemId();
        long removed = count <= item_count ? count : item_count;
        player.getInventory().destroyItem(item, removed, true);
        if(removed > 1)
        {
          player.sendPacket(SystemMessage.removeItems(item_id, removed));
        }
      }
    }
  }
View Full Code Here

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.