Core/Quests: Implemented proper calculation of quest honor reward using DBC
Signed-off-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
1 parent
82b7f30271
commit
c006f1b904
7 files changed
+34
-6
No files matched your search
@@ -212,3 +212,23 @@ bool Quest::IsAllowedInRaid() const
|
||||
|
||||
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_RAID);
|
||||
}
|
||||
|
||||
uint32 Quest::CalculateHonorGain(uint8 level) const
|
||||
{
|
||||
if (level > GT_MAX_LEVEL)
|
||||
level = GT_MAX_LEVEL;
|
||||
|
||||
uint32 honor = 0;
|
||||
|
||||
if (GetRewHonorAddition() > 0 || GetRewHonorMultiplier() > 0.0f)
|
||||
{
|
||||
// values stored from 0.. for 1...
|
||||
TeamContributionPointsEntry const* tc = sTeamContributionPointsStore.LookupEntry(level-1);
|
||||
if (!tc)
|
||||
return 0;
|
||||
honor = uint32(tc->value * GetRewHonorMultiplier() * 0.1000000014901161);
|
||||
honor += GetRewHonorAddition();
|
||||
}
|
||||
|
||||
return honor;
|
||||
}
|
||||
Reference in new issue
Block a user