aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-10-02 22:15:09 -0300
committerjoschiwald <joschiwald.trinity@gmail.com>2017-03-05 01:06:41 +0100
commit6c099d0c26286558c8fbafdc7aba131159b369d8 (patch)
treed10f6d4df4d056ad8eafc7c6636a29ed897afaf3 /src
parent44d48c80ee076dfed754dcf9a025890335a20841 (diff)
Core/Spells: Flag of Ownership shouldn't target creatures
(cherry picked from commit b54042d68f5204758f641f9ddbd0218e773c2ae5)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_item.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 4e699034780..a19a4e09b17 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -3165,6 +3165,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);