A Project for Chronicle 4 based on L2JServer.


    Don`t work some skill on weapon trigger actions.

    Share

    Flopix

    Posts : 18
    Join date : 2014-02-28

    Don`t work some skill on weapon trigger actions.

    Post  Flopix on 2nd December 2017, 15:38

    L2Weapon.java

    Code:

     /**
     * Returns effects of skills associated with the item to be triggered onCast.
     * @param caster : L2Character pointing out the caster
     * @param target : L2Character pointing out the target
     * @param trigger : L2Skill pointing out the skill triggering this action
     * @return L2Effect[] : array of effects generated by the skill
     */
     public L2Effect[] getSkillEffects(L2Character caster, L2Character target, L2Skill trigger)

    This method returns effects on associated skill. But some skill active and does not contain effects.

    Code:

    <skill id="3598" levels="1" name="Full Recover">
      <!-- Infinity Rod Skill -->
      <set name="target" val="TARGET_SELF"/>
      <set name="power" val="100"/>
      <set name="skillType" val="HEAL_PERCENT"/>
      <set name="operateType" val="OP_ACTIVE"/>
      <set name="castRange" val="-1"/>
      <set name="effectRange" val="-1"/>
      <set name="aggroPoints" val="100"/>
      <for>
      </for>
    </skill>

    For example hero weapon Infinity Rod associated with skill 3598-1 "Full Recover". But this skill does not contain effects and on trigger action nothing happens.
    avatar
    DnR
    Admin
    Admin

    Posts : 1053
    Join date : 2012-12-03

    Re: Don`t work some skill on weapon trigger actions.

    Post  DnR on 31st December 2017, 18:18

    Fixed. Thanks for reporting. Smile

    Flopix

    Posts : 18
    Join date : 2014-02-28

    Re: Don`t work some skill on weapon trigger actions.

    Post  Flopix on 29th June 2018, 17:34

    Thanks.

    But need calculate target list. If target="TARGET_SELF" this work not correct.

    Some changes:
    Code:

             try
             {
                // Get the skill handler corresponding to the skill type
                ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(skill.getSkillType());
                
    +            L2Object[] targets = skill.getTargetList(caster);
    +            if (targets != null && targets.length != 0)
    +            {
                   // Launch the magic skill and calculate its effects
                   if (handler != null)
                   {
                      handler.useSkill(caster, skill, targets);
                   }
                   else
                   {
                      skill.useSkill(caster, targets);
                   }
    +            }
             }
             catch (IOException e)
             {
             }

    Sponsored content

    Re: Don`t work some skill on weapon trigger actions.

    Post  Sponsored content


      Current date/time is 14th November 2018, 02:35