aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/LootHandler.cpp
diff options
context:
space:
mode:
authorMeji <alvaromegias_46@hotmail.com>2021-09-08 22:07:01 +0200
committerGitHub <noreply@github.com>2021-09-08 22:07:01 +0200
commit0a83f748766c49775d76412d2b98bb9b9dc8c4df (patch)
treec91a91eaf934401238dfaadeb59407ecd043bbb6 /src/server/game/Handlers/LootHandler.cpp
parentf57cf66dac296ba3b3424fe7431f2032c019df94 (diff)
Core/Achievements: Update CriteriaType enum (#26856)
Diffstat (limited to 'src/server/game/Handlers/LootHandler.cpp')
-rw-r--r--src/server/game/Handlers/LootHandler.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index f9074df7fbb..93f0b1947e0 100644
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -135,9 +135,9 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPackets::Loot::LootItem& p
for (AELootResult::ResultValue const& resultValue : aeResult)
{
player->SendNewItem(resultValue.item, resultValue.count, false, false, true);
- player->UpdateCriteria(CRITERIA_TYPE_LOOT_ITEM, resultValue.item->GetEntry(), resultValue.count);
- player->UpdateCriteria(CRITERIA_TYPE_LOOT_TYPE, resultValue.item->GetEntry(), resultValue.count, resultValue.lootType);
- player->UpdateCriteria(CRITERIA_TYPE_LOOT_ANY_ITEM, resultValue.item->GetEntry(), resultValue.count);
+ player->UpdateCriteria(CriteriaType::LootItem, resultValue.item->GetEntry(), resultValue.count);
+ player->UpdateCriteria(CriteriaType::GetLootByType, resultValue.item->GetEntry(), resultValue.count, resultValue.lootType);
+ player->UpdateCriteria(CriteriaType::LootAnyItem, resultValue.item->GetEntry(), resultValue.count);
}
}
}
@@ -229,7 +229,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPackets::Loot::LootMoney& /*packet
uint64 goldMod = CalculatePct(goldPerPlayer, (*i)->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_MONEY_GAIN, 1));
(*i)->ModifyMoney(goldPerPlayer + goldMod);
- (*i)->UpdateCriteria(CRITERIA_TYPE_LOOT_MONEY, goldPerPlayer);
+ (*i)->UpdateCriteria(CriteriaType::MoneyLootedFromCreatures, goldPerPlayer);
WorldPackets::Loot::LootMoneyNotify packet;
packet.Money = goldPerPlayer;
@@ -243,7 +243,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPackets::Loot::LootMoney& /*packet
uint64 goldMod = CalculatePct(loot->gold, player->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_MONEY_GAIN, 1));
player->ModifyMoney(loot->gold + goldMod);
- player->UpdateCriteria(CRITERIA_TYPE_LOOT_MONEY, loot->gold);
+ player->UpdateCriteria(CriteriaType::MoneyLootedFromCreatures, loot->gold);
WorldPackets::Loot::LootMoneyNotify packet;
packet.Money = loot->gold;
@@ -546,9 +546,9 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPackets::Loot::MasterLootItem
for (AELootResult::ResultValue const& resultValue : aeResult)
{
target->SendNewItem(resultValue.item, resultValue.count, false, false, true);
- target->UpdateCriteria(CRITERIA_TYPE_LOOT_ITEM, resultValue.item->GetEntry(), resultValue.count);
- target->UpdateCriteria(CRITERIA_TYPE_LOOT_TYPE, resultValue.item->GetEntry(), resultValue.count, resultValue.lootType);
- target->UpdateCriteria(CRITERIA_TYPE_LOOT_ANY_ITEM, resultValue.item->GetEntry(), resultValue.count);
+ target->UpdateCriteria(CriteriaType::LootItem, resultValue.item->GetEntry(), resultValue.count);
+ target->UpdateCriteria(CriteriaType::GetLootByType, resultValue.item->GetEntry(), resultValue.count, resultValue.lootType);
+ target->UpdateCriteria(CriteriaType::LootAnyItem, resultValue.item->GetEntry(), resultValue.count);
}
}