From 9926b5c244897ac87b6a872a604b40e0513fb012 Mon Sep 17 00:00:00 2001 From: randy Date: Thu, 6 Mar 2025 21:40:20 -0700 Subject: [PATCH] Fixed autocast bug - Player autocast spell now loads properly on login This was caused by items being unequipped and re-equipped on login to verify that the player meets the requirements to use it. As a consequence of this bugfix, if the requirements for an item change (like a new quest comes out) then the item won't be forcibly unequipped. I can live with that though. --- .../node/entity/player/info/login/LoginConfiguration.java | 4 ++++ 1 file changed, 4 insertions(+) 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 4fcc49823..0f8771092 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 @@ -149,11 +149,15 @@ public final class LoginConfiguration { //We should have already been doing this. //Frankly, I don't even want to imagine the number of bugs us *not* doing this has caused. if (item == null) continue; +//Snowscape: removed the re-equip section, as that cleared the autocast spell on login and I don't care about catching the odd item requirement change. + InteractionListeners.run(item.getId(), player, item, true); +/* player.getEquipment().remove(item); 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()); } +*/ } SpellBookManager.SpellBook currentSpellBook = SpellBookManager.SpellBook.forInterface(player.getSpellBookManager().getSpellBook());