feat(Core/Loot): Implement player_loot_template (#9198)

* Also fix AV player loot
This commit is contained in:
Skjalf
2021-11-17 08:07:21 -03:00
committed by GitHub
parent 0c5b307e7d
commit 39425e0c1f
7 changed files with 116 additions and 12 deletions

View File

@@ -7706,15 +7706,7 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
uint32 pLevel = bones->loot.gold;
bones->loot.clear();
// Xinef: For AV Achievement
if (Battleground* bg = GetBattleground())
{
if (bg->GetBgTypeID(true) == BATTLEGROUND_AV)
loot->FillLoot(1, LootTemplates_Creature, this, true);
}
// Xinef: For wintergrasp Quests
else if (GetZoneId() == AREA_WINTERGRASP)
loot->FillLoot(1, LootTemplates_Creature, this, true);
loot->FillLoot(GetTeamId(), LootTemplates_Player, this, true);
// It may need a better formula
// Now it works like this: lvl10: ~6copper, lvl70: ~9silver