Scripts/SmartAI: Forward invoker to invoked action list actions. Also JustAppeared -> InitializeAI.

# Conflicts:
#	src/server/game/AI/SmartScripts/SmartScript.h
This commit is contained in:
Treeston authored and Ovahlord committed 2019-04-26 18:51:19 +02:00
1 parent 7c025ee803
commit 99a2c24116
2 files changed
+12 -13

No files matched your search

+3 -10
View File
@@ -595,7 +595,7 @@ bool SmartAI::AssistPlayerInCombatAgainst(Unit* who)
return false;
}
void SmartAI::JustAppeared()
void SmartAI::InitializeAI()
{
mDespawnTime = 0;
mDespawnState = 0;
@@ -930,9 +930,7 @@ void SmartAI::StopFollow(bool complete)
void SmartAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker)
{
if (invoker)
GetScript()->mLastInvoker = invoker->GetGUID();
GetScript()->SetScript9(e, entry);
GetScript()->SetScript9(e, entry, invoker);
}
void SmartAI::OnGameEvent(bool start, uint16 eventId)
@@ -994,9 +992,6 @@ void SmartGameObjectAI::InitializeAI()
void SmartGameObjectAI::Reset()
{
// call respawn event on reset
GetScript()->ProcessEventsFor(SMART_EVENT_RESPAWN);
GetScript()->OnReset();
}
@@ -1054,9 +1049,7 @@ void SmartGameObjectAI::SetData(uint32 id, uint32 value, Unit* invoker)
void SmartGameObjectAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker)
{
if (invoker)
GetScript()->mLastInvoker = invoker->GetGUID();
GetScript()->SetScript9(e, entry);
GetScript()->SetScript9(e, entry, invoker);
}
void SmartGameObjectAI::OnGameEvent(bool start, uint16 eventId)