Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Skill$AddedSkill


      {
        return;
      }
      for (Player player : GameObjectsStorage.getAllPlayersForIterate())
      {
        Skill skill = SkillTable.getInstance().getInfo(3266, 1);
        MagicSkillUse msu = new MagicSkillUse(player, player, 3266, 1, skill.getHitTime(), 0);
        player.broadcastPacket(msu);
      }
      instance = null;
      new NewYearTimer();
    }
View Full Code Here


    {
      int[] skillIds = getTemplate().getParam().getIntegerArray("skillIds");
      int[] skillLevels = getTemplate().getParam().getIntegerArray("skillLevels");
      for (int i = 0; i < skillIds.length; i++)
      {
        Skill skill = SkillTable.getInstance().getInfo(skillIds[i], skillLevels[i]);
        for (Creature cha : skill.getTargets(getEffector(), getEffected(), false))
        {
          if(!getSkill().isAwakeningToggle())
            getEffector().broadcastPacket(new MagicSkillUse(getEffector(), cha, skillIds[i], skillLevels[i], 0, 0));
        }
        getEffector().callSkill(skill, skill.getTargets(getEffector(), getEffected(), false), false);
      }
    }
  }
View Full Code Here

    }
    int[] skillIds = getTemplate().getParam().getIntegerArray("skillIds");
    int[] skillLevels = getTemplate().getParam().getIntegerArray("skillLevels");
    for (int i = 0; i < skillIds.length; i++)
    {
      Skill skill = SkillTable.getInstance().getInfo(skillIds[i], skillLevels[i]);
      for (Creature cha : skill.getTargets(getEffector(), getEffected(), false))
      {
        if(!getSkill().isAwakeningToggle())
          getEffector().broadcastPacket(new MagicSkillUse(getEffector(), cha, skillIds[i], skillLevels[i], 0, 0));
      }
      getEffector().callSkill(skill, skill.getTargets(getEffector(), getEffected(), false), false);
    }
    return true;
  }
View Full Code Here

      case AGATHION:
        activeChar.setAgathion(getNpcId());
        // If have lifeTime this is a servitor agathion...
        if (_lifeTime > 0)
        {
          Skill agatSkill = getFirstAddedSkill();
          NpcTemplate agatTemplate = NpcHolder.getInstance().getTemplate(getNpcId());
          AgathionInstance agat = new AgathionInstance(IdFactory.getInstance().getNextId(), agatTemplate, activeChar, _lifeTime, agatSkill, activeChar.getLoc());
          agat.setReflection(activeChar.getReflection());
          agat.spawnMe(activeChar.getLoc());
          agat.setFollowTarget(activeChar);
          agat.setIsInvul(true);
          agat.setRunning();
          ThreadPoolManager.getInstance().schedule(new GameObjectTasks.DeleteTask(agat), _lifeTime);
        }
        break;
      case TRAP:
        Skill trapSkill = getFirstAddedSkill();
        if (activeChar.getTrapsCount() >= 5)
        {
          activeChar.destroyFirstTrap();
        }
        TrapInstance trap = new TrapInstance(IdFactory.getInstance().getNextId(), NpcHolder.getInstance().getTemplate(getNpcId()), activeChar, trapSkill);
        activeChar.addTrap(trap);
        trap.spawnMe();
        break;
      case SERVITOR:
      case MULTI_SERVITOR:
      case SIEGE_SUMMON:
        Location loc = null;
        if (_targetType == SkillTargetType.TARGET_CORPSE)
        {
          for (Creature target : targets)
          {
            if ((target != null) && target.isDead())
            {
              activeChar.getAI().setAttackTarget(null);
              loc = target.getLoc();
              if (target.isNpc())
              {
                ((NpcInstance) target).endDecayTask();
              }
              else if (target.isServitor())
              {
                ((SummonInstance) target).endDecayTask();
              }
              else
              {
                return;
              }
            }
          }
        }
        if (activeChar.isMounted() || !activeChar.getSummonList().canSummon(_summonType, _summonPoint))
        {
          return;
        }
        NpcTemplate summonTemplate = NpcHolder.getInstance().getTemplate(getNpcId());
        SummonInstance summon = new SummonInstance(IdFactory.getInstance().getNextId(), summonTemplate, activeChar, _lifeTime, _summonPoint, this);
        activeChar.getSummonList().addSummon(summon);
        summon.setExpPenalty(_expPenalty);
        summon.setExp(Experience.LEVEL[Math.min(summon.getLevel(), Experience.LEVEL.length - 1)]);
        summon.setHeading(activeChar.getHeading());
        summon.setReflection(activeChar.getReflection());
        summon.spawnMe(loc == null ? Location.findAroundPosition(activeChar, 50, 70) : loc);
        summon.setRunning();
        summon.setFollowMode(true);
        if (summon.getSkillLevel(4140) > 0)
        {
          summon.altUseSkill(SkillTable.getInstance().getInfo(4140, summon.getSkillLevel(4140)), activeChar);
        }
        if (summon.getName().equalsIgnoreCase("Shadow"))
        {
          summon.addStatFunc(new FuncAdd(Stats.ABSORB_DAMAGE_PERCENT, 0x40, this, 15));
        }
        if (activeChar.isInOlympiadMode())
        {
          summon.getEffectList().stopAllEffects();
        }
        summon.setCurrentHpMp(summon.getMaxHp(), summon.getMaxMp(), false);
        if (_summonType == SummonType.SIEGE_SUMMON)
        {
          SiegeEvent<?, ?> siegeEvent = activeChar.getEvent(SiegeEvent.class);
          siegeEvent.addSiegeSummon(summon);
        }
        break;
      case MERCHANT:
        if ((activeChar.getSummonList().size() > 0) || activeChar.isMounted())
        {
          return;
        }
        NpcTemplate merchantTemplate = NpcHolder.getInstance().getTemplate(getNpcId());
        MerchantInstance merchant = new MerchantInstance(IdFactory.getInstance().getNextId(), merchantTemplate);
        merchant.setCurrentHp(merchant.getMaxHp(), false);
        merchant.setCurrentMp(merchant.getMaxMp());
        merchant.setHeading(activeChar.getHeading());
        merchant.setReflection(activeChar.getReflection());
        merchant.spawnMe(activeChar.getLoc());
        ThreadPoolManager.getInstance().schedule(new GameObjectTasks.DeleteTask(merchant), _lifeTime);
        break;
      case TREE:
        if (activeChar.isMounted() || !activeChar.getSummonList().canSummon(_summonType, _summonPoint))
        {
          return;
        }
        NpcTemplate treeTemplate = NpcHolder.getInstance().getTemplate(getNpcId());
        Location SummonLoc;
        if (activeChar.getGroundSkillLoc() != null)
        {
          SummonLoc = activeChar.getGroundSkillLoc();
        }
        else
        {
          SummonLoc = activeChar.getLoc();
        }
        Skill summonSkill = getFirstAddedSkill();
        TreeInstance tree = new TreeInstance(IdFactory.getInstance().getNextId(), treeTemplate, activeChar, _lifeTime, summonSkill, SummonLoc);
        activeChar.getSummonList().addSummon(tree);
        tree.setCurrentHp(tree.getMaxHp(), false);
        tree.setCurrentMp(tree.getMaxMp());
        tree.setHeading(activeChar.getHeading());
        tree.setReflection(activeChar.getReflection());
        tree.setFollowMode(false);
        tree.spawnMe(SummonLoc);
        ThreadPoolManager.getInstance().schedule(new GameObjectTasks.DeleteTask(tree), _lifeTime);
        break;
      case SYMBOL:
        if (activeChar.isMounted())
        {
          return;
        }
        NpcTemplate symbolTemplate = NpcHolder.getInstance().getTemplate(getNpcId());
        Location symbolLoc;
        if (activeChar.getGroundSkillLoc() != null)
        {
          symbolLoc = activeChar.getGroundSkillLoc();
        }
        else
        {
          symbolLoc = activeChar.getLoc();
        }
        Skill symbolSkill = getFirstAddedSkill();
        SymbolInstance symbol = new SymbolInstance(IdFactory.getInstance().getNextId(), symbolTemplate, activeChar, symbolSkill);
        symbol.setReflection(activeChar.getReflection());
        symbol.setShowName(false);
        symbol.spawnMe(symbolLoc);
        ThreadPoolManager.getInstance().schedule(new GameObjectTasks.DeleteTask(symbol), _lifeTime);
View Full Code Here

  /**
   * Method paralyzeTeams.
   */
  public void paralyzeTeams()
  {
    Skill revengeSkill = SkillTable.getInstance().getInfo(Skill.SKILL_RAID_CURSE, 1);
    for (Player player : getPlayers(_team1live))
    {
      player.getEffectList().stopEffect(Skill.SKILL_MYSTIC_IMMUNITY);
      revengeSkill.getEffects(player, player, false, false);
    }
    for (Player player : getPlayers(_team2live))
    {
      player.getEffectList().stopEffect(Skill.SKILL_MYSTIC_IMMUNITY);
      revengeSkill.getEffects(player, player, false, false);
    }
  }
View Full Code Here

   */
  public boolean playerHasLost(Player player)
  {
    _team1live.remove(player.getStoredId());
    _team2live.remove(player.getStoredId());
    Skill revengeSkill = SkillTable.getInstance().getInfo(Skill.SKILL_RAID_CURSE, 1);
    player.getEffectList().stopEffect(Skill.SKILL_MYSTIC_IMMUNITY);
    revengeSkill.getEffects(player, player, false, false);
    return !checkTeams();
  }
View Full Code Here

  public void onStart()
  {
    super.onStart();
    if (!_effected.startPMuted())
    {
      Skill castingSkill = _effected.getCastingSkill();
      if ((castingSkill != null) && !castingSkill.isMagic())
      {
        _effected.abortCast(true, true);
      }
    }
  }
View Full Code Here

  /**
   * Method paralyzePlayers.
   */
  public static void paralyzePlayers()
  {
    Skill revengeSkill = SkillTable.getInstance().getInfo(Skill.SKILL_RAID_CURSE, 1);
    for (Player player : getPlayers(players_list))
    {
      player.getEffectList().stopEffect(Skill.SKILL_MYSTIC_IMMUNITY);
      revengeSkill.getEffects(player, player, false, false);
    }
  }
View Full Code Here

    if (getSkill().getTargetType() != Skill.SkillTargetType.TARGET_SELF)
    {
      _log.error("Symbol skill with target != self, id = " + getSkill().getId());
      return false;
    }
    Skill skill = getSkill().getFirstAddedSkill();
    if (skill == null)
    {
      _log.error("Not implemented symbol skill, id = " + getSkill().getId());
      return false;
    }
View Full Code Here

   */
  @Override
  public void onStart()
  {
    super.onStart();
    Skill skill = getSkill().getFirstAddedSkill();
    skill.setMagicType(getSkill().getMagicType());
    Location loc = _effected.getLoc();
    if (_effected.isPlayer() && (((Player) _effected).getGroundSkillLoc() != null))
    {
      loc = ((Player) _effected).getGroundSkillLoc();
      ((Player) _effected).setGroundSkillLoc(null);
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Skill$AddedSkill

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.