More hooks for Scripts/Modules (#270)

This commit is contained in:
3ndos
2016-12-07 03:12:01 -05:00
committed by Francesco Borzì
parent 440b7e731f
commit b7ee1a9f12
8 changed files with 255 additions and 14 deletions

View File

@@ -15501,6 +15501,8 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
{
Item* item = StoreNewItem(dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId));
SendNewItem(item, quest->RewardChoiceItemCount[reward], true, false);
sScriptMgr->OnQuestRewardItem(this, item, quest->RewardChoiceItemCount[reward]);
}
else
problematicItems.push_back(std::pair<uint32, uint32>(itemId, quest->RewardChoiceItemCount[reward]));
@@ -15518,6 +15520,8 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
{
Item* item = StoreNewItem(dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId));
SendNewItem(item, quest->RewardItemIdCount[i], true, false);
sScriptMgr->OnQuestRewardItem(this, item, quest->RewardItemIdCount[i]);
}
else
problematicItems.push_back(std::pair<uint32, uint32>(itemId, quest->RewardItemIdCount[i]));
@@ -24743,6 +24747,8 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot)
// LootItem is being removed (looted) from the container, delete it from the DB.
if (loot->containerId > 0)
sLootItemStorage->RemoveStoredLootItem(loot->containerId, item->itemid, item->count);
sScriptMgr->OnLootItem(this, newitem, item->count, this->GetLootGUID());
}
else
SendEquipError(msg, NULL, NULL, item->itemid);