[DiscordArchive] Could you give me spellid?
[DiscordArchive] Could you give me spellid?
Archived author: ModoX • Posted: 2025-04-07T10:06:08.566000+00:00
Original source
Could you give me spellid?
Archived author: syntaxhell • Posted: 2025-04-07T10:06:08.886000+00:00
Original source
Yeah okay, makes sense, cause it really felt like a hackfix
Archived author: syntaxhell • Posted: 2025-04-07T10:06:24.515000+00:00
Original source
SpellID: 107570
![[Image: image.png?ex=690c732e&is=690b21ae&hm=a4e...d3e19485d&]](https://cdn.discordapp.com/attachments/376074396915335170/1358744773174886532/image.png?ex=690c732e&is=690b21ae&hm=a4ea0c1452e012c86734748f8b76de3352d3caa02c56a24a85249a7d3e19485d&)
Archived author: syntaxhell • Posted: 2025-04-07T10:06:38.235000+00:00
Original source
![[Image: image.png?ex=690c732e&is=690b21ae&hm=a4e...d3e19485d&]](https://cdn.discordapp.com/attachments/376074396915335170/1358744773174886532/image.png?ex=690c732e&is=690b21ae&hm=a4ea0c1452e012c86734748f8b76de3352d3caa02c56a24a85249a7d3e19485d&)
Archived author: syntaxhell • Posted: 2025-04-07T10:06:59.819000+00:00
Original source
Like Shauren pointed out, that is has TARGET_UNIT_DEST_AREA_ENEMY built into EFFECT_0
Archived author: ModoX • Posted: 2025-04-07T10:12:32.355000+00:00
Original source
> OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_warr_storm_bolt::FilterTargets, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
you hooked wrongly here, you gotta use TARGET_UNIT_DEST_AREA_ENEMY instead of SPELL_EFFECT_BLABLABLA
Archived author: ModoX • Posted: 2025-04-07T10:12:46.064000+00:00
Original source
(should've also caused an error in DBErrors.log)
Archived author: ModoX • Posted: 2025-04-07T10:13:57.449000+00:00
Original source
instead of `if (targets.size() > 1)` you indeed really just can do `if (!GetCaster()->HasAura(<spellid of the spell which allows 3 targets here, preferably use it from enum as usual and dont forget to validate it>))`
Archived author: ModoX • Posted: 2025-04-07T10:15:29.247000+00:00
Original source
in `HandleDummy` you can remove the caster and target checks, its always guaranteed to have a valid caster in a SpellScript (Note: in AuraScripts caster can be null, imagine me moonfiring you and i logout - moonfire is still ticking and caster (me) no longer exists)
GetHitUnit is also guaranteed to be valid UNLESS the target may be a gameobject, which is not the case here, so you can break `HandleDummy` body down to just: `GetCaster()->CastSpell(GetHitUnit(), blabla)`
Archived author: syntaxhell • Posted: 2025-04-07T10:20:39.736000+00:00
Original source
Oooooh now that makes sense! I though it had to always be hooked onto whatever the EFFECT_X says