mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
fix: correct quest offer reward parser and trade slot trail size
- QuestOfferRewardParser: replace 4-variant heuristic with 0..16 byte prefix scan × fixed/variable arrays (34 candidates total). AzerothCore WotLK 3.3.5a sends uint32 autoFinish + uint32 suggestedPlayers = 8 bytes before emoteCount; old uint8 read caused 3-byte misalignment, producing wrong item IDs and missing icons on quest reward windows. Scoring now strongly favours the 8-byte prefix and exact byte consumption. - Quest reward tooltip: delegate to InventoryScreen::renderItemTooltip() for full stats (armor, DPS, stats, bind type, etc.); show "Loading…" while item data is still fetching instead of showing nothing. - SMSG_TRADE_STATUS_EXTENDED: fix SLOT_TRAIL 49→52 bytes. AC 3.3.5a sends giftCreatorGuid(8) + 6 enchant slots(24) + randPropId(4) + suffixFactor(4) + durability(4) + maxDurability(4) + createPlayedTime(4) = 52 bytes after isWrapped; wrong skip misaligned all subsequent slots.
This commit is contained in:
parent
170ff1597c
commit
568c566e1a
3 changed files with 70 additions and 49 deletions
|
|
@ -7530,15 +7530,16 @@ void GameScreen::renderQuestOfferRewardWindow(game::GameHandler& gameHandler) {
|
|||
return {iconTex, col};
|
||||
};
|
||||
|
||||
// Helper: show item tooltip
|
||||
auto rewardItemTooltip = [&](const game::QuestRewardItem& ri, ImVec4 nameCol) {
|
||||
// Helper: show full item tooltip (reuses InventoryScreen's rich tooltip)
|
||||
auto rewardItemTooltip = [&](const game::QuestRewardItem& ri, ImVec4 /*nameCol*/) {
|
||||
auto* info = gameHandler.getItemInfo(ri.itemId);
|
||||
if (!info || !info->valid) return;
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::TextColored(nameCol, "%s", info->name.c_str());
|
||||
if (!info->description.empty())
|
||||
ImGui::TextWrapped("%s", info->description.c_str());
|
||||
ImGui::EndTooltip();
|
||||
if (!info || !info->valid) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::TextDisabled("Loading item data...");
|
||||
ImGui::EndTooltip();
|
||||
return;
|
||||
}
|
||||
inventoryScreen.renderItemTooltip(*info);
|
||||
};
|
||||
|
||||
if (!quest.choiceRewards.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue