mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
feat: show quest giver ! and ? indicators in target frame
Reads QuestGiverStatus from the existing npcQuestStatus_ cache and displays a colored badge next to the target's name: ! (gold) — quest available ! (gray) — low-level quest available ? (gold) — quest ready to turn in ? (gray) — quest incomplete / in progress Matches the standard WoW quest indicator convention.
This commit is contained in:
parent
1165aa6e74
commit
d2db0b46ff
1 changed files with 23 additions and 0 deletions
|
|
@ -3315,6 +3315,29 @@ void GameScreen::renderTargetFrame(game::GameHandler& gameHandler) {
|
||||||
ImVec2(ImGui::CalcTextSize(name.c_str()).x, 0));
|
ImVec2(ImGui::CalcTextSize(name.c_str()).x, 0));
|
||||||
ImGui::PopStyleColor(4);
|
ImGui::PopStyleColor(4);
|
||||||
|
|
||||||
|
// Quest giver indicator — "!" for available quests, "?" for completable quests
|
||||||
|
{
|
||||||
|
using QGS = game::QuestGiverStatus;
|
||||||
|
QGS qgs = gameHandler.getQuestGiverStatus(target->getGuid());
|
||||||
|
if (qgs == QGS::AVAILABLE) {
|
||||||
|
ImGui::SameLine(0, 4);
|
||||||
|
ImGui::TextColored(ImVec4(1.0f, 0.85f, 0.0f, 1.0f), "!");
|
||||||
|
if (ImGui::IsItemHovered()) ImGui::SetTooltip("Has a quest available");
|
||||||
|
} else if (qgs == QGS::AVAILABLE_LOW) {
|
||||||
|
ImGui::SameLine(0, 4);
|
||||||
|
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "!");
|
||||||
|
if (ImGui::IsItemHovered()) ImGui::SetTooltip("Has a low-level quest available");
|
||||||
|
} else if (qgs == QGS::REWARD || qgs == QGS::REWARD_REP) {
|
||||||
|
ImGui::SameLine(0, 4);
|
||||||
|
ImGui::TextColored(ImVec4(1.0f, 0.85f, 0.0f, 1.0f), "?");
|
||||||
|
if (ImGui::IsItemHovered()) ImGui::SetTooltip("Quest ready to turn in");
|
||||||
|
} else if (qgs == QGS::INCOMPLETE) {
|
||||||
|
ImGui::SameLine(0, 4);
|
||||||
|
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "?");
|
||||||
|
if (ImGui::IsItemHovered()) ImGui::SetTooltip("Quest incomplete");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Creature subtitle (e.g. "<Warchief of the Horde>", "Captain of the Guard")
|
// Creature subtitle (e.g. "<Warchief of the Horde>", "Captain of the Guard")
|
||||||
if (target->getType() == game::ObjectType::UNIT) {
|
if (target->getType() == game::ObjectType::UNIT) {
|
||||||
auto unit = std::static_pointer_cast<game::Unit>(target);
|
auto unit = std::static_pointer_cast<game::Unit>(target);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue