diff options
Diffstat (limited to 'src/game/SpellEffects.cpp')
| -rw-r--r-- | src/game/SpellEffects.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index bfa14d9cebb..9ac2d4f2ded 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4073,12 +4073,12 @@ void Spell::EffectSummonPet(uint32 i) NewSummon->setPetType(SUMMON_PET); uint32 faction = m_caster->getFaction(); - if(m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->isTotem()) + if(m_caster->GetTypeId() == TYPEID_UNIT) { - Unit* owner = ((Totem*)m_caster)->GetOwner(); - if(owner) - faction = owner->getFaction(); - NewSummon->GetCharmInfo()->SetReactState(REACT_AGGRESSIVE); + if ( ((Creature*)m_caster)->isTotem() ) + NewSummon->GetCharmInfo()->SetReactState(REACT_AGGRESSIVE); + else + NewSummon->GetCharmInfo()->SetReactState(REACT_DEFENSIVE); } NewSummon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_caster->GetGUID()); |
