mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
This commit is contained in:
@@ -18,13 +18,14 @@ struct ScriptedAI;
|
|||||||
|
|
||||||
struct ElunaCreatureAI : ScriptedAI
|
struct ElunaCreatureAI : ScriptedAI
|
||||||
{
|
{
|
||||||
|
// used to delay the spawn hook triggering on AI creation
|
||||||
|
bool justSpawned;
|
||||||
#ifndef TRINITY
|
#ifndef TRINITY
|
||||||
#define me m_creature
|
#define me m_creature
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ElunaCreatureAI(Creature* creature) : ScriptedAI(creature)
|
ElunaCreatureAI(Creature* creature) : ScriptedAI(creature), justSpawned(true)
|
||||||
{
|
{
|
||||||
JustRespawned();
|
|
||||||
}
|
}
|
||||||
~ElunaCreatureAI() { }
|
~ElunaCreatureAI() { }
|
||||||
|
|
||||||
@@ -35,6 +36,9 @@ struct ElunaCreatureAI : ScriptedAI
|
|||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
if (justSpawned)
|
||||||
|
JustRespawned();
|
||||||
|
|
||||||
if (!sEluna->UpdateAI(me, diff))
|
if (!sEluna->UpdateAI(me, diff))
|
||||||
{
|
{
|
||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
|
|||||||
Reference in New Issue
Block a user