*Fix some spells without target info sent to server.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-07 14:06:09 -06:00
parent 520ce96257
commit 42d681eecd
2 changed files with 15 additions and 0 deletions
+7
View File
@@ -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(); CleanupTargetList();
} }
+8
View File
@@ -2250,6 +2250,14 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->Effect[j] = SPELL_EFFECT_TRIGGER_MISSILE; spellInfo->Effect[j] = SPELL_EFFECT_TRIGGER_MISSILE;
break; 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) if(spellInfo->SpellVisual[0] == 3879)