@@ -6650,7 +6650,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
66506650 return false;
66516651
66526652 ObjectGuid victim_guid;
6653- uint32 victim_rank = 0;
6653+ int32 victim_rank = 0;
66546654
66556655 // need call before fields update to have chance move yesterday data to appropriate fields before today data change.
66566656 UpdateHonorFields();
@@ -6681,26 +6681,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
66816681 if (v_level <= k_grey)
66826682 return false;
66836683
6684- // PLAYER_CHOSEN_TITLE VALUES DESCRIPTION
6685- // [0] Just name
6686- // [1..14] Alliance honor titles and player name
6687- // [15..28] Horde honor titles and player name
6688- // [29..38] Other title and player name
6689- // [39+] Nothing
6690- uint32 victim_title = victim->GetUInt32Value(PLAYER_CHOSEN_TITLE);
6691- // Get Killer titles, CharTitlesEntry::MaskID
6692- // Ranks:
6693- // title[1..14] -> rank[5..18]
6694- // title[15..28] -> rank[5..18]
6695- // title[other] -> 0
6696- if (victim_title == 0)
6697- victim_guid.Clear(); // Don't show HK: <rank> message, only log.
6698- else if (victim_title < 15)
6699- victim_rank = victim_title + 4;
6700- else if (victim_title < 29)
6701- victim_rank = victim_title - 14 + 4;
6702- else
6703- victim_guid.Clear(); // Don't show HK: <rank> message, only log.
6684+ victim_rank = victim->GetByteValue(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTES_OFFSET_LIFETIME_MAX_PVP_RANK);
67046685
67056686 honor_f = std::ceil(Trinity::Honor::hk_honor_at_level_f(k_level) * (v_level - k_grey) / (k_level - k_grey));
67066687
@@ -6788,7 +6769,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
67886769 WorldPacket data(SMSG_PVP_CREDIT, 4+8+4);
67896770 data << uint32(honor);
67906771 data << victim_guid;
6791- data << uint32 (victim_rank);
6772+ data << int32 (victim_rank);
67926773
67936774 SendDirectMessage(&data);
67946775
0 commit comments