RekkasGit / E3Next

10 stars 19 forks source link

Issue with AoE range #203

Closed Zarius01 closed 5 months ago

Zarius01 commented 8 months ago

In testing with the ENC/CLR spell Wake of Tranquility (AoE ranged pacify) E3N is reporting that the target is out of range when it is not.

Standing in the exact same position for both below tests I receive the following results.

Result 1 using E3N with the following command /nowCast CharacterName "Wake of Tranquility" ${Target.ID} I receive the following response in the MQ Window: <CharacterName> Nowcast of Wake of Tranquility unsuccessful due to CAST_OUTOFRANGE!"

Result 2 casting direct from the character Casting directly from the enchanter standing in the exact same position the cast is successful and the mob(s) are pacified when clicking the spell gem rather than using the nowCast command

The Wake spell is a 200 spell range, but has a 30 or so AoE effect range. Is it possible that MQ/E3 is assuming the value of the AoE effect, rather than the actual cast range when attempting to cast the spell?

Thank you.

Zar.

MetalJacx commented 5 months ago

I believe I know the issue. Wake of Tranquility is consider a beneficial spell and not detrimental so the check is not leveraging range and automatically leveraging AE Range.

image

if (SpellType.Equals("Detrimental", StringComparison.OrdinalIgnoreCase))
                    {
                        if (AERange > 0)
                        {
                            if (MyRange == 0)
                            {
                                //set MyRange to AE range for spells that don't have a MyRange like PBAE nukes
                                MyRange = AERange;
                            }
                        }

                    }
                    else
                    {
                        //if the buff/heal has an AERange value, set MyRange to AE Range because otherwise the spell won't land on the target
                        if (AERange > 0)
                        {
                            MyRange = AERange;
                        }

                    }

i think maybe adding a subcategory check for CALM, might fix this issue.

image

MetalJacx commented 5 months ago

Bug fix submitted and waiting for verification and merge approval.