mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[11418] Add CreatureAI call JustSummoned version for GameObject*
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
9aaa8069e2
commit
df1376b14b
3 changed files with 10 additions and 1 deletions
|
|
@ -106,6 +106,9 @@ class MANGOS_DLL_SPEC CreatureAI
|
||||||
// Called when the creature summon successfully other creature
|
// Called when the creature summon successfully other creature
|
||||||
virtual void JustSummoned(Creature* ) {}
|
virtual void JustSummoned(Creature* ) {}
|
||||||
|
|
||||||
|
// Called when the creature summon successfully a gameobject
|
||||||
|
virtual void JustSummoned(GameObject* ) {}
|
||||||
|
|
||||||
// Called when the creature summon despawn
|
// Called when the creature summon despawn
|
||||||
virtual void SummonedCreatureDespawn(Creature* /*unit*/) {}
|
virtual void SummonedCreatureDespawn(Creature* /*unit*/) {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6156,6 +6156,9 @@ void Spell::EffectSummonObjectWild(SpellEffectIndex eff_idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
pGameObj->SummonLinkedTrapIfAny();
|
pGameObj->SummonLinkedTrapIfAny();
|
||||||
|
|
||||||
|
if (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->AI())
|
||||||
|
((Creature*)m_caster)->AI()->JustSummoned(pGameObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
|
void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
|
||||||
|
|
@ -8696,6 +8699,9 @@ void Spell::EffectTransmitted(SpellEffectIndex eff_idx)
|
||||||
cMap->Add(pGameObj);
|
cMap->Add(pGameObj);
|
||||||
|
|
||||||
pGameObj->SummonLinkedTrapIfAny();
|
pGameObj->SummonLinkedTrapIfAny();
|
||||||
|
|
||||||
|
if (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->AI())
|
||||||
|
((Creature*)m_caster)->AI()->JustSummoned(pGameObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::EffectProspecting(SpellEffectIndex /*eff_idx*/)
|
void Spell::EffectProspecting(SpellEffectIndex /*eff_idx*/)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11417"
|
#define REVISION_NR "11418"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue