Core/Spells: Bring back workaround removed in cd7060c65a - it's needed for compatibility with some scripts.

This commit is contained in:
QAston
2011-09-27 22:04:26 +02:00
parent 7040ef5877
commit 5f043e6291
+4
View File
@@ -887,6 +887,10 @@ void Unit::CastSpell(SpellCastTargets const& targets, SpellInfo const* spellInfo
if (Unit* owner = GetOwner())
originalCaster=owner->GetGUID();
// TODO: this is a workaround - not needed anymore, but required for some scripts :(
if (!originalCaster && triggeredByAura)
originalCaster = triggeredByAura->GetCasterGUID();
Spell* spell = new Spell(this, spellInfo, triggerFlags, originalCaster);
if (value)