Enhance ability selection and display: add toggleable ability handling, improve ability name color coding, and update ability selection messaging

This commit is contained in:
Kam committed 2026-02-15 19:21:30 -05:00
1 parent 45d05b9157
commit ce24c0a4ff
7 files changed
+86 -16

No files matched your search

@@ -317,9 +317,11 @@ public class GuiNPCAbilities extends GuiNPCInterface2 implements IScrollData, IC
// Toggle selected ability on/off
if (id == 77) {
if (selectedAbilityIndex >= 0 && selectedAbilityIndex < npcSlots.size()) {
Ability ability = npcSlots.get(selectedAbilityIndex).getAbility();
AbilitySlot slot = npcSlots.get(selectedAbilityIndex);
Ability ability = slot.getAbility();
if (ability != null) {
ability.setEnabled(((GuiNpcButton) guibutton).getValue() == 1);
boolean enabled = ((GuiNpcButton) guibutton).getValue() == 1;
slot.setEnabled(enabled);
updateNpcAbilitiesList();
selectAbilityByIndex(selectedAbilityIndex);
initGui();