mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
feat: display LFG dungeon name in DungeonFinder UI status banner
Extend the LFGDungeons.dbc name lookup to the Dungeon Finder window UI: - Queued state: "In queue for Culling of Stratholme (1:23)" - Proposal state: "Group found for Halls of Lightning!" - InDungeon state: "In dungeon (Utgarde Pinnacle)" - FinishedDungeon state: "Culling of Stratholme complete" - Proposal accept banner: "A group has been found for <dungeon>!" All states fall back gracefully when DBC name is unavailable.
This commit is contained in:
parent
ed02f5872a
commit
75139aca77
2 changed files with 35 additions and 9 deletions
|
|
@ -1274,6 +1274,7 @@ public:
|
||||||
bool isLfgQueued() const { return lfgState_ == LfgState::Queued; }
|
bool isLfgQueued() const { return lfgState_ == LfgState::Queued; }
|
||||||
bool isLfgInDungeon() const { return lfgState_ == LfgState::InDungeon; }
|
bool isLfgInDungeon() const { return lfgState_ == LfgState::InDungeon; }
|
||||||
uint32_t getLfgDungeonId() const { return lfgDungeonId_; }
|
uint32_t getLfgDungeonId() const { return lfgDungeonId_; }
|
||||||
|
std::string getCurrentLfgDungeonName() const { return getLfgDungeonName(lfgDungeonId_); }
|
||||||
uint32_t getLfgProposalId() const { return lfgProposalId_; }
|
uint32_t getLfgProposalId() const { return lfgProposalId_; }
|
||||||
int32_t getLfgAvgWaitSec() const { return lfgAvgWaitSec_; }
|
int32_t getLfgAvgWaitSec() const { return lfgAvgWaitSec_; }
|
||||||
uint32_t getLfgTimeInQueueMs() const { return lfgTimeInQueueMs_; }
|
uint32_t getLfgTimeInQueueMs() const { return lfgTimeInQueueMs_; }
|
||||||
|
|
|
||||||
|
|
@ -19328,6 +19328,11 @@ void GameScreen::renderDungeonFinderWindow(game::GameHandler& gameHandler) {
|
||||||
uint32_t qMs = gameHandler.getLfgTimeInQueueMs();
|
uint32_t qMs = gameHandler.getLfgTimeInQueueMs();
|
||||||
int qMin = static_cast<int>(qMs / 60000);
|
int qMin = static_cast<int>(qMs / 60000);
|
||||||
int qSec = static_cast<int>((qMs % 60000) / 1000);
|
int qSec = static_cast<int>((qMs % 60000) / 1000);
|
||||||
|
std::string dName = gameHandler.getCurrentLfgDungeonName();
|
||||||
|
if (!dName.empty())
|
||||||
|
ImGui::TextColored(ImVec4(0.3f, 0.9f, 0.3f, 1.0f),
|
||||||
|
"Status: In queue for %s (%d:%02d)", dName.c_str(), qMin, qSec);
|
||||||
|
else
|
||||||
ImGui::TextColored(ImVec4(0.3f, 0.9f, 0.3f, 1.0f), "Status: In queue (%d:%02d)", qMin, qSec);
|
ImGui::TextColored(ImVec4(0.3f, 0.9f, 0.3f, 1.0f), "Status: In queue (%d:%02d)", qMin, qSec);
|
||||||
if (avgSec >= 0) {
|
if (avgSec >= 0) {
|
||||||
int aMin = avgSec / 60;
|
int aMin = avgSec / 60;
|
||||||
|
|
@ -19337,18 +19342,33 @@ void GameScreen::renderDungeonFinderWindow(game::GameHandler& gameHandler) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LfgState::Proposal:
|
case LfgState::Proposal: {
|
||||||
|
std::string dName = gameHandler.getCurrentLfgDungeonName();
|
||||||
|
if (!dName.empty())
|
||||||
|
ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.1f, 1.0f), "Status: Group found for %s!", dName.c_str());
|
||||||
|
else
|
||||||
ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.1f, 1.0f), "Status: Group found!");
|
ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.1f, 1.0f), "Status: Group found!");
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case LfgState::Boot:
|
case LfgState::Boot:
|
||||||
ImGui::TextColored(ImVec4(1.0f, 0.3f, 0.3f, 1.0f), "Status: Vote kick in progress");
|
ImGui::TextColored(ImVec4(1.0f, 0.3f, 0.3f, 1.0f), "Status: Vote kick in progress");
|
||||||
break;
|
break;
|
||||||
case LfgState::InDungeon:
|
case LfgState::InDungeon: {
|
||||||
|
std::string dName = gameHandler.getCurrentLfgDungeonName();
|
||||||
|
if (!dName.empty())
|
||||||
|
ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f), "Status: In dungeon (%s)", dName.c_str());
|
||||||
|
else
|
||||||
ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f), "Status: In dungeon");
|
ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f), "Status: In dungeon");
|
||||||
break;
|
break;
|
||||||
case LfgState::FinishedDungeon:
|
}
|
||||||
|
case LfgState::FinishedDungeon: {
|
||||||
|
std::string dName = gameHandler.getCurrentLfgDungeonName();
|
||||||
|
if (!dName.empty())
|
||||||
|
ImGui::TextColored(ImVec4(0.6f, 1.0f, 0.6f, 1.0f), "Status: %s complete", dName.c_str());
|
||||||
|
else
|
||||||
ImGui::TextColored(ImVec4(0.6f, 1.0f, 0.6f, 1.0f), "Status: Dungeon complete");
|
ImGui::TextColored(ImVec4(0.6f, 1.0f, 0.6f, 1.0f), "Status: Dungeon complete");
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case LfgState::RaidBrowser:
|
case LfgState::RaidBrowser:
|
||||||
ImGui::TextColored(ImVec4(0.8f, 0.6f, 1.0f, 1.0f), "Status: Raid browser");
|
ImGui::TextColored(ImVec4(0.8f, 0.6f, 1.0f, 1.0f), "Status: Raid browser");
|
||||||
break;
|
break;
|
||||||
|
|
@ -19358,6 +19378,11 @@ void GameScreen::renderDungeonFinderWindow(game::GameHandler& gameHandler) {
|
||||||
|
|
||||||
// ---- Proposal accept/decline ----
|
// ---- Proposal accept/decline ----
|
||||||
if (state == LfgState::Proposal) {
|
if (state == LfgState::Proposal) {
|
||||||
|
std::string dName = gameHandler.getCurrentLfgDungeonName();
|
||||||
|
if (!dName.empty())
|
||||||
|
ImGui::TextColored(ImVec4(1.0f, 0.9f, 0.3f, 1.0f),
|
||||||
|
"A group has been found for %s!", dName.c_str());
|
||||||
|
else
|
||||||
ImGui::TextColored(ImVec4(1.0f, 0.9f, 0.3f, 1.0f),
|
ImGui::TextColored(ImVec4(1.0f, 0.9f, 0.3f, 1.0f),
|
||||||
"A group has been found for your dungeon!");
|
"A group has been found for your dungeon!");
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue