Core/PacketIO: Adjust pvp title source used in SMSG_PVP_CREDIT to take highest lifetime pvp rank instead of current chosen title
(cherry picked from commit 432d17483e59f22079762453e49e69930065f8d8)
This commit is contained in:
@@ -6698,7 +6698,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, HonorGainS
|
||||
return false;
|
||||
|
||||
ObjectGuid victim_guid;
|
||||
uint32 victim_rank = 0;
|
||||
int32 victim_rank = 0;
|
||||
|
||||
// need call before fields update to have chance move yesterday data to appropriate fields before today data change.
|
||||
UpdateHonorFields();
|
||||
@@ -6729,27 +6729,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, HonorGainS
|
||||
if (v_level <= k_grey)
|
||||
return false;
|
||||
|
||||
// PLAYER_CHOSEN_TITLE VALUES DESCRIPTION
|
||||
// [0] Just name
|
||||
// [1..14] Alliance honor titles and player name
|
||||
// [15..28] Horde honor titles and player name
|
||||
// [29..38] Other title and player name
|
||||
// [39+] Nothing
|
||||
// this is all wrong, should be going off PvpTitle, not PlayerTitle
|
||||
uint32 victim_title = plrVictim->m_playerData->PlayerTitle;
|
||||
// Get Killer titles, CharTitlesEntry::MaskID
|
||||
// Ranks:
|
||||
// title[1..14] -> rank[5..18]
|
||||
// title[15..28] -> rank[5..18]
|
||||
// title[other] -> 0
|
||||
if (victim_title == 0)
|
||||
victim_guid.Clear(); // Don't show HK: <rank> message, only log.
|
||||
else if (victim_title < 15)
|
||||
victim_rank = victim_title + 4;
|
||||
else if (victim_title < 29)
|
||||
victim_rank = victim_title - 14 + 4;
|
||||
else
|
||||
victim_guid.Clear(); // Don't show HK: <rank> message, only log.
|
||||
victim_rank = plrVictim->m_activePlayerData->LifetimeMaxRank;
|
||||
|
||||
honor_f = std::ceil(Trinity::Honor::hk_honor_at_level_f(k_level) * (v_level - k_grey) / (k_level - k_grey));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user