@@ -6567,7 +6567,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
65676567 return false;
65686568
65696569 ObjectGuid victim_guid;
6570- uint32 victim_rank = 0;
6570+ int32 victim_rank = 0;
65716571
65726572 // need call before fields update to have chance move yesterday data to appropriate fields before today data change.
65736573 UpdateHonorFields();
@@ -6598,26 +6598,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
65986598 if (v_level <= k_grey)
65996599 return false;
66006600
6601- // PLAYER_CHOSEN_TITLE VALUES DESCRIPTION
6602- // [0] Just name
6603- // [1..14] Alliance honor titles and player name
6604- // [15..28] Horde honor titles and player name
6605- // [29..38] Other title and player name
6606- // [39+] Nothing
6607- uint32 victim_title = victim->GetUInt32Value(PLAYER_CHOSEN_TITLE);
6608- // Get Killer titles, CharTitlesEntry::MaskID
6609- // Ranks:
6610- // title[1..14] -> rank[5..18]
6611- // title[15..28] -> rank[5..18]
6612- // title[other] -> 0
6613- if (victim_title == 0)
6614- victim_guid.Clear(); // Don't show HK: <rank> message, only log.
6615- else if (victim_title < 15)
6616- victim_rank = victim_title + 4;
6617- else if (victim_title < 29)
6618- victim_rank = victim_title - 14 + 4;
6619- else
6620- victim_guid.Clear(); // Don't show HK: <rank> message, only log.
6601+ victim_rank = victim->GetByteValue(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTES_OFFSET_LIFETIME_MAX_PVP_RANK);
66216602
66226603 honor_f = std::ceil(Trinity::Honor::hk_honor_at_level_f(k_level) * (v_level - k_grey) / (k_level - k_grey));
66236604
@@ -6662,7 +6643,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
66626643 WorldPacket data(SMSG_PVP_CREDIT, 4+8+4);
66636644 data << uint32(honor);
66646645 data << victim_guid;
6665- data << uint32 (victim_rank);
6646+ data << int32 (victim_rank);
66666647
66676648 SendDirectMessage(&data);
66686649
0 commit comments