silverz Posted May 3, 2016 Report Share Posted May 3, 2016 Hello, i'm trying to script a spell that currently affects many targets including players (who shouldnt be). Is there any way i can script that spell to target only creatures? I'm asking this in generic type. Link to comment Share on other sites More sharing options...
Rochet2 Posted May 3, 2016 Report Share Posted May 3, 2016 Take a look at this: https://github.com/TrinityCore/TrinityCore/blob/a56a402190c885e51038df55654875cc9e875c03/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp#L491-L515 and here are some variants of the same functionality that allow more different kinds of checks on targets:https://github.com/TrinityCore/TrinityCore/blob/6.x/src/server/game/Spells/SpellScript.h#L319-L332 ps. Im not sure if these are what you are looking for, but they looked like it. 1 Link to comment Share on other sites More sharing options...
Shauren Posted May 3, 2016 Report Share Posted May 3, 2016 If all you want is a creature target then don't create any spell scripts, proper entry in `conditions` table should be enough 1 Link to comment Share on other sites More sharing options...
silverz Posted May 4, 2016 Author Report Share Posted May 4, 2016 2 hours ago, Shauren said: If all you want is a creature target then don't create any spell scripts, proper entry in `conditions` table should be enough Never noticed that. Thank you. 3 hours ago, Rochet2 said: Take a look at this: https://github.com/TrinityCore/TrinityCore/blob/a56a402190c885e51038df55654875cc9e875c03/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp#L491-L515 and here are some variants of the same functionality that allow more different kinds of checks on targets:https://github.com/TrinityCore/TrinityCore/blob/6.x/src/server/game/Spells/SpellScript.h#L319-L332 ps. Im not sure if these are what you are looking for, but they looked like it. Seems cool, also works. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts