diff --git a/src/game/CreatureAI.h b/src/game/CreatureAI.h index c6734548d..ee2bfa27d 100644 --- a/src/game/CreatureAI.h +++ b/src/game/CreatureAI.h @@ -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*/) {} diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 5706aa45e..9ca474775 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -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*/) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 3a06b4d95..8bc164ab5 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11417" + #define REVISION_NR "11418" #endif // __REVISION_NR_H__