mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04:00
Scripts/SmartAI: SetData now has an invoker (if the setting is done by something using SmartAI).
Also, some refactors. SMARTAI IS SUCH A FUCKING CLUSTERFUCK I SWEAR.
This commit is contained in:
@@ -692,9 +692,9 @@ uint32 SmartAI::GetData(uint32 /*id*/) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SmartAI::SetData(uint32 id, uint32 value)
|
||||
void SmartAI::SetData(uint32 id, uint32 value, Unit* invoker)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, nullptr, id, value);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, invoker, id, value);
|
||||
}
|
||||
|
||||
void SmartAI::SetGUID(ObjectGuid const& /*guid*/, int32 /*id*/) { }
|
||||
@@ -1028,9 +1028,9 @@ void SmartGameObjectAI::Destroyed(Player* player, uint32 eventId)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, player, eventId, 0, false, nullptr, me);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::SetData(uint32 id, uint32 value)
|
||||
void SmartGameObjectAI::SetData(uint32 id, uint32 value, Unit* invoker)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, nullptr, id, value);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, invoker, id, value);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::SetTimedActionList(SmartScriptHolder& e, uint32 entry, Unit* invoker)
|
||||
|
||||
Reference in New Issue
Block a user