Package net.sf.l2j.gameserver.model

Examples of net.sf.l2j.gameserver.model.L2Effect


            if (target.isDead() && getTargetType() == SkillTargetType.TARGET_CORPSE_MOB && target instanceof L2NpcInstance) {
                ((L2NpcInstance)target).endDecayTask();
            }
    }
        //effect self :]
        L2Effect effect = activeChar.getFirstEffect(getId());
        if (effect != null && effect.isSelfEffect())
        {
            //Replace old effect with new one.
            effect.exit();
        }
        // cast self effect if any
        getEffectsSelf(activeChar);
  }
View Full Code Here


  public L2Effect getEffect(Env env)
  {
    if (attachCond != null && !attachCond.test(env))
      return null;
    try {
      L2Effect effect = (L2Effect)_constructor.newInstance(env, this);
      //if (_applayCond != null)
      //  effect.setCondition(_applayCond);
      return effect;
    } catch (IllegalAccessException e) {
      e.printStackTrace();
View Full Code Here

  public boolean testImpl(Env env)
  {
    int neededBattle = _battleForces;
    if (neededBattle > 0)
    {
      L2Effect battleForce = env.player.getFirstEffect(BATTLE_FORCE);
      if (!(battleForce instanceof EffectBattleForce) ||
        ((EffectBattleForce)battleForce).forces < neededBattle)
        return false;
    }
    int neededSpell = _spellForces;
    if (neededSpell > 0)
    {
      L2Effect spellForce = env.player.getFirstEffect(SPELL_FORCE);
      if (!(spellForce instanceof EffectSpellForce) ||
        ((EffectSpellForce)spellForce).forces < neededSpell)
        return false;
    }
    return true;
View Full Code Here

            {
        caster.sendDamageMessage(target, 0, false, false, true);
      }
    }
        // effect self :]
        L2Effect seffect = caster.getFirstEffect(getId());
        if (seffect != null && seffect.isSelfEffect())
        {
            //Replace old effect with new one.
            seffect.exit();
        }
        // cast self effect if any
        getEffectsSelf(caster);
  }
View Full Code Here

      boolean charged = true;
      if (!_seedAny){
        for (int i=0;i<_seeds.length;i++){
          if (_seeds[i]!=0){
            L2Effect e = target.getFirstEffect(_seeds[i]);
            if (e==null || !e.getInUse()){
              charged = false;
              break;
            }
          }
        }
      }
      else {
        charged = false;
        for (int i=0;i<_seeds.length;i++){
          if (_seeds[i]!=0){
            L2Effect e = target.getFirstEffect(_seeds[i]);
            if (e!=null && e.getInUse()){
              charged = true;
              break;
            }
          }
        }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.model.L2Effect

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.