[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

@ -156,9 +156,8 @@ void TemporarySummon::Summon(TempSummonType type, uint32 lifetime)
m_timer = lifetime;
m_lifetime = lifetime;
GetMap()->Add((Creature*)this);
AIM_Initialize();
GetMap()->Add((Creature*)this);
}
void TemporarySummon::UnSummon()

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);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10443"
#define REVISION_NR "10444"
#endif // __REVISION_NR_H__