Examples of EffectCharge


Examples of com.l2jfrozen.gameserver.skills.effects.EffectCharge

      f = null;
      weapon = null;
     
      if (skill.getId() == 345 || skill.getId() == 346) // Sonic Rage or Raging Force
      {
        EffectCharge effect = (EffectCharge) activeChar.getFirstEffect(L2Effect.EffectType.CHARGE);
        if (effect != null)
        {
          int effectcharge = effect.getLevel();
          if (effectcharge < 7)
          {
            effectcharge++;
            effect.addNumCharges(1);
           
            activeChar.sendPacket(new EtcStatusUpdate((L2PcInstance) activeChar));
            SystemMessage sm = new SystemMessage(SystemMessageId.FORCE_INCREASED_TO_S1);
            sm.addNumber(effectcharge);
            activeChar.sendPacket(sm);
          }
          else
          {
            SystemMessage sm = new SystemMessage(SystemMessageId.FORCE_MAXLEVEL_REACHED);
            activeChar.sendPacket(sm);
          }
        }
        else
        {
          if (skill.getId() == 345) // Sonic Rage
          {
            L2Skill dummy = SkillTable.getInstance().getInfo(8, 7); // Lv7 Sonic Focus
            dummy.getEffects(activeChar, activeChar, ss, sps, bss);
            dummy = null;
          }
          else if (skill.getId() == 346) // Raging Force
          {
            L2Skill dummy = SkillTable.getInstance().getInfo(50, 7); // Lv7 Focused Force
            dummy.getEffects(activeChar, activeChar, ss, sps, bss);
            dummy = null;
          }
        }
        effect = null;
      }
      // self Effect :]
      L2Effect effect = activeChar.getFirstEffect(skill.getId());
      if (effect != null && effect.isSelfEffect())
      {
        // Replace old effect with new one.
        effect.exit(false);
      }
      skill.getEffectsSelf(activeChar);
      effect = null;
    }
   
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.effects.EffectCharge

  @Override
  public boolean checkCondition(L2Character activeChar, L2Object target, boolean itemOrWeapon)
    {
     if (activeChar instanceof L2PcInstance)
     {
       EffectCharge e = (EffectCharge)activeChar.getFirstEffect(this);
       if ((e != null) &&
        (e.numCharges >= getNumCharges()))
        {
          activeChar.sendPacket(new SystemMessage(SystemMessageId.FORCE_MAXLEVEL_REACHED));
          SystemMessage sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED);
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.effects.EffectCharge

  {
    if(caster.isAlikeDead())
      return;

    // get the effect
    EffectCharge effect = null;
    if(caster instanceof L2PcInstance)
    {
      effect = ((L2PcInstance) caster).getChargeEffect();
    }
    else
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.effects.EffectCharge

  public boolean checkCondition(L2Character activeChar, L2Object target, boolean itemOrWeapon)
  {
    if (activeChar instanceof L2PcInstance)
    {
      L2PcInstance player = (L2PcInstance) activeChar;
      EffectCharge e = (EffectCharge) player.getFirstEffect(chargeSkillId);
      if (e == null || e.numCharges < getNumCharges())
      {
        SystemMessage sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED);
        sm.addSkillName(getId());
        activeChar.sendPacket(sm);
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.effects.EffectCharge

  {
    if (caster.isAlikeDead())
      return;
   
    // get the effect
    EffectCharge effect = (EffectCharge) caster.getFirstEffect(chargeSkillId);
    if (effect == null || effect.numCharges < getNumCharges())
    {
      SystemMessage sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED);
      sm.addSkillName(getId());
      caster.sendPacket(sm);
      return;
    }
   
    double modifier = 0;
    modifier = (effect.getLevel() - getNumCharges()) * 0.33;
   
    if (getTargetType() != SkillTargetType.TARGET_AREA && getTargetType() != SkillTargetType.TARGET_MULTIFACE)
      effect.numCharges -= getNumCharges();
   
    if (caster instanceof L2PcInstance)
      caster.sendPacket(new EtcStatusUpdate((L2PcInstance) caster));
   
    if (effect.numCharges == 0)
      effect.exit(false);
   
    boolean ss = caster.checkSs();
   
    for (L2Object target2 : targets)
    {
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.effects.EffectCharge

  public boolean checkCondition(L2Character activeChar, L2Object target, boolean itemOrWeapon)
  {
    if(activeChar instanceof L2PcInstance)
    {
      L2PcInstance player = (L2PcInstance) activeChar;
      EffectCharge e = (EffectCharge) player.getFirstEffect(chargeSkillId);
      if(e == null || e.numCharges < getNumCharges())
      {
        SystemMessage sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED);
        sm.addSkillName(getId());
        activeChar.sendPacket(sm);
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.effects.EffectCharge

  {
    if(activeChar.isAlikeDead())
      return;

    // get the effect
    EffectCharge effect = (EffectCharge) activeChar.getFirstEffect(chargeSkillId);
    if(effect == null || effect.numCharges < getNumCharges())
    {
      SystemMessage sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED);
      sm.addSkillName(getId());
      activeChar.sendPacket(sm);
      return;
    }

    // decrease?
    effect.numCharges -= getNumCharges();

    // update icons
    // activeChar.updateEffectIcons();

    // maybe exit? no charge
    if(effect.numCharges == 0)
    {
      effect.exit(false);
    }

    // apply effects
    if(hasEffects())
    {
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.effects.EffectCharge

      && skill.getSkillType() != SkillType.CHARGE
      && skill.getSkillType() != SkillType.CHARGEDAM
      && skill.getSkillType() != SkillType.CHARGE_EFFECT
      && skill.getSkillType() != SkillType.PDAM)
    {
      EffectCharge effect = (EffectCharge) getFirstEffect(L2Effect.EffectType.CHARGE);
      if(effect == null || effect.numCharges < skill.getNumCharges())
      {
        sendPacket(new SystemMessage(SystemMessageId.SKILL_NOT_AVAILABLE));
        return;
      }
     
      effect.numCharges -= skill.getNumCharges();
      sendPacket(new EtcStatusUpdate(this));

      if(effect.numCharges == 0)
      {
        effect.exit(false);
      }
    }
    //************************************* Check Casting Conditions *******************************************

    // Check if the caster own the weapon needed
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.effects.EffectCharge

      {
        //Implements effect charge
        if(e.getEffectType() == L2Effect.EffectType.CHARGE)
        {
          env.skill = SkillTable.getInstance().getInfo(8, effector.getSkillLevel(8));
          EffectCharge effect = (EffectCharge) env.target.getFirstEffect(L2Effect.EffectType.CHARGE);
          if(effect != null)
          {
            int effectcharge = effect.getLevel();
            if(effectcharge < _numCharges)
            {
              effectcharge++;
              effect.addNumCharges(effectcharge);
              if(env.target instanceof L2PcInstance)
              {
                env.target.sendPacket(new EtcStatusUpdate((L2PcInstance) env.target));
                SystemMessage sm = new SystemMessage(SystemMessageId.FORCE_INCREASED_TO_S1);
                sm.addNumber(effectcharge);
View Full Code Here

Examples of net.sf.l2j.gameserver.skills.effects.EffectCharge

              activeChar.sendPacket(new SystemMessage(SystemMessageId.ATTACK_FAILED));
            }

            if (skill.getId() == 345 || skill.getId() == 346) // Sonic Rage or Raging Force
            {
                EffectCharge effect = (EffectCharge)activeChar.getFirstEffect(L2Effect.EffectType.CHARGE);
                if (effect != null)
                {
                    int effectcharge = effect.getLevel();
                    if (effectcharge < 7)
                    {
                        effectcharge++;
                        effect.addNumCharges(1);
                        if (activeChar instanceof L2PcInstance)
                        {
                          activeChar.sendPacket(new EtcStatusUpdate((L2PcInstance)activeChar));
                          SystemMessage sm = new SystemMessage(SystemMessageId.FORCE_INCREASED_TO_S1);
                          sm.addNumber(effectcharge);
                          activeChar.sendPacket(sm);
                        }
                    }
                    else
                    {
                        SystemMessage sm = new SystemMessage(SystemMessageId.FORCE_MAXLEVEL_REACHED);
                        activeChar.sendPacket(sm);
                    }
                }
                else
                {
                    if (skill.getId() == 345) // Sonic Rage
                    {
                        L2Skill dummy = SkillTable.getInstance().getInfo(8, 7); // Lv7 Sonic Focus
                        dummy.getEffects(activeChar, activeChar);
                    }
                    else if (skill.getId() == 346) // Raging Force
                    {
                        L2Skill dummy = SkillTable.getInstance().getInfo(50, 7); // Lv7 Focused Force
                        dummy.getEffects(activeChar, activeChar);
                    }
                }
            }
            //self Effect :]
            L2Effect effect = activeChar.getFirstEffect(skill.getId());
            if (effect != null && effect.isSelfEffect())
            {
              //Replace old effect with new one.
              effect.exit();
            }
            skill.getEffectsSelf(activeChar);
        }

        if (skill.isSuicideAttack())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.