[11290] Add dummy aura effect of spell 62109

Also add a smaller hack to have access to m_caster later (see code comments)

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-03-26 10:53:20 +01:00
parent 40d87bfabf
commit 23af82081b
3 changed files with 11 additions and 2 deletions

View file

@ -2149,7 +2149,12 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
// Sleeping Sleep
unitTarget->CastSpell(unitTarget, 62248, true);
unitTarget->setFaction(190); // Ambient (neutral)
// Although not really correct, it's needed to have access to m_caster later,
// to properly process spell 62110 (cast from gossip).
// Can possibly be replaced with a similar function that doesn't set any dynamic flags.
((Creature*)unitTarget)->SetLootRecipient(m_caster);
unitTarget->setFaction(190); // Ambient (neutral)
unitTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
return;
}