Package com.l2jfrozen.gameserver.managers

Examples of com.l2jfrozen.gameserver.managers.DuelManager


          && ((L2PcInstance) target).isInDuel()
          && (skill.getSkillType() == L2Skill.SkillType.DEBUFF
            || skill.getSkillType() == L2Skill.SkillType.BUFF)
          && player.getDuelId() == ((L2PcInstance) target).getDuelId())
      {
        DuelManager dm = DuelManager.getInstance();
        if(dm!=null)
        {
          L2Effect[] effects = skill.getEffects(activeChar, target, ss, sps, bss);
          if(effects!=null)
            for(L2Effect buff : effects)
              if(buff != null)
                dm.onBuff(((L2PcInstance) target), buff);
        }
        dm = null;
      }
      else
        skill.getEffects(activeChar, target, ss, sps, bss);
View Full Code Here


      // if this is a debuff let the duel manager know about it
      // so the debuff can be removed after the duel
      // (player & target must be in the same duel)
      if (target instanceof L2PcInstance && ((L2PcInstance) target).isInDuel() && skill.getSkillType() == SkillType.DEBUFF && activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())
      {
        DuelManager dm = DuelManager.getInstance();
        for (L2Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
          if (debuff != null)
            dm.onBuff(((L2PcInstance) target), debuff);
      }
      else
        skill.getEffects(activeCubic.getOwner(), target);
    }
  }
View Full Code Here

            if (target instanceof L2PcInstance
                && ((L2PcInstance) target).isInDuel()
                && skill.getSkillType() == SkillType.DEBUFF
                && activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())
            {
              DuelManager dm = DuelManager.getInstance();
              for (L2Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
                if (debuff != null)
                  dm.onBuff(((L2PcInstance) target), debuff);
            }
            else
              skill.getEffects(activeCubic.getOwner(), target);
            if (Config.DEBUG)
              _log.info("Disablers: useCubicSkill() -> success");
          }
          else
          {
            if (Config.DEBUG)
              _log.info("Disablers: useCubicSkill() -> failed");
          }
          break;
        }
        case PARALYZE: // use same as root for now
        {
          if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill))
          {
            // if this is a debuff let the duel manager know about it
            // so the debuff can be removed after the duel
            // (player & target must be in the same duel)
            if (target instanceof L2PcInstance
                && ((L2PcInstance) target).isInDuel()
                && skill.getSkillType() == SkillType.DEBUFF
                && activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())
            {
              DuelManager dm = DuelManager.getInstance();
              for (L2Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
                if (debuff != null)
                  dm.onBuff(((L2PcInstance) target), debuff);
            }
            else
              skill.getEffects(activeCubic.getOwner(), target);
           
            if (Config.DEBUG)
              _log.info("Disablers: useCubicSkill() -> success");
          }
          else
          {
            if (Config.DEBUG)
              _log.info("Disablers: useCubicSkill() -> failed");
          }
          break;
        }
        case CANCEL:
        {
          L2Effect[] effects = target.getAllEffects();
         
          if (effects == null || effects.length == 0)
            break;
         
          int max_negated_effects = 3;
          int count = 0;
          for (L2Effect e : effects)
          {
            if (e.getSkill().isOffensive() && count < max_negated_effects)
            {
              // Do not remove raid curse skills
              if (e.getSkill().getId() != 4215 && e.getSkill().getId() != 4515
                  && e.getSkill().getId() != 4082)
              {
                e.exit(true);
                if (count > -1)
                  count++;
              }
            }
          }
         
          break;
        }
        case ROOT:
        {
          if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill))
          {
            // if this is a debuff let the duel manager know about it
            // so the debuff can be removed after the duel
            // (player & target must be in the same duel)
            if (target instanceof L2PcInstance
                && ((L2PcInstance) target).isInDuel()
                && skill.getSkillType() == SkillType.DEBUFF
                && activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())
            {
              DuelManager dm = DuelManager.getInstance();
              for (L2Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
                if (debuff != null)
                  dm.onBuff(((L2PcInstance) target), debuff);
            }
            else
              skill.getEffects(activeCubic.getOwner(), target);
           
            if (Config.DEBUG)
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.managers.DuelManager

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.