mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: apply skull-red color and "Lv ??" to level-0 mobs in focus frame
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Consistent with the target frame fix: focus targets with level 0 (unknown/?? mobs) now show skull-red instead of grey, and display "Lv ??" instead of "Lv 0".
This commit is contained in:
parent
39f4162ec1
commit
5513c4aad5
1 changed files with 19 additions and 12 deletions
|
|
@ -4344,6 +4344,9 @@ void GameScreen::renderFocusFrame(game::GameHandler& gameHandler) {
|
|||
} else if (u->isHostile()) {
|
||||
uint32_t playerLv = gameHandler.getPlayerLevel();
|
||||
uint32_t mobLv = u->getLevel();
|
||||
if (mobLv == 0) {
|
||||
focusColor = ImVec4(1.0f, 0.1f, 0.1f, 1.0f); // ?? level = skull red
|
||||
} else {
|
||||
int32_t diff = static_cast<int32_t>(mobLv) - static_cast<int32_t>(playerLv);
|
||||
if (game::GameHandler::killXp(playerLv, mobLv) == 0)
|
||||
focusColor = ImVec4(0.6f, 0.6f, 0.6f, 1.0f);
|
||||
|
|
@ -4355,6 +4358,7 @@ void GameScreen::renderFocusFrame(game::GameHandler& gameHandler) {
|
|||
focusColor = ImVec4(1.0f, 1.0f, 0.1f, 1.0f);
|
||||
else
|
||||
focusColor = ImVec4(0.3f, 1.0f, 0.3f, 1.0f);
|
||||
}
|
||||
} else {
|
||||
focusColor = ImVec4(0.3f, 1.0f, 0.3f, 1.0f);
|
||||
}
|
||||
|
|
@ -4487,6 +4491,9 @@ void GameScreen::renderFocusFrame(game::GameHandler& gameHandler) {
|
|||
|
||||
// Level + health on same row
|
||||
ImGui::SameLine();
|
||||
if (unit->getLevel() == 0)
|
||||
ImGui::TextDisabled("Lv ??");
|
||||
else
|
||||
ImGui::TextDisabled("Lv %u", unit->getLevel());
|
||||
|
||||
uint32_t hp = unit->getHealth();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue