mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Flag of Ownership shouldn't target creatures
This commit is contained in:
@@ -3190,6 +3190,11 @@ class spell_item_taunt_flag_targeting : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if([](WorldObject* obj) -> bool
|
||||
{
|
||||
return obj->GetTypeId() != TYPEID_PLAYER && obj->GetTypeId() != TYPEID_CORPSE;
|
||||
});
|
||||
|
||||
if (targets.empty())
|
||||
{
|
||||
FinishCast(SPELL_FAILED_NO_VALID_TARGETS);
|
||||
|
||||
Reference in New Issue
Block a user