mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: correct Eye of the Storm bgTypeId and simplify BG invite popup
Eye of the Storm uses bgTypeId 7 (from BattlemasterList.dbc), not 6. BG invite popup now uses the stored bgName from the queue slot instead of re-deriving the name with a duplicate switch statement.
This commit is contained in:
parent
64fd7eddf8
commit
5d5083683f
3 changed files with 5 additions and 17 deletions
|
|
@ -453,6 +453,7 @@ public:
|
||||||
uint32_t avgWaitTimeSec = 0; // server-estimated average wait (STATUS_WAIT_QUEUE)
|
uint32_t avgWaitTimeSec = 0; // server-estimated average wait (STATUS_WAIT_QUEUE)
|
||||||
uint32_t timeInQueueSec = 0; // time already spent in queue (STATUS_WAIT_QUEUE)
|
uint32_t timeInQueueSec = 0; // time already spent in queue (STATUS_WAIT_QUEUE)
|
||||||
std::chrono::steady_clock::time_point inviteReceivedTime{};
|
std::chrono::steady_clock::time_point inviteReceivedTime{};
|
||||||
|
std::string bgName; // human-readable BG/arena name
|
||||||
};
|
};
|
||||||
|
|
||||||
// Available BG list (populated by SMSG_BATTLEFIELD_LIST)
|
// Available BG list (populated by SMSG_BATTLEFIELD_LIST)
|
||||||
|
|
|
||||||
|
|
@ -16119,7 +16119,7 @@ void GameHandler::handleBattlefieldStatus(network::Packet& packet) {
|
||||||
{1, "Alterac Valley"},
|
{1, "Alterac Valley"},
|
||||||
{2, "Warsong Gulch"},
|
{2, "Warsong Gulch"},
|
||||||
{3, "Arathi Basin"},
|
{3, "Arathi Basin"},
|
||||||
{6, "Eye of the Storm"},
|
{7, "Eye of the Storm"},
|
||||||
{9, "Strand of the Ancients"},
|
{9, "Strand of the Ancients"},
|
||||||
{11, "Isle of Conquest"},
|
{11, "Isle of Conquest"},
|
||||||
{30, "Nagrand Arena"},
|
{30, "Nagrand Arena"},
|
||||||
|
|
@ -16177,6 +16177,7 @@ void GameHandler::handleBattlefieldStatus(network::Packet& packet) {
|
||||||
bgQueues_[queueSlot].bgTypeId = bgTypeId;
|
bgQueues_[queueSlot].bgTypeId = bgTypeId;
|
||||||
bgQueues_[queueSlot].arenaType = arenaType;
|
bgQueues_[queueSlot].arenaType = arenaType;
|
||||||
bgQueues_[queueSlot].statusId = statusId;
|
bgQueues_[queueSlot].statusId = statusId;
|
||||||
|
bgQueues_[queueSlot].bgName = bgName;
|
||||||
if (statusId == 1) {
|
if (statusId == 1) {
|
||||||
bgQueues_[queueSlot].avgWaitTimeSec = avgWaitSec;
|
bgQueues_[queueSlot].avgWaitTimeSec = avgWaitSec;
|
||||||
bgQueues_[queueSlot].timeInQueueSec = timeInQueueSec;
|
bgQueues_[queueSlot].timeInQueueSec = timeInQueueSec;
|
||||||
|
|
|
||||||
|
|
@ -13730,22 +13730,8 @@ void GameScreen::renderBgInvitePopup(game::GameHandler& gameHandler) {
|
||||||
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse;
|
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse;
|
||||||
|
|
||||||
if (ImGui::Begin("Battleground Ready!", nullptr, popupFlags)) {
|
if (ImGui::Begin("Battleground Ready!", nullptr, popupFlags)) {
|
||||||
// BG name
|
// BG name from stored queue data
|
||||||
std::string bgName;
|
std::string bgName = slot->bgName.empty() ? "Battleground" : slot->bgName;
|
||||||
if (slot->arenaType > 0) {
|
|
||||||
bgName = std::to_string(slot->arenaType) + "v" + std::to_string(slot->arenaType) + " Arena";
|
|
||||||
} else {
|
|
||||||
switch (slot->bgTypeId) {
|
|
||||||
case 1: bgName = "Alterac Valley"; break;
|
|
||||||
case 2: bgName = "Warsong Gulch"; break;
|
|
||||||
case 3: bgName = "Arathi Basin"; break;
|
|
||||||
case 7: bgName = "Eye of the Storm"; break;
|
|
||||||
case 9: bgName = "Strand of the Ancients"; break;
|
|
||||||
case 11: bgName = "Isle of Conquest"; break;
|
|
||||||
default: bgName = "Battleground"; break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::TextColored(ImVec4(1.0f, 0.85f, 0.2f, 1.0f), "%s", bgName.c_str());
|
ImGui::TextColored(ImVec4(1.0f, 0.85f, 0.2f, 1.0f), "%s", bgName.c_str());
|
||||||
ImGui::TextWrapped("A spot has opened! You have %d seconds to enter.", static_cast<int>(remaining));
|
ImGui::TextWrapped("A spot has opened! You have %d seconds to enter.", static_cast<int>(remaining));
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue