Core/Spells: rework part 5: GameObject casting

This commit is contained in:
ariel- authored and Ovahlord committed 2022-09-12 09:15:14 +02:00
1 parent c901772640
commit b6fac86b71
43 files changed
+2638 -2337

No files matched your search

+2 -2
View File
@@ -1045,9 +1045,9 @@ void SmartGameObjectAI::QuestReward(Player* player, Quest const* quest, uint32 o
}
// Called when the gameobject is destroyed (destructible buildings only).
void SmartGameObjectAI::Destroyed(Player* player, uint32 eventId)
void SmartGameObjectAI::Destroyed(WorldObject* attacker, uint32 eventId)
{
GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, player, eventId, 0, false, nullptr, me);
GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, attacker ? attacker->ToUnit() : nullptr, eventId, 0, false, nullptr, me);
}
void SmartGameObjectAI::SetData(uint32 id, uint32 value, Unit* invoker)