aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r--src/game/Object.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index d7ec1c110cc..506acb6b7d8 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -1483,7 +1483,11 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa
((Creature*)this)->AI()->JustSummoned(pCreature);
if(pCreature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER && pCreature->m_spells[0])
+ {
+ if(GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER)
+ pCreature->setFaction(((Unit*)this)->getFaction());
pCreature->CastSpell(pCreature, pCreature->m_spells[0], true, 0, 0, GetGUID());
+ }
//return the creature therewith the summoner has access to it
return pCreature;