[DiscordArchive] You want to make a switch case depending on taregt unit type ?
[DiscordArchive] You want to make a switch case depending on taregt unit type ?
Archived author: Elmsroth • Posted: 2024-02-25T12:30:20.453000+00:00
Original source
You want to make a switch case depending on taregt unit type ?
Archived author: ElDiablo • Posted: 2024-02-25T12:40:33.935000+00:00
Original source
No you can just call FilterTargets in a spellscript and that should allow you to, for instance, filter based on distance or creature entry
Archived author: ElDiablo • Posted: 2024-02-25T12:42:46.652000+00:00
Original source
But who knows if I got it to work. SpellScripts are a bit finnicky
Archived author: ElDiablo • Posted: 2024-02-25T12:50:41.563000+00:00
Original source
It's not working yet
Archived author: Elmsroth • Posted: 2024-02-25T12:53:19.943000+00:00
Original source
I was looking for a hook on starting trade... it does not exists so I need to implement it
Archived author: ElDiablo • Posted: 2024-02-25T12:55:10.740000+00:00
Original source
GL
Archived author: ElDiablo • Posted: 2024-02-25T12:55:33.030000+00:00
Original source
Okay so the filtering DOES work but somehow the effect still kinda hits all targets
Archived author: Elmsroth • Posted: 2024-02-25T13:00:55.538000+00:00
Original source
I want to add a : bool OnBeginTrade(Player * tradeInitiator);
Archived author: Elmsroth • Posted: 2024-02-25T13:01:11.065000+00:00
Original source
Since in my module I want to be able to disallow trade
![[Image: image.png?ex=690bf392&is=690aa212&hm=5f4...00ead8691&]](https://cdn.discordapp.com/attachments/284323424032129024/1211297087292186644/image.png?ex=690bf392&is=690aa212&hm=5f453d815228291480dffed86e582696392f86f2b0ebf366fa7b65e00ead8691&)
Archived author: Elmsroth • Posted: 2024-02-25T13:02:10.468000+00:00
Original source
Just have to add a filter in the test inside the method here I think :
![[Image: image.png?ex=690bf392&is=690aa212&hm=5f4...00ead8691&]](https://cdn.discordapp.com/attachments/284323424032129024/1211297087292186644/image.png?ex=690bf392&is=690aa212&hm=5f453d815228291480dffed86e582696392f86f2b0ebf366fa7b65e00ead8691&)