Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CalcPlrStaff() #7468

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/inv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1969,7 +1969,7 @@ void ConsumeStaffCharge(Player &player)
return;

staff._iCharges--;
CalcPlrStaff(player);
CalcPlrInv(player, false);
}

bool CanUseStaff(Player &player, SpellID spellId)
Expand Down
1 change: 0 additions & 1 deletion Source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 0 additions & 10 deletions Source/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion Source/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading