mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
feat(Core/Player): Split Dungeon Finder quest rates (#9788)
This commit is contained in:
@@ -15379,9 +15379,9 @@ uint16 Player::GetMaxSkillValueForLevel() const
|
||||
return result;
|
||||
}
|
||||
|
||||
float Player::GetQuestRate()
|
||||
float Player::GetQuestRate(bool isDFQuest)
|
||||
{
|
||||
float result = sWorld->getRate(RATE_XP_QUEST);
|
||||
float result = isDFQuest ? sWorld->getRate(RATE_XP_QUEST_DF) : sWorld->getRate(RATE_XP_QUEST);
|
||||
|
||||
sScriptMgr->OnGetQuestRate(this, result);
|
||||
|
||||
|
||||
@@ -1412,7 +1412,7 @@ public:
|
||||
void RemoveRewardedQuest(uint32 questId, bool update = true);
|
||||
void SendQuestUpdate(uint32 questId);
|
||||
QuestGiverStatus GetQuestDialogStatus(Object* questGiver);
|
||||
float GetQuestRate();
|
||||
float GetQuestRate(bool isDFQuest = false);
|
||||
void SetDailyQuestStatus(uint32 quest_id);
|
||||
bool IsDailyQuestDone(uint32 quest_id);
|
||||
void SetWeeklyQuestStatus(uint32 quest_id);
|
||||
|
||||
@@ -726,7 +726,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
|
||||
bool rewarded = IsQuestRewarded(quest_id) && !quest->IsDFQuest();
|
||||
|
||||
// Not give XP in case already completed once repeatable quest
|
||||
uint32 XP = rewarded ? 0 : uint32(quest->XPValue(getLevel()) * GetQuestRate());
|
||||
uint32 XP = rewarded ? 0 : uint32(quest->XPValue(getLevel()) * GetQuestRate(quest->IsDFQuest()));
|
||||
|
||||
// handle SPELL_AURA_MOD_XP_QUEST_PCT auras
|
||||
Unit::AuraEffectList const& ModXPPctAuras = GetAuraEffectsByType(SPELL_AURA_MOD_XP_QUEST_PCT);
|
||||
|
||||
@@ -439,6 +439,7 @@ enum Rates
|
||||
RATE_XP_KILL,
|
||||
RATE_XP_BG_KILL,
|
||||
RATE_XP_QUEST,
|
||||
RATE_XP_QUEST_DF,
|
||||
RATE_XP_EXPLORE,
|
||||
RATE_XP_PET,
|
||||
RATE_XP_PET_NEXT_LEVEL,
|
||||
|
||||
@@ -506,6 +506,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
rate_values[RATE_XP_KILL] = sConfigMgr->GetOption<float>("Rate.XP.Kill", 1.0f);
|
||||
rate_values[RATE_XP_BG_KILL] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKill", 1.0f);
|
||||
rate_values[RATE_XP_QUEST] = sConfigMgr->GetOption<float>("Rate.XP.Quest", 1.0f);
|
||||
rate_values[RATE_XP_QUEST_DF] = sConfigMgr->GetOption<float>("Rate.XP.Quest.DF", 1.0f);
|
||||
rate_values[RATE_XP_EXPLORE] = sConfigMgr->GetOption<float>("Rate.XP.Explore", 1.0f);
|
||||
rate_values[RATE_XP_PET] = sConfigMgr->GetOption<float>("Rate.XP.Pet", 1.0f);
|
||||
rate_values[RATE_XP_PET_NEXT_LEVEL] = sConfigMgr->GetOption<float>("Rate.Pet.LevelXP", 0.05f);
|
||||
|
||||
@@ -2252,13 +2252,15 @@ Rate.Drop.Item.ReferencedAmount = 1
|
||||
# Description: Experience rates (outside battleground)
|
||||
# Default: 1 - (Rate.XP.Kill)
|
||||
# 1 - (Rate.XP.Quest)
|
||||
# 1 - (Rate.XP.Quest.DF) - Dungeon Finder/LFG quests only.
|
||||
# 1 - (Rate.XP.Explore)
|
||||
# 1 - (Rate.XP.Pet)
|
||||
|
||||
Rate.XP.Kill = 1
|
||||
Rate.XP.Quest = 1
|
||||
Rate.XP.Explore = 1
|
||||
Rate.XP.Pet = 1
|
||||
Rate.XP.Kill = 1
|
||||
Rate.XP.Quest = 1
|
||||
Rate.XP.Quest.DF = 1
|
||||
Rate.XP.Explore = 1
|
||||
Rate.XP.Pet = 1
|
||||
|
||||
#
|
||||
# Rate.XP.BattlegroundKill
|
||||
|
||||
Reference in New Issue
Block a user