[11418] Add CreatureAI call JustSummoned version for GameObject*

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-05-02 10:17:36 +02:00
parent 9aaa8069e2
commit df1376b14b
3 changed files with 10 additions and 1 deletions

View file

@ -106,6 +106,9 @@ class MANGOS_DLL_SPEC CreatureAI
// Called when the creature summon successfully other creature
virtual void JustSummoned(Creature* ) {}
// Called when the creature summon successfully a gameobject
virtual void JustSummoned(GameObject* ) {}
// Called when the creature summon despawn
virtual void SummonedCreatureDespawn(Creature* /*unit*/) {}

View file

@ -6156,6 +6156,9 @@ void Spell::EffectSummonObjectWild(SpellEffectIndex eff_idx)
}
pGameObj->SummonLinkedTrapIfAny();
if (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->AI())
((Creature*)m_caster)->AI()->JustSummoned(pGameObj);
}
void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
@ -8696,6 +8699,9 @@ void Spell::EffectTransmitted(SpellEffectIndex eff_idx)
cMap->Add(pGameObj);
pGameObj->SummonLinkedTrapIfAny();
if (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->AI())
((Creature*)m_caster)->AI()->JustSummoned(pGameObj);
}
void Spell::EffectProspecting(SpellEffectIndex /*eff_idx*/)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11417"
#define REVISION_NR "11418"
#endif // __REVISION_NR_H__