diff options
author | QAston <none@none> | 2009-07-22 17:10:30 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-22 17:10:30 +0200 |
commit | 2ff21d4cefc6c871790676de9461f5bd105bde66 (patch) | |
tree | 792e50dfdd0f3dc39624e73cda72633db491ceb0 /src/game/SpellEffects.cpp | |
parent | a00473d79510f80ae1fd6b4ed882d0e696c22659 (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/SpellEffects.cpp')
-rw-r--r-- | src/game/SpellEffects.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index e750f4fc7b0..f8821cc8217 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3280,6 +3280,9 @@ void Spell::EffectSummonType(uint32 i) switch(properties->Category) { default: + if (properties->Flags & 512) + SummonGuardian(entry, properties); + break; switch(properties->Type) { case SUMMON_TYPE_PET: @@ -3363,7 +3366,7 @@ void Spell::EffectSummonType(uint32 i) TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; TempSummon * summon = m_originalCaster->SummonCreature(entry,px,py,pz,m_caster->GetOrientation(),summonType,duration); - summon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCaster->GetGUID()); + summon->SetUInt64Value(UNIT_FIELD_SUMONEDBY, m_originalCaster->GetGUID()); if (properties->Category == SUMMON_CATEGORY_ALLY) summon->setFaction(m_originalCaster->getFaction()); } @@ -4556,6 +4559,15 @@ void Spell::EffectScriptEffect(uint32 effIndex) { switch(m_spellInfo->Id) { + case 45204: // Clone Me! + case 41055: // Copy Weapon + case 45206: // Copy Off-hand Weapon + unitTarget->CastSpell(m_caster, damage, false); + break; + case 45205: // Copy Offhand Weapon + case 41054: // Copy Weapon + m_caster->CastSpell(unitTarget, damage, false); + break; // Despawn Horse case 52267: { @@ -6695,6 +6707,8 @@ void Spell::SummonGuardian(uint32 entry, SummonPropertiesEntry const *properties ((Guardian*)summon)->InitStatsForLevel(level); summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id); + if(summon->HasSummonMask(SUMMON_MASK_MINION) && m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION) + ((Minion*)summon)->SetFollowAngle(m_caster->GetAngle(summon)); summon->AI()->EnterEvadeMode(); } |