mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
refactor(Scripts/Commands): Update cs_quest to the new model (#9267)
This commit is contained in:
@@ -736,7 +736,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(this) * GetQuestRate());
|
||||
uint32 XP = rewarded ? 0 : uint32(quest->XPValue(getLevel()) * GetQuestRate());
|
||||
|
||||
// handle SPELL_AURA_MOD_XP_QUEST_PCT auras
|
||||
Unit::AuraEffectList const& ModXPPctAuras = GetAuraEffectsByType(SPELL_AURA_MOD_XP_QUEST_PCT);
|
||||
@@ -754,7 +754,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
|
||||
}
|
||||
|
||||
// Give player extra money if GetRewOrReqMoney > 0 and get ReqMoney if negative
|
||||
if (int32 rewOrReqMoney = quest->GetRewOrReqMoney(this))
|
||||
if (int32 rewOrReqMoney = quest->GetRewOrReqMoney(getLevel()))
|
||||
{
|
||||
moneyRew += rewOrReqMoney;
|
||||
}
|
||||
@@ -2292,12 +2292,12 @@ void Player::SendQuestReward(Quest const* quest, uint32 XP)
|
||||
if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
{
|
||||
data << uint32(XP);
|
||||
data << uint32(quest->GetRewOrReqMoney(this));
|
||||
data << uint32(quest->GetRewOrReqMoney(getLevel()));
|
||||
}
|
||||
else
|
||||
{
|
||||
data << uint32(0);
|
||||
data << uint32(quest->GetRewOrReqMoney(this) + quest->GetRewMoneyMaxLevel());
|
||||
data << uint32(quest->GetRewOrReqMoney(getLevel()) + quest->GetRewMoneyMaxLevel());
|
||||
}
|
||||
|
||||
data << uint32(10 * quest->CalculateHonorGain(GetQuestLevel(quest)));
|
||||
|
||||
Reference in New Issue
Block a user