Add quest opcodes, fix gossip select packet, and NPC combat animations

Fix CMSG_GOSSIP_SELECT_OPTION missing menuId field (was causing
ByteBufferException). Add 12 quest opcodes and clickable quest items in
gossip dialog. NPC attack/death animation callbacks now work for both
single-player and server-spawned creatures, and SMSG_ATTACKERSTATEUPDATE
triggers NPC swing animations.
This commit is contained in:
Kelsi 2026-02-06 11:45:35 -08:00
parent a20dc947e2
commit 8b98888dd2
7 changed files with 84 additions and 8 deletions

View file

@ -1608,7 +1608,15 @@ void GameScreen::renderGossipWindow(game::GameHandler& gameHandler) {
ImGui::Separator();
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.3f, 1.0f), "Quests:");
for (const auto& quest : gossip.quests) {
ImGui::BulletText("[%d] %s", quest.questLevel, quest.title.c_str());
ImGui::PushID(static_cast<int>(quest.questId));
char qlabel[256];
snprintf(qlabel, sizeof(qlabel), "[%d] %s", quest.questLevel, quest.title.c_str());
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 0.3f, 1.0f));
if (ImGui::Selectable(qlabel)) {
gameHandler.selectGossipQuest(quest.questId);
}
ImGui::PopStyleColor();
ImGui::PopID();
}
}