Core/SAI: remove double calls to SMART_EVENT_RESPAWN for creatures and gameobjects
Port From (https://github.com/TrinityCore/TrinityCore/commit/b902e739d43d1d53819ad636e0900c39ba86d907)
This commit is contained in:
@@ -699,10 +699,7 @@ namespace Game.AI
|
|||||||
mScript.OnInitialize(me);
|
mScript.OnInitialize(me);
|
||||||
|
|
||||||
if (!me.IsDead())
|
if (!me.IsDead())
|
||||||
{
|
|
||||||
GetScript().OnReset();
|
GetScript().OnReset();
|
||||||
GetScript().ProcessEventsFor(SmartEvents.Respawn);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnCharmed(bool apply)
|
public override void OnCharmed(bool apply)
|
||||||
@@ -1021,9 +1018,6 @@ namespace Game.AI
|
|||||||
public override void InitializeAI()
|
public override void InitializeAI()
|
||||||
{
|
{
|
||||||
GetScript().OnInitialize(me);
|
GetScript().OnInitialize(me);
|
||||||
// do not call respawn event if go is not spawned
|
|
||||||
if (me.IsSpawned())
|
|
||||||
GetScript().ProcessEventsFor(SmartEvents.Respawn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user