From feda8c6988a7925bbe5b3f6f675ee5e630580c13 Mon Sep 17 00:00:00 2001 From: Bishop Date: Sat, 1 Aug 2026 10:22:11 -0500 Subject: [PATCH] Capitalized consts --- .../combat/equipment/WeaponInterface.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Server/src/main/core/game/node/entity/combat/equipment/WeaponInterface.java b/Server/src/main/core/game/node/entity/combat/equipment/WeaponInterface.java index e69802089..87832e062 100644 --- a/Server/src/main/core/game/node/entity/combat/equipment/WeaponInterface.java +++ b/Server/src/main/core/game/node/entity/combat/equipment/WeaponInterface.java @@ -128,12 +128,12 @@ public final class WeaponInterface extends Component { /** * Attribute storing the player's autocast spell for reload upon relog. */ - public static final String attributeAutocastButtonId = "/save:autocast:buttonid"; + public static final String ATTRIBUTE_AUTOCAST_BUTTON_ID = "/save:autocast:buttonid"; /** * Attribute storing the player's autocast combat style for reload upon relog. */ - public static final String attributeAutocastStyle = "/save:autocast:style"; + public static final String ATTRIBUTE_AUTOCAST_STYLE = "/save:autocast:style"; /** * The player. @@ -309,7 +309,7 @@ public final class WeaponInterface extends Component { } } if (current == WeaponInterfaces.STAFF && slot <= 2) { - removeAttributes(player, attributeAutocastButtonId, attributeAutocastStyle); + removeAttributes(player, ATTRIBUTE_AUTOCAST_BUTTON_ID, ATTRIBUTE_AUTOCAST_STYLE); } if (slot < 0 || slot >= current.getAttackStyles().length) { return false; @@ -392,7 +392,7 @@ public final class WeaponInterface extends Component { } } if (forgetAutocast) { - removeAttributes(player, attributeAutocastButtonId, attributeAutocastStyle); + removeAttributes(player, ATTRIBUTE_AUTOCAST_BUTTON_ID, ATTRIBUTE_AUTOCAST_STYLE); } if (buttonId < 0) { player.getProperties().setAutocastSpell(null); @@ -409,8 +409,8 @@ public final class WeaponInterface extends Component { setComponentVisibility(player, Components.WEAPON_STAFF_SEL_90, stdAutocastBookChild, !defensive); current = (CombatSpell) (modern ? SpellBookManager.SpellBook.MODERN.getSpell(data[buttonId]) : SpellBookManager.SpellBook.ANCIENT.getSpell(data[buttonId])); player.getProperties().setAutocastSpell(current); - setAttribute(player, attributeAutocastButtonId, buttonId); - setAttribute(player, attributeAutocastStyle, player.getSettings().getAttackStyleIndex()); + setAttribute(player, ATTRIBUTE_AUTOCAST_BUTTON_ID, buttonId); + setAttribute(player, ATTRIBUTE_AUTOCAST_STYLE, player.getSettings().getAttackStyleIndex()); int configId = configStart + (2 * buttonId); if (modern && player.getEquipment().getNew(3).getName().equalsIgnoreCase("Slayer's staff") || modern && player.getEquipment().getNew(3).getName().equalsIgnoreCase("Void knight mace")) { boolean slayer = player.getEquipment().getNew(3).getName().equalsIgnoreCase("Slayer's staff"); @@ -535,10 +535,10 @@ public final class WeaponInterface extends Component { * Returns false if the player has no autocast to restore, true otherwise. */ public boolean restoreAutocast() { - int buttonID = getAttribute(player, attributeAutocastButtonId, -1); - int style = getAttribute(player, attributeAutocastStyle, -1); + int buttonID = getAttribute(player, ATTRIBUTE_AUTOCAST_BUTTON_ID, -1); + int style = getAttribute(player, ATTRIBUTE_AUTOCAST_STYLE, -1); if (buttonID < 0 || style < 0 || !canAutocast(false)) { - removeAttributes(player, attributeAutocastButtonId, attributeAutocastStyle); + removeAttributes(player, ATTRIBUTE_AUTOCAST_BUTTON_ID, ATTRIBUTE_AUTOCAST_STYLE); return false; } restoreAttackStyle(style);