Skip to content

Commit 53efa85

Browse files
FoereaperNiam5
authored andcommitted
Fix creature AI for master branch
1 parent a35a9fe commit 53efa85

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

ElunaCreatureAI.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,16 @@ struct ElunaCreatureAI : NativeScriptedAI
3232
#if !defined ELUNA_TRINITY
3333
#define me m_creature
3434
#endif
35+
36+
#if defined ELUNA_TRINITY && ELUNA_EXPANSION >= EXP_RETAIL
37+
ElunaCreatureAI(Creature* creature, uint32 scriptId) : NativeScriptedAI(creature, scriptId), justSpawned(true)
38+
{
39+
}
40+
#else
3541
ElunaCreatureAI(Creature* creature) : NativeScriptedAI(creature), justSpawned(true)
3642
{
3743
}
44+
#endif
3845
~ElunaCreatureAI() { }
3946

4047
//Called at World update tick

LuaEngine.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,11 @@ CreatureAI* Eluna::GetAI(Creature* creature)
970970

971971
if (CreatureEBindings->HasBindingsFor(entryKey) ||
972972
CreatureUBindings->HasBindingsFor(uniqueKey))
973+
#if defined ELUNA_TRINITY && ELUNA_EXPANSION >= EXP_RETAIL
974+
return new ElunaCreatureAI(creature, sObjectMgr->GetScriptId("ElunaCreatureAI", false));
975+
#else
973976
return new ElunaCreatureAI(creature);
977+
#endif
974978
}
975979

976980
return NULL;

0 commit comments

Comments
 (0)