@@ -6540,7 +6540,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
65406540 return false;
65416541
65426542 ObjectGuid victim_guid;
6543- uint32 victim_rank = 0;
6543+ int32 victim_rank = 0;
65446544
65456545 // need call before fields update to have chance move yesterday data to appropriate fields before today data change.
65466546 UpdateHonorFields();
@@ -6571,26 +6571,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
65716571 if (v_level <= k_grey)
65726572 return false;
65736573
6574- // PLAYER_CHOSEN_TITLE VALUES DESCRIPTION
6575- // [0] Just name
6576- // [1..14] Alliance honor titles and player name
6577- // [15..28] Horde honor titles and player name
6578- // [29..38] Other title and player name
6579- // [39+] Nothing
6580- uint32 victim_title = victim->GetUInt32Value(PLAYER_CHOSEN_TITLE);
6581- // Get Killer titles, CharTitlesEntry::MaskID
6582- // Ranks:
6583- // title[1..14] -> rank[5..18]
6584- // title[15..28] -> rank[5..18]
6585- // title[other] -> 0
6586- if (victim_title == 0)
6587- victim_guid.Clear(); // Don't show HK: <rank> message, only log.
6588- else if (victim_title < 15)
6589- victim_rank = victim_title + 4;
6590- else if (victim_title < 29)
6591- victim_rank = victim_title - 14 + 4;
6592- else
6593- victim_guid.Clear(); // Don't show HK: <rank> message, only log.
6574+ victim_rank = victim->GetByteValue(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTES_OFFSET_LIFETIME_MAX_PVP_RANK);
65946575
65956576 honor_f = std::ceil(Trinity::Honor::hk_honor_at_level_f(k_level) * (v_level - k_grey) / (k_level - k_grey));
65966577
@@ -6635,7 +6616,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
66356616 WorldPacket data(SMSG_PVP_CREDIT, 4+8+4);
66366617 data << uint32(honor);
66376618 data << victim_guid;
6638- data << uint32 (victim_rank);
6619+ data << int32 (victim_rank);
66396620
66406621 SendDirectMessage(&data);
66416622
0 commit comments