mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[10719] Implement proper calculation quest honor reward.
Now server side rewar same as reported at client side. Also thanks to KiriX for patch prepering to commit and testing. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
c9dacb9940
commit
ff66e20468
8 changed files with 37 additions and 4 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#include "QuestDef.h"
|
||||
#include "Player.h"
|
||||
#include "World.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
Quest::Quest(Field * questRecord)
|
||||
{
|
||||
|
|
@ -271,3 +272,23 @@ bool Quest::IsAllowedInRaid() const
|
|||
|
||||
return sWorld.getConfig(CONFIG_BOOL_QUEST_IGNORE_RAID);
|
||||
}
|
||||
|
||||
uint32 Quest::CalculateRewardHonor(uint32 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...
|
||||
TeamContributionPoints const* tc = sTeamContributionPoints.LookupEntry(level-1);
|
||||
if(!tc)
|
||||
return 0;
|
||||
uint32 i_honor = uint32(tc->Value * GetRewHonorMultiplier() * 0.1000000014901161);
|
||||
honor = i_honor + GetRewHonorAddition();
|
||||
}
|
||||
|
||||
return honor;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue