mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Unit: rename several getters to follow codestyle
uint8 GetLevel()
uint8 GetLevelForTarget(WorldObject const* /*target*/)
void SetLevel(uint8 lvl)
uint8 GetRace()
uint32 GetRaceMask()
uint8 GetClass()
uint32 GetClassMask()
uint8 GetGender()
(cherry picked from commit 5c09ff51f7)
This commit is contained in:
@@ -284,14 +284,14 @@ uint32 Quest::XPValue(Player const* player) const
|
||||
if (!questXp || _rewardXPDifficulty >= 10)
|
||||
return 0;
|
||||
|
||||
int32 diffFactor = 2 * (questLevel - player->getLevel()) + 12;
|
||||
int32 diffFactor = 2 * (questLevel - player->GetLevel()) + 12;
|
||||
if (diffFactor < 1)
|
||||
diffFactor = 1;
|
||||
else if (diffFactor > 10)
|
||||
diffFactor = 10;
|
||||
|
||||
uint32 xp = diffFactor * questXp->Difficulty[_rewardXPDifficulty] * _rewardXPMultiplier / 10;
|
||||
if (player->getLevel() >= GetMaxLevelForExpansion(CURRENT_EXPANSION - 1) && player->GetSession()->GetExpansion() == CURRENT_EXPANSION && _expansion < CURRENT_EXPANSION)
|
||||
if (player->GetLevel() >= GetMaxLevelForExpansion(CURRENT_EXPANSION - 1) && player->GetSession()->GetExpansion() == CURRENT_EXPANSION && _expansion < CURRENT_EXPANSION)
|
||||
xp = uint32(xp / 9.0f);
|
||||
|
||||
xp = RoundXPValue(xp);
|
||||
|
||||
Reference in New Issue
Block a user