feat(Core/SAI): SetData now has invoker (#19296)
* cherry-pick commit (cfc77fd843) * cherry-pick commit (beb333738d) * Move IsSmart function from headerfile Co-authored-by: Treeston <14020072+Treeston@users.noreply.github.com> Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
parent
65870ec1a1
commit
f42ed2efa5
7 changed files with 82 additions and 44 deletions
|
|
@ -962,9 +962,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 /*guid*/, int32 /*id*/)
|
||||
|
|
@ -1232,9 +1232,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::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue