From 938f068211db720c4e47d9e98f495d7c9db6d2d0 Mon Sep 17 00:00:00 2001 From: Bishop Date: Sat, 1 Aug 2026 10:20:55 -0500 Subject: [PATCH] Fixed issues Player Name found in testing --- .../game/node/entity/combat/equipment/WeaponInterface.java | 5 ++++- .../node/entity/player/info/login/LoginConfiguration.java | 7 ++++++- 2 files changed, 10 insertions(+), 2 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 4716e7939..e69802089 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 @@ -308,6 +308,9 @@ public final class WeaponInterface extends Component { slot = 3; } } + if (current == WeaponInterfaces.STAFF && slot <= 2) { + removeAttributes(player, attributeAutocastButtonId, attributeAutocastStyle); + } if (slot < 0 || slot >= current.getAttackStyles().length) { return false; } @@ -534,7 +537,7 @@ public final class WeaponInterface extends Component { public boolean restoreAutocast() { int buttonID = getAttribute(player, attributeAutocastButtonId, -1); int style = getAttribute(player, attributeAutocastStyle, -1); - if (buttonID < 0 || style < 0 || current != WeaponInterfaces.STAFF || !canAutocast(false)) { + if (buttonID < 0 || style < 0 || !canAutocast(false)) { removeAttributes(player, attributeAutocastButtonId, attributeAutocastStyle); return false; } diff --git a/Server/src/main/core/game/node/entity/player/info/login/LoginConfiguration.java b/Server/src/main/core/game/node/entity/player/info/login/LoginConfiguration.java index e1c4bdbf0..9fdf421cb 100644 --- a/Server/src/main/core/game/node/entity/player/info/login/LoginConfiguration.java +++ b/Server/src/main/core/game/node/entity/player/info/login/LoginConfiguration.java @@ -151,9 +151,14 @@ public final class LoginConfiguration { if (!InteractionListeners.run(item.getId(), player, item, true) || !player.getEquipment().add(item, true, false)) { player.sendMessage(colorize("%RAs you can no longer wear " + item.getName() + ", it has been unequipped.")); addItemOrBank(player, item.getId(), item.getAmount()); + if (equipSlot(item.getId()) == EquipmentSlot.WEAPON) { + // Default to accurate style if weapon frisk failed + WeaponInterface inter = player.getExtension(WeaponInterface.class); + inter.restoreAttackStyle(0); + } } else if (equipSlot(item.getId()) == EquipmentSlot.WEAPON) { - // Put player's weapon style back to how it was before it was re-equipped. WeaponInterface inter = player.getExtension(WeaponInterface.class); + // Put player's weapon style back to how it was before it was re-equipped if (!inter.restoreAutocast()) { inter.restoreAttackStyle(savedAttackStyle); }