mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[9506] Add missing AI calls to inform summoner of summon-related events
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
3a5f6ff0fb
commit
d775eea9a4
4 changed files with 20 additions and 2 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include "Player.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "CreatureAI.h"
|
||||
|
||||
Totem::Totem() : Creature(CREATURE_SUBTYPE_TOTEM)
|
||||
{
|
||||
|
|
@ -67,6 +68,9 @@ void Totem::Summon(Unit* owner)
|
|||
|
||||
AIM_Initialize();
|
||||
|
||||
if (owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->AI())
|
||||
((Creature*)owner)->AI()->JustSummoned((Creature*)this);
|
||||
|
||||
// there are some totems, which exist just for their visual appeareance
|
||||
if (!GetSpell())
|
||||
return;
|
||||
|
|
@ -109,6 +113,9 @@ void Totem::UnSummon()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->AI())
|
||||
((Creature*)owner)->AI()->SummonedCreatureDespawn((Creature*)this);
|
||||
}
|
||||
|
||||
AddObjectToRemoveList();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue