mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
feat(Core/Scripting): Implement hook OnAfterCalculateLootGroupAmount() (#17456)
Add hook 'OnAfterCalculateLootGroupAmount' to GlobalScript, similar to existing hook 'OnAfterRefCount'. Allows for dynamic modification of the group loot rate
This commit is contained in:
@@ -55,6 +55,14 @@ void ScriptMgr::OnAfterRefCount(Player const* player, Loot& loot, bool canRate,
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnAfterCalculateLootGroupAmount(Player const* player, Loot& loot, uint16 lootMode, uint32& groupAmount, LootStore const& store)
|
||||
{
|
||||
ExecuteScript<GlobalScript>([&](GlobalScript* script)
|
||||
{
|
||||
script->OnAfterCalculateLootGroupAmount(player, loot, lootMode, groupAmount, store);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnBeforeDropAddItem(Player const* player, Loot& loot, bool canRate, uint16 lootMode, LootStoreItem* LootStoreItem, LootStore const& store)
|
||||
{
|
||||
ExecuteScript<GlobalScript>([&](GlobalScript* script)
|
||||
|
||||
Reference in New Issue
Block a user