[9506] Add missing AI calls to inform summoner of summon-related events

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-03-03 00:24:34 +01:00
parent 3a5f6ff0fb
commit d775eea9a4
4 changed files with 20 additions and 2 deletions

View file

@ -3859,6 +3859,9 @@ void Spell::DoSummon(SpellEffectIndex eff_idx)
spawnCreature->SavePetToDB(PET_SAVE_AS_CURRENT);
((Player*)m_caster)->PetSpellInitialize();
}
if (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->AI())
((Creature*)m_caster)->AI()->JustSummoned((Creature*)spawnCreature);
}
void Spell::EffectLearnSpell(SpellEffectIndex eff_idx)