diff options
| author | megamage <none@none> | 2009-03-07 14:06:09 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-07 14:06:09 -0600 |
| commit | 42d681eecdd668b9d53c93acf0e205047458a781 (patch) | |
| tree | 1234761775e1d927345020dfd424aab2556afa51 /src | |
| parent | 520ce96257a07c0ad07a652e01a3927af0f48f6f (diff) | |
*Fix some spells without target info sent to server.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Spell.cpp | 7 | ||||
| -rw-r--r-- | src/game/SpellMgr.cpp | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 6d34d29b644..77fbf5e3380 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -408,6 +408,13 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi } } + if(!m_targets.getUnitTargetGUID() && m_spellInfo->Targets & TARGET_FLAG_UNIT) + { + if(Unit *target = ObjectAccessor::GetUnit(*m_caster, m_caster->GetUInt64Value(UNIT_FIELD_TARGET))) + if(IsValidSingleTargetSpell(target)) + m_targets.setUnitTarget(target); + } + CleanupTargetList(); } diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 9bd7c31e951..83d978a720f 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2250,6 +2250,14 @@ void SpellMgr::LoadSpellCustomAttr() spellInfo->Effect[j] = SPELL_EFFECT_TRIGGER_MISSILE; break; } + + switch(SpellTargetType[spellInfo->EffectImplicitTargetA[j]]) + { + case TARGET_TYPE_UNIT_TARGET: + case TARGET_TYPE_DEST_TARGET: + spellInfo->Targets |= TARGET_FLAG_UNIT; + break; + } } if(spellInfo->SpellVisual[0] == 3879) |
