oops, now it builds (and a bonus refactor that annoyed me)

# Conflicts:
#	src/server/game/AI/SmartScripts/SmartAI.cpp
#	src/server/game/AI/SmartScripts/SmartAI.h
#	src/server/game/AI/SmartScripts/SmartScript.cpp
#	src/server/game/AI/SmartScripts/SmartScript.h
This commit is contained in:
Treeston authored and Ovahlord committed 2019-04-26 18:56:31 +02:00
1 parent 28b33663e7
commit 1f15fe5096
2 files changed
+21 -28

No files matched your search

+11 -18
View File
@@ -597,16 +597,20 @@ bool SmartAI::AssistPlayerInCombatAgainst(Unit* who)
void SmartAI::InitializeAI()
{
GetScript()->OnInitialize(me);
mDespawnTime = 0;
mDespawnState = 0;
_escortState = SMART_ESCORT_NONE;
me->SetVisible(true);
if (me->GetFaction() != me->GetCreatureTemplate()->faction)
me->RestoreFaction();
if (!me->isDead())
{
GetScript()->ProcessEventsFor(SMART_EVENT_RESPAWN);
GetScript()->OnReset();
}
GetScript()->ProcessEventsFor(SMART_EVENT_RESPAWN);
mFollowGuid.Clear(); // do not reset follower on Reset(), we need it after combat evade
mFollowDist = 0;
mFollowAngle = 0;
@@ -738,17 +742,6 @@ void SmartAI::PassengerBoarded(Unit* who, int8 seatId, bool apply)
GetScript()->ProcessEventsFor(apply ? SMART_EVENT_PASSENGER_BOARDED : SMART_EVENT_PASSENGER_REMOVED, who, uint32(seatId), 0, apply);
}
void SmartAI::InitializeAI()
{
GetScript()->OnInitialize(me);
if (!me->isDead())
{
GetScript()->OnReset();
GetScript()->ProcessEventsFor(SMART_EVENT_RESPAWN);
}
}
void SmartAI::OnCharmed(bool apply)
{
if (apply) // do this before we change charmed state, as charmed state might prevent these things from processing
@@ -928,9 +921,9 @@ void SmartAI::StopFollow(bool complete)
GetScript()->ProcessEventsFor(SMART_EVENT_FOLLOW_COMPLETED, player);
}
void SmartAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker)
void SmartAI::SetTimedActionList(SmartScriptHolder& e, uint32 entry, Unit* invoker)
{
GetScript()->SetScript9(e, entry, invoker);
GetScript()->SetTimedActionList(e, entry, invoker);
}
void SmartAI::OnGameEvent(bool start, uint16 eventId)
@@ -1047,9 +1040,9 @@ void SmartGameObjectAI::SetData(uint32 id, uint32 value, Unit* invoker)
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, invoker, id, value);
}
void SmartGameObjectAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker)
void SmartGameObjectAI::SetTimedActionList(SmartScriptHolder& e, uint32 entry, Unit* invoker)
{
GetScript()->SetScript9(e, entry, invoker);
GetScript()->SetTimedActionList(e, entry, invoker);
}
void SmartGameObjectAI::OnGameEvent(bool start, uint16 eventId)