From d0f351db1216c3edd110b8bd48417aa166a1d7f9 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 23 Mar 2022 20:12:24 +0100 Subject: [PATCH] Fix splitting gold --- Source/control.cpp | 9 +++------ Source/control.h | 2 -- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Source/control.cpp b/Source/control.cpp index c4634413a..4a08420bd 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -369,7 +369,10 @@ void RemoveGold(Player &player, int goldIndex) SetPlrHandGoldCurs(player.InvList[gi]); else player.RemoveInvItem(gi); + MakeGoldStack(player.HoldItem, dropGoldValue); + NewCursor(player.HoldItem._iCurs + CURSOR_FIRSTITEM); + player._pGold = CalculateGold(player); dropGoldValue = 0; } @@ -394,12 +397,6 @@ bool IsLevelUpButtonVisible() } // namespace -void ControlSetGoldCurs(Item &goldItem) -{ - SetPlrHandGoldCurs(goldItem); - NewCursor(goldItem._iCurs + CURSOR_FIRSTITEM); -} - void CalculatePanelAreas() { MainPanel = { diff --git a/Source/control.h b/Source/control.h index 293edda2d..721c5d5a3 100644 --- a/Source/control.h +++ b/Source/control.h @@ -68,8 +68,6 @@ inline bool CanPanelsCoverView() { return GetScreenWidth() <= PANEL_WIDTH && GetScreenHeight() <= SPANEL_HEIGHT + PANEL_HEIGHT; } -void ControlSetGoldCurs(Item &goldItem); - void DrawSpellList(const Surface &out); void SetSpell(); void SetSpeedSpell(int slot);