diff --git a/Source/inv.cpp b/Source/inv.cpp index 6f04e6e4a9f..9aff3ff16a2 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -1969,7 +1969,7 @@ void ConsumeStaffCharge(Player &player) return; staff._iCharges--; - CalcPlrStaff(player); + CalcPlrInv(player, false); } bool CanUseStaff(Player &player, SpellID spellId) diff --git a/Source/items.cpp b/Source/items.cpp index 88f83cd54f9..49d78e9a525 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -2892,7 +2892,6 @@ void CalcPlrInv(Player &player, bool loadgfx) item.updateRequiredStatsCacheForPlayer(player); } player.CalcScrolls(); - CalcPlrStaff(player); if (IsStashOpen) { // If stash is open, ensure the items are displayed correctly Stash.RefreshItemStatFlags(); diff --git a/Source/player.cpp b/Source/player.cpp index 2e16cfb8907..b38f0e71df8 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -3059,16 +3059,6 @@ void MakePlrPath(Player &player, Point targetPosition, bool endspace) player.walkpath[path] = WALK_NONE; } -void CalcPlrStaff(Player &player) -{ - player._pISpells = 0; - if (!player.InvBody[INVLOC_HAND_LEFT].isEmpty() - && player.InvBody[INVLOC_HAND_LEFT]._iStatFlag - && player.InvBody[INVLOC_HAND_LEFT]._iCharges > 0) { - player._pISpells |= GetSpellBitmask(player.InvBody[INVLOC_HAND_LEFT]._iSpell); - } -} - void CheckPlrSpell(bool isShiftHeld, SpellID spellID, SpellType spellType) { bool addflag = false; diff --git a/Source/player.h b/Source/player.h index 2a6a1d6b194..fae916f438b 100644 --- a/Source/player.h +++ b/Source/player.h @@ -967,7 +967,6 @@ void ProcessPlayers(); void ClrPlrPath(Player &player); bool PosOkPlayer(const Player &player, Point position); void MakePlrPath(Player &player, Point targetPosition, bool endspace); -void CalcPlrStaff(Player &player); void CheckPlrSpell(bool isShiftHeld, SpellID spellID = MyPlayer->_pRSpell, SpellType spellType = MyPlayer->_pRSplType); void SyncPlrAnim(Player &player); void SyncInitPlrPos(Player &player);