v3.0.0: re-assigning the same quick cast spell now clears it

This commit is contained in:
Evan Debenham
2024-12-20 12:24:03 -05:00
parent 7b92da1895
commit cbe3c64716
@@ -213,11 +213,18 @@ public class HolyTome extends Artifact {
private ClericSpell quickSpell = null; private ClericSpell quickSpell = null;
public void setQuickSpell(ClericSpell spell){ public void setQuickSpell(ClericSpell spell){
if (quickSpell == spell){
quickSpell = null; //re-assigning the same spell clears the quick spell
if (passiveBuff != null){
ActionIndicator.clearAction((ActionIndicator.Action) passiveBuff);
}
} else {
quickSpell = spell; quickSpell = spell;
if (passiveBuff != null){ if (passiveBuff != null){
ActionIndicator.setAction((ActionIndicator.Action) passiveBuff); ActionIndicator.setAction((ActionIndicator.Action) passiveBuff);
} }
} }
}
private static final String QUICK_CLS = "quick_cls"; private static final String QUICK_CLS = "quick_cls";