Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Player$SummonSkillCastingTask


   * @see lineage2.gameserver.listener.inventory.OnEquipListener#onUnequip(int, ItemInstance, Playable)
   */
  @Override
  public void onUnequip(int slot, ItemInstance item, Playable actor)
  {
    Player player = (Player) actor;
    Skill[] itemSkills = null;
    Skill enchant4Skill = null;
    Skill unequipeSkill = null;
    ItemTemplate it = item.getTemplate();
    itemSkills = it.getAttachedSkills();
    enchant4Skill = it.getEnchant4Skill();
    unequipeSkill = it.getUnequipeSkill();
    player.removeTriggers(it);
    if ((itemSkills != null) && (itemSkills.length > 0))
    {
      for (Skill itemSkill : itemSkills)
      {
        if ((itemSkill.getId() >= 26046) && (itemSkill.getId() <= 26048))
        {
          int level = player.getSkillLevel(itemSkill.getId());
          int newlevel = level - 1;
          if (newlevel > 0)
          {
            player.addSkill(SkillTable.getInstance().getInfo(itemSkill.getId(), newlevel), false);
          }
          else
          {
            player.removeSkillById(itemSkill.getId());
          }
        }
        else
        {
          player.removeSkill(itemSkill, false);
        }
      }
    }
    if (enchant4Skill != null)
    {
      player.removeSkill(enchant4Skill, false);
    }
    if (unequipeSkill != null)
    {
      player.doCast(unequipeSkill, player, true);
    }
    if ((itemSkills.length > 0) || (enchant4Skill != null))
    {
      player.sendSkillList();
      player.updateStats();
    }
  }
View Full Code Here


   * @param args String
   * @return boolean
   */
  private boolean whereis(String command, Player activeChar, String args)
  {
    Player friend = World.getPlayer(args);
    if (friend == null)
    {
      return false;
    }
    if ((friend.getParty() == activeChar.getParty()) || (friend.getClan() == activeChar.getClan()))
    {
      RadarControl rc = new RadarControl(0, 1, friend.getLoc());
      activeChar.sendPacket(rc);
      return true;
    }
    return false;
  }
View Full Code Here

   * @see lineage2.gameserver.listener.inventory.OnEquipListener#onEquip(int, ItemInstance, Playable)
   */
  @Override
  public void onEquip(int slot, ItemInstance item, Playable actor)
  {
    Player player = (Player) actor;
    Skill[] itemSkills = null;
    Skill enchant4Skill = null;
    ItemTemplate it = item.getTemplate();
    itemSkills = it.getAttachedSkills();
    if (item.getEnchantLevel() >= 4)
    {
      enchant4Skill = it.getEnchant4Skill();
    }
    if ((it.getType2() == ItemTemplate.TYPE2_WEAPON) && (player.getWeaponsExpertisePenalty() > 0))
    {
      return;
    }
    player.addTriggers(it);
    boolean needSendInfo = false;
    if (itemSkills.length > 0)
    {
      for (Skill itemSkill : itemSkills)
      {
        if ((itemSkill.getId() >= 26046) && (itemSkill.getId() <= 26048))
        {
          int level = player.getSkillLevel(itemSkill.getId());
          int newlevel = level;
          if (level > 0)
          {
            if (SkillTable.getInstance().getInfo(itemSkill.getId(), level + 1) != null)
            {
              newlevel = level + 1;
            }
          }
          else
          {
            newlevel = 1;
          }
          if (newlevel != level)
          {
            player.addSkill(SkillTable.getInstance().getInfo(itemSkill.getId(), newlevel), false);
          }
        }
        else if (player.getSkillLevel(itemSkill.getId()) < itemSkill.getLevel())
        {
          player.addSkill(itemSkill, false);
          if (itemSkill.isActive())
          {
            long reuseDelay = Formulas.calcSkillReuseDelay(player, itemSkill);
            reuseDelay = Math.min(reuseDelay, 30000);
            if ((reuseDelay > 0) && !player.isSkillDisabled(itemSkill))
            {
              player.disableSkill(itemSkill, reuseDelay);
              needSendInfo = true;
            }
          }
        }
      }
    }
    if (enchant4Skill != null)
    {
      player.addSkill(enchant4Skill, false);
    }
    if ((itemSkills.length > 0) || (enchant4Skill != null))
    {
      player.sendSkillList();
      player.updateStats();
      if (needSendInfo)
      {
        player.sendPacket(new SkillCoolTime(player));
      }
    }
  }
View Full Code Here

        continue;
      }
     
      addObject(PARTICLE_PLAYERS, k);
     
      Player player = k.getPlayer();
     
      player.teleToLocation(Rnd.get(waitLocs), ReflectionManager.DEFAULT);
    }
  }
View Full Code Here

    List<Location> teleportLocs = getObjects(TELEPORT_LOCS);
   
    for (int i = 0; i < players.size(); i++)
    {
      KrateisCubePlayerObject k = players.get(i);
      Player player = k.getPlayer();
     
      player.getEffectList().stopAllEffects();
     
      giveEffects(player);
     
      player.teleToLocation(teleportLocs.get(i));
      player.addEvent(this);
     
      player.sendPacket(new ExPVPMatchCCMyRecord(k), SystemMsg.THE_MATCH_HAS_STARTED);
    }
  }
View Full Code Here

    int pos = 0;
   
    List<KrateisCubePlayerObject> players = removeObjects(PARTICLE_PLAYERS);
    for (KrateisCubePlayerObject krateisPlayer : players)
    {
      Player player = krateisPlayer.getPlayer();
      pos++;
      if (krateisPlayer.getPoints() >= 10)
      {
        int count = (int) (krateisPlayer.getPoints() * dif * (1.0 + ((players.size() / pos) * 0.04)));
        dif -= 0.0016;
        if (count > 0)
        {
          Functions.addItem(player, 13067, count);
         
          int exp = count * 2880;
          int sp = count * 288;
          player.addExpAndSp(exp, sp);
        }
      }
     
      player.removeEvent(this);
     
      player.sendPacket(ExPVPMatchCCRetire.STATIC, SystemMsg.END_MATCH);
      player.teleToLocation(RETURN_LOC);
    }
  }
View Full Code Here

     * @param env Env
     */
    @Override
    public void calc(Env env)
    {
      Player pc = (Player) env.character;
      if (pc != null)
      {
        env.value = Math.max(1, env.value + pc.getHennaStatSTR());
      }
    }
View Full Code Here

    final NpcInstance actor = getActor();
    if ((caster == null) || (skill.getId() != BALLISTA_BOMB_SKILL_ID))
    {
      return;
    }
    final Player player = caster.getPlayer();
    final FortressSiegeEvent siege = actor.getEvent(FortressSiegeEvent.class);
    final FortressSiegeEvent siege2 = player.getEvent(FortressSiegeEvent.class);
    if ((siege == null) || (!siege.equals(siege2)) || (siege.getSiegeClan(SiegeEvent.ATTACKERS, player.getClan()) == null))
    {
      return;
    }
    _bombsUseCounter++;
    if (Rnd.chance(20) || (_bombsUseCounter > 4))
View Full Code Here

     * @param env Env
     */
    @Override
    public void calc(Env env)
    {
      Player pc = (Player) env.character;
      if (pc != null)
      {
        env.value = Math.max(1, env.value + pc.getHennaStatDEX());
      }
    }
View Full Code Here

     * @param env Env
     */
    @Override
    public void calc(Env env)
    {
      Player pc = (Player) env.character;
      if (pc != null)
      {
        env.value = Math.max(1, env.value + pc.getHennaStatINT());
      }
    }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Player$SummonSkillCastingTask

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.