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:
Walter Pagani
2023-06-24 08:23:23 -03:00
committed by GitHub
parent bf8ba6898f
commit 7f9cdda17b
4 changed files with 65 additions and 1 deletions

View File

@@ -13442,7 +13442,10 @@ LootItem* Player::StoreLootItem(uint8 lootSlot, Loot* loot, InventoryResult& msg
LootItem* item = loot->LootItemInSlot(lootSlot, this, &qitem, &ffaitem, &conditem);
if (!item || item->is_looted)
{
SendEquipError(EQUIP_ERR_ALREADY_LOOTED, nullptr, nullptr);
if (!sScriptMgr->CanSendErrorAlreadyLooted(this))
{
SendEquipError(EQUIP_ERR_ALREADY_LOOTED, nullptr, nullptr);
}
return nullptr;
}