mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Quests: updated quest reward money calculation for 4.4.0
This commit is contained in:
@@ -14456,7 +14456,7 @@ void Player::IncompleteQuest(uint32 quest_id)
|
||||
|
||||
uint32 Player::GetQuestMoneyReward(Quest const* quest) const
|
||||
{
|
||||
return quest->MoneyValue(this) * sWorld->getRate(RATE_MONEY_QUEST);
|
||||
return quest->GetMoneyReward(this) * sWorld->getRate(RATE_MONEY_QUEST);
|
||||
}
|
||||
|
||||
uint32 Player::GetQuestXPReward(Quest const* quest)
|
||||
|
||||
@@ -425,29 +425,14 @@ uint32 Quest::XPValue(Player const* player, uint32 questLevel, int32 unscaledQue
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 Quest::MoneyValue(Player const* player) const
|
||||
uint32 Quest::GetMoneyReward(Player const* player) const
|
||||
{
|
||||
if (QuestMoneyRewardEntry const* money = sQuestMoneyRewardStore.LookupEntry(player->GetQuestLevel(this)))
|
||||
if (QuestMoneyRewardEntry const* money = sQuestMoneyRewardStore.LookupEntry(player ? GetQuestLevelForPlayer(player) : _level))
|
||||
return money->Difficulty[GetRewMoneyDifficulty()] * GetMoneyMultiplier();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 Quest::MaxMoneyValue() const
|
||||
{
|
||||
uint32 value = 0;
|
||||
if (Optional<ContentTuningLevels> questLevels = sDB2Manager.GetContentTuningData(0, 0))
|
||||
if (QuestMoneyRewardEntry const* money = sQuestMoneyRewardStore.LookupEntry(questLevels->MaxLevel))
|
||||
value = money->Difficulty[GetRewMoneyDifficulty()] * GetMoneyMultiplier();
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
uint32 Quest::GetMaxMoneyReward() const
|
||||
{
|
||||
return MaxMoneyValue() * sWorld->getRate(RATE_MONEY_QUEST);
|
||||
}
|
||||
|
||||
Optional<QuestTagType> Quest::GetQuestTag() const
|
||||
{
|
||||
if (QuestInfoEntry const* questInfo = sQuestInfoStore.LookupEntry(GetQuestInfoID()))
|
||||
@@ -664,7 +649,7 @@ WorldPacket Quest::BuildQueryData(LocaleConstant loc, Player* player) const
|
||||
response.Info.RewardXPMultiplier = GetXPMultiplier();
|
||||
|
||||
if (!HasFlag(QUEST_FLAGS_HIDE_REWARD))
|
||||
response.Info.RewardMoney = player ? player->GetQuestMoneyReward(this) : GetMaxMoneyReward();
|
||||
response.Info.RewardMoney = GetMoneyReward(player);
|
||||
|
||||
response.Info.RewardMoneyDifficulty = GetRewMoneyDifficulty();
|
||||
response.Info.RewardMoneyMultiplier = GetMoneyMultiplier();
|
||||
|
||||
@@ -533,9 +533,7 @@ class TC_GAME_API Quest
|
||||
|
||||
uint32 XPValue(Player const* player) const;
|
||||
static uint32 XPValue(Player const* player, uint32 questLevel, int32 unscaledQuestLevel, uint32 xpDifficulty, float xpMultiplier = 1.0f);
|
||||
uint32 MoneyValue(Player const* player) const;
|
||||
uint32 MaxMoneyValue() const;
|
||||
uint32 GetMaxMoneyReward() const;
|
||||
uint32 GetMoneyReward(Player const* player) const;
|
||||
Optional<QuestTagType> GetQuestTag() const;
|
||||
bool IsImportant() const;
|
||||
uint32 GetQuestLevelForPlayer(Player const* player) const;
|
||||
|
||||
Reference in New Issue
Block a user