chore(Core/ScriptMgr): Hooks used in mod-aoe-loot (#16589)
* Creating the necessary hooks for the loot aoe * update hook * Typing error * Method name and add documentation * codestyle * Misc. fixes
This commit is contained in:
parent
bf8ba6898f
commit
7f9cdda17b
4 changed files with 65 additions and 1 deletions
|
|
@ -93,6 +93,8 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
|
|||
loot = &creature->loot;
|
||||
}
|
||||
|
||||
sScriptMgr->OnAfterCreatureLoot(player);
|
||||
|
||||
InventoryResult msg;
|
||||
LootItem* lootItem = player->StoreLootItem(lootSlot, loot, msg);
|
||||
if (msg != EQUIP_ERR_OK && lguid.IsItem() && loot->loot_type != LOOT_CORPSE)
|
||||
|
|
@ -209,6 +211,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
|
|||
}
|
||||
else
|
||||
{
|
||||
sScriptMgr->OnAfterCreatureLootMoney(player);
|
||||
player->ModifyMoney(loot->gold);
|
||||
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, loot->gold);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue