aboutsummaryrefslogtreecommitdiff
path: root/src/game/TemporarySummon.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-07-22 17:10:30 +0200
committerQAston <none@none>2009-07-22 17:10:30 +0200
commit2ff21d4cefc6c871790676de9461f5bd105bde66 (patch)
tree792e50dfdd0f3dc39624e73cda72633db491ceb0 /src/game/TemporarySummon.cpp
parenta00473d79510f80ae1fd6b4ed882d0e696c22659 (diff)
*Implement Aura Type 247 (SPELL_AURA_CLONE_CASTER) and 279 (SPELL_AURA_INITIALIZE_IMAGES)
*Handle CMSG_GET_MIRRORIMAGE_DATA opcode. *Save Minions follow angle to allow themmoving in a formation *Improvements in SpellAI: correctly evade and select attack target for creatures without threat list *Use SpellAI instead of PetAI for not controllable guardians *Only guardians with SUMMON_TYPE_PET are controllable now *Add script and template data for Mirror Image. *Thanks to Drahy for help. --HG-- branch : trunk
Diffstat (limited to 'src/game/TemporarySummon.cpp')
-rw-r--r--src/game/TemporarySummon.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp
index 3382c794622..8e04bc22c68 100644
--- a/src/game/TemporarySummon.cpp
+++ b/src/game/TemporarySummon.cpp
@@ -265,6 +265,7 @@ Minion::Minion(SummonPropertiesEntry const *properties, Unit *owner) : TempSummo
{
assert(m_owner);
m_summonMask |= SUMMON_MASK_MINION;
+ m_followAngle = PET_FOLLOW_ANGLE;
}
void Minion::InitStats(uint32 duration)
@@ -286,7 +287,7 @@ void Minion::InitSummon()
if(m_owner->GetTypeId() == TYPEID_PLAYER
&& m_owner->GetMinionGUID() == GetGUID()
&& !m_owner->GetCharmGUID())
- ((Player*)m_owner)->CharmSpellInitialize();
+ ((Player*)m_owner)->CharmSpellInitialize();
}
void Minion::RemoveFromWorld()
@@ -302,7 +303,11 @@ Guardian::Guardian(SummonPropertiesEntry const *properties, Unit *owner) : Minio
, m_bonusdamage(0)
{
m_summonMask |= SUMMON_MASK_GUARDIAN;
- InitCharmInfo();
+ if (properties && properties->Type == SUMMON_TYPE_PET)
+ {
+ m_summonMask |= SUMMON_MASK_CONTROLABLE_GUARDIAN;
+ InitCharmInfo();
+ }
}
void Guardian::InitStats(uint32 duration)
@@ -311,7 +316,7 @@ void Guardian::InitStats(uint32 duration)
InitStatsForLevel(m_owner->getLevel());
- if(m_owner->GetTypeId() == TYPEID_PLAYER)
+ if(m_owner->GetTypeId() == TYPEID_PLAYER && HasSummonMask(SUMMON_MASK_CONTROLABLE_GUARDIAN))
m_charmInfo->InitCharmCreateSpells();
SetReactState(REACT_AGGRESSIVE);