mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-27 05:23:51 +00:00
feat: debuff dispel-type border coloring in buff bar
Read DispelType from Spell.dbc (new field in all expansion DBC layouts) and use it to color debuff icon borders: magic=blue, curse=purple, disease=brown, poison=green, other=red. Buffs remain green-bordered. Adds getSpellDispelType() to GameHandler for lazy cache lookup.
This commit is contained in:
parent
9a21e19486
commit
d817e4144c
7 changed files with 45 additions and 7 deletions
|
|
@ -9503,7 +9503,22 @@ void GameScreen::renderBuffBar(game::GameHandler& gameHandler) {
|
|||
|
||||
ImGui::PushID(static_cast<int>(i) + (pass * 256));
|
||||
|
||||
ImVec4 borderColor = isBuff ? ImVec4(0.2f, 0.8f, 0.2f, 0.9f) : ImVec4(0.8f, 0.2f, 0.2f, 0.9f);
|
||||
// Determine border color: buffs = green; debuffs use WoW dispel-type colors
|
||||
ImVec4 borderColor;
|
||||
if (isBuff) {
|
||||
borderColor = ImVec4(0.2f, 0.8f, 0.2f, 0.9f); // green
|
||||
} else {
|
||||
// Debuff: color by dispel type (0=none/red, 1=magic/blue, 2=curse/purple,
|
||||
// 3=disease/brown, 4=poison/green, other=dark-red)
|
||||
uint8_t dt = gameHandler.getSpellDispelType(aura.spellId);
|
||||
switch (dt) {
|
||||
case 1: borderColor = ImVec4(0.15f, 0.50f, 1.00f, 0.9f); break; // magic: blue
|
||||
case 2: borderColor = ImVec4(0.70f, 0.20f, 0.90f, 0.9f); break; // curse: purple
|
||||
case 3: borderColor = ImVec4(0.55f, 0.30f, 0.10f, 0.9f); break; // disease: brown
|
||||
case 4: borderColor = ImVec4(0.10f, 0.70f, 0.10f, 0.9f); break; // poison: green
|
||||
default: borderColor = ImVec4(0.80f, 0.20f, 0.20f, 0.9f); break; // other: red
|
||||
}
|
||||
}
|
||||
|
||||
// Try to get spell icon
|
||||
VkDescriptorSet iconTex = VK_NULL_HANDLE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue