Package com.l2jfrozen.gameserver.handler

Examples of com.l2jfrozen.gameserver.handler.ISkillHandler


            }
          }
        }
      }
     
      ISkillHandler handler = null;
     
      if (skill.isToggle())
      {
        // Check if the skill effects are already in progress on the L2Character
        if (getFirstEffect(skill.getId()) != null)
        {
          handler = SkillHandler.getInstance().getSkillHandler(skill.getSkillType());
         
          if (handler != null)
          {
            handler.useSkill(this, skill, targets);
          }
          else
          {
            skill.useSkill(this, targets);
          }
         
          return;
        }
      }/*
       * TODO else { if(this instanceof L2PcInstance || this instanceof L2Summon) { L2PcInstance caster = this instanceof L2PcInstance ? (L2PcInstance) this : ((L2Summon) this).getOwner(); for(L2Object target : targets) { if(target instanceof L2NpcInstance) { if (((L2NpcInstance)
       * target).getTemplate().getEventQuests(Quest.QuestEventType.ON_SKILL_USE) != null) { for(Quest quest : ((L2NpcInstance) target).getTemplate().getEventQuests(Quest.QuestEventType.ON_SKILL_USE)) { quest.notifySkillUse((L2NpcInstance) target, caster, skill); } } } } caster = null; } }
       */
     
      // Check if over-hit is possible
      if (skill.isOverhit())
      {
        // Set the "over-hit enabled" flag on each of the possible targets
        for (L2Object target : targets)
        {
          L2Character player = (L2Character) target;
          if (player instanceof L2Attackable)
          {
            ((L2Attackable) player).overhitEnabled(true);
          }
         
          player = null;
        }
      }
     
      // Get the skill handler corresponding to the skill type (PDAM, MDAM, SWEEP...) started in gameserver
      handler = SkillHandler.getInstance().getSkillHandler(skill.getSkillType());
     
      // Launch the magic skill and calculate its effects
      if (handler != null)
      {
        handler.useSkill(this, skill, targets);
      }
      else
      {
        skill.useSkill(this, targets);
      }
View Full Code Here


  {
    // L2Character activeChar = activeChar;
    // check for other effects
    try
    {
      ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF);

      if(handler != null)
        handler.useSkill(activeChar, skill, targets);
    }
    catch(Exception e)
    {
      if(Config.ENABLE_ALL_EXCEPTIONS)
        e.printStackTrace();
View Full Code Here

              if(stat == "root")
                negateEffect(target, SkillType.ROOT, -1);

              if(stat == "heal")
              {
                ISkillHandler Healhandler = SkillHandler.getInstance().getSkillHandler(SkillType.HEAL);
                if(Healhandler == null)
                {
                  _log.severe("Couldn't find skill handler for HEAL.");
                  continue;
                }

                L2Object tgts[] = new L2Object[] { target };
                try
                {
                  Healhandler.useSkill(activeChar, skill, tgts);
                }
                catch(IOException e)
                {
                  if(Config.ENABLE_ALL_EXCEPTIONS)
                    e.printStackTrace();
View Full Code Here

    @Override
    public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
    {
        //check for other effects
        try {
            ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF);

            if (handler != null) {
                handler.useSkill(activeChar, skill, targets);
            }
        } catch (Exception e) {
            LOGGER.error("", e);
        }
        for(L2Object object : targets)
View Full Code Here

  public void useSkill(L2Character actChar, L2Skill skill, L2Object[] targets)
  {
    //check for other effects
    try
    {
      ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF);

      if(handler != null)
        handler.useSkill(actChar, skill, targets);

      handler = null;
    }
    catch(Exception e)
    {
View Full Code Here

    boolean sps = activeChar.checkSps();
   
    // check for other effects
    try
    {
      ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF);
     
      if (handler != null)
        handler.useSkill(activeChar, skill, targets);
     
      handler = null;
    }
    catch (Exception e)
    {
View Full Code Here

      }

      try
      {
        // Get the skill handler corresponding to the skill type
        ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(skill.getSkillType());

        L2Character[] targets = new L2Character[1];
        targets[0] = target;

        // Launch the magic skill and calculate its effects
        if(handler != null)
        {
          handler.useSkill(caster, skill, targets);
        }
        else
        {
          skill.useSkill(caster, targets);
        }
View Full Code Here

              }
             
              owner.broadcastPacket(new MagicSkillUser(owner, target, skill.getId(), skill.getLevel(), 0, 0));
             
              SkillType type = skill.getSkillType();
              ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(skill.getSkillType());
              L2Character[] targets = { target };
             
              if ((type == SkillType.PARALYZE) || (type == SkillType.STUN)
                  || (type == SkillType.ROOT)
                  || (type == SkillType.AGGDAMAGE))
              {
                if (Config.DEBUG)
                  _log.info("L2CubicInstance: Action.run() handler " + type);
                useCubicDisabler(type, L2CubicInstance.this, skill, targets);
              }
              else if (type == SkillType.MDAM)
              {
                if (Config.DEBUG)
                  _log.info("L2CubicInstance: Action.run() handler " + type);
                useCubicMdam(L2CubicInstance.this, skill, targets);
              }
              else if ((type == SkillType.POISON)
                  || (type == SkillType.DEBUFF)
                  || (type == SkillType.DOT))
              {
                if (Config.DEBUG)
                  _log.info("L2CubicInstance: Action.run() handler " + type);
                useCubicContinuous(L2CubicInstance.this, skill, targets);
              }
              else if (type == SkillType.DRAIN)
              {
                if (Config.DEBUG)
                  _log.info("L2CubicInstance: Action.run() skill " + type);
                ((L2SkillDrain) skill).useCubicSkill(L2CubicInstance.this, targets);
              }
              else
              {
                handler.useSkill(owner, skill, targets);
                if (Config.DEBUG)
                  _log.info("L2CubicInstance: Action.run(); other handler");
              }
            }
          }
View Full Code Here

          if (target != null && !target.isDead())
          {
            if (target.getMaxHp() - target.getCurrentHp() > skill.getPower())
            {
              L2Character[] targets = { target };
              ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(skill.getSkillType());
              if (handler != null)
              {
                handler.useSkill(_owner, skill, targets);
              }
              else
              {
                skill.useSkill(_owner, targets);
              }
View Full Code Here

          skill = _owner._skills.get(skill.getTriggeredId());
          if(skill == null)
            return;
        }

        ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(skill.getSkillType());
        L2Object[] targets = skill.getTargetList(_owner, false, target);

        _owner.broadcastPacket(new MagicSkillLaunched(_owner, skill.getDisplayId(), skill.getLevel(), targets));
        _owner.broadcastPacket(new MagicSkillUser(_owner, (L2Character) targets[0], skill.getDisplayId(), skill.getLevel(), 0, 0));

        // Launch the magic skill and calculate its effects
        if(handler != null)
        {
          handler.useSkill(_owner, skill, targets);
        }
        else
        {
          skill.useSkill(_owner, targets);
        }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.handler.ISkillHandler

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.