perf: eliminate per-frame heap allocs in M2 renderer; UI polish and report
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run

M2 renderer: move 3 per-frame local containers to member variables:
- particleGroups_ (unordered_map): reuse bucket structure across frames
- ribbonDraws_ (vector): reuse draw call buffer
- shadowTexSetCache_ (unordered_map): reuse descriptor cache
Eliminates ~3 heap allocations per frame in particle/ribbon/shadow passes.

UI polish:
- Nameplate hover tooltip showing level, class (players), guild name
- Bag window titles show slot counts: "Backpack (12/16)"

Player report: CMSG_COMPLAIN packet builder and reportPlayer() method.
"Report Player" option in target frame right-click menu for other players.
Server response handler (SMSG_COMPLAIN_RESULT) was already implemented.
This commit is contained in:
Kelsi 2026-03-27 18:21:47 -07:00
parent dee90d2951
commit 2af3594ce8
8 changed files with 117 additions and 44 deletions

View file

@ -4271,6 +4271,8 @@ void GameScreen::renderTargetFrame(game::GameHandler& gameHandler) {
gameHandler.addFriend(name);
if (ImGui::MenuItem("Ignore"))
gameHandler.addIgnore(name);
if (ImGui::MenuItem("Report Player"))
gameHandler.reportPlayer(tGuid, "Reported via UI");
}
ImGui::Separator();
if (ImGui::BeginMenu("Set Raid Mark")) {
@ -12181,6 +12183,17 @@ void GameScreen::renderNameplates(game::GameHandler& gameHandler) {
if (mouse.x >= nx0 && mouse.x <= nx1 && mouse.y >= ny0 && mouse.y <= ny1) {
// Track mouseover for [target=mouseover] macro conditionals
gameHandler.setMouseoverGuid(guid);
// Hover tooltip: name, level/class, guild
ImGui::BeginTooltip();
ImGui::TextUnformatted(unitName.c_str());
if (isPlayer) {
uint8_t cid = entityClassId(unit);
ImGui::Text("Level %u %s", level, classNameStr(cid));
} else if (level > 0) {
ImGui::Text("Level %u", level);
}
if (!subLabel.empty()) ImGui::TextColored(ImVec4(0.7f,0.7f,0.7f,1.0f), "%s", subLabel.c_str());
ImGui::EndTooltip();
if (ImGui::IsMouseClicked(ImGuiMouseButton_Left)) {
gameHandler.setTarget(guid);
} else if (ImGui::IsMouseClicked(ImGuiMouseButton_Right)) {