diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3140e24e..86297485 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,9 +24,11 @@ jobs: - arch: x86-64 runner: ubuntu-24.04 deb_arch: amd64 + build_jobs: $(nproc) - arch: arm64 runner: ubuntu-24.04-arm deb_arch: arm64 + build_jobs: 2 steps: - name: Checkout @@ -97,19 +99,19 @@ jobs: run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWOWEE_ENABLE_AMD_FSR2=ON - name: Assert AMD FSR2 target - run: cmake --build build --target wowee_fsr2_amd_vk --parallel $(nproc) + run: cmake --build build --target wowee_fsr2_amd_vk --parallel ${{ matrix.build_jobs }} - name: Assert AMD FSR3 framegen probe target (if present) run: | set -euo pipefail if cmake --build build --target help | grep -q 'wowee_fsr3_framegen_amd_vk_probe'; then - cmake --build build --target wowee_fsr3_framegen_amd_vk_probe --parallel $(nproc) + cmake --build build --target wowee_fsr3_framegen_amd_vk_probe --parallel ${{ matrix.build_jobs }} else echo "FSR3 framegen probe target not generated for this SDK layout; continuing." fi - name: Build - run: cmake --build build --parallel $(nproc) + run: cmake --build build --parallel ${{ matrix.build_jobs }} - name: Package (DEB) run: cd build && cpack -G DEB diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 1ef09e8e..6735d0cd 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -5301,6 +5301,44 @@ void GameHandler::acceptBattlefield(uint32_t queueSlot) { if (socialHandler_) socialHandler_->acceptBattlefield(queueSlot); } +// --------------------------------------------------------------------------- +// LFG / Dungeon Finder handlers (WotLK 3.3.5a) +// --------------------------------------------------------------------------- + +static const char* lfgJoinResultString(uint8_t result) { + switch (result) { + case 0: return nullptr; // success + case 1: return "Role check failed."; + case 2: return "No LFG slots available for your group."; + case 3: return "No LFG object found."; + case 4: return "No slots available (player)."; + case 5: return "No slots available (party)."; + case 6: return "Dungeon requirements not met by all members."; + case 7: return "Party members are from different realms."; + case 8: return "Not all members are present."; + case 9: return "Get info timeout."; + case 10: return "Invalid dungeon slot."; + case 11: return "You are marked as a deserter."; + case 12: return "A party member is marked as a deserter."; + case 13: return "You are on a random dungeon cooldown."; + case 14: return "A party member is on a random dungeon cooldown."; + case 16: return "No spec/role available."; + default: return "Cannot join dungeon finder."; + } +} + +static const char* lfgTeleportDeniedString(uint8_t reason) { + switch (reason) { + case 0: return "You are not in a LFG group."; + case 1: return "You are not in the dungeon."; + case 2: return "You have a summon pending."; + case 3: return "You are dead."; + case 4: return "You have Deserter."; + case 5: return "You do not meet the requirements."; + default: return "Teleport to dungeon denied."; + } +} + // --------------------------------------------------------------------------- // LFG outgoing packets // --------------------------------------------------------------------------- diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 81397250..f4cbb833 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -139,6 +139,51 @@ namespace { } return "Unknown"; } + + // Collect all non-comment, non-empty lines from a macro body. + std::vector allMacroCommands(const std::string& macroText) { + std::vector cmds; + size_t pos = 0; + while (pos <= macroText.size()) { + size_t nl = macroText.find('\n', pos); + std::string line = (nl != std::string::npos) ? macroText.substr(pos, nl - pos) : macroText.substr(pos); + if (!line.empty() && line.back() == '\r') line.pop_back(); + size_t start = line.find_first_not_of(" \t"); + if (start != std::string::npos) line = line.substr(start); + if (!line.empty() && line.front() != '#') + cmds.push_back(std::move(line)); + if (nl == std::string::npos) break; + pos = nl + 1; + } + return cmds; + } + + // Returns the #showtooltip argument from a macro body. + std::string getMacroShowtooltipArg(const std::string& macroText) { + size_t pos = 0; + while (pos <= macroText.size()) { + size_t nl = macroText.find('\n', pos); + std::string line = (nl != std::string::npos) ? macroText.substr(pos, nl - pos) : macroText.substr(pos); + if (!line.empty() && line.back() == '\r') line.pop_back(); + size_t fs = line.find_first_not_of(" \t"); + if (fs != std::string::npos) line = line.substr(fs); + if (line.rfind("#showtooltip", 0) == 0 || line.rfind("#show", 0) == 0) { + size_t sp = line.find(' '); + if (sp != std::string::npos) { + std::string arg = line.substr(sp + 1); + size_t as = arg.find_first_not_of(" \t"); + if (as != std::string::npos) arg = arg.substr(as); + size_t ae = arg.find_last_not_of(" \t"); + if (ae != std::string::npos) arg.resize(ae + 1); + if (!arg.empty()) return arg; + } + return "__auto__"; + } + if (nl == std::string::npos) break; + pos = nl + 1; + } + return {}; + } } namespace wowee { namespace ui {