[10444] Fixed scripted AI init for TemporarySummon/Totem summon code

Call AIM_Initialize before adding to map instead after calling.
This make this call order similar other cases.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
KiriX 2010-09-05 03:55:44 +04:00 committed by VladimirMangos
parent e621af3b97
commit 6e6936c321
3 changed files with 3 additions and 5 deletions

View file

@ -53,9 +53,8 @@ void Totem::Update( uint32 time )
void Totem::Summon(Unit* owner)
{
owner->GetMap()->Add((Creature*)this);
AIM_Initialize();
owner->GetMap()->Add((Creature*)this);
if (owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->AI())
((Creature*)owner)->AI()->JustSummoned((Creature*)this);