diff --git a/Source/stores.cpp b/Source/stores.cpp index 588eec54595..cc072e0c74d 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -396,15 +396,10 @@ void ScrollSmithBuy(int idx) ScrollVendorStore(SmithItems, static_cast(std::size(SmithItems)), idx); } -uint32_t TotalPlayerGold() -{ - return MyPlayer->_pGold + Stash.gold; -} - // TODO: Change `_iIvalue` to be unsigned instead of passing `int` here. bool PlayerCanAfford(int price) { - return TotalPlayerGold() >= static_cast(price); + return MyPlayer->_pGold >= static_cast(price); } void StartSmithBuy() @@ -2404,7 +2399,7 @@ void DrawSText(const Surface &out) } if (RenderGold) { - PrintSString(out, 28, 1, fmt::format(fmt::runtime(_("Your gold: {:s}")), FormatInteger(TotalPlayerGold())).c_str(), UiFlags::ColorWhitegold | UiFlags::AlignRight); + PrintSString(out, 28, 1, fmt::format(fmt::runtime(_("Your gold: {:s}")), FormatInteger(MyPlayer->_pGold)).c_str(), UiFlags::ColorWhitegold | UiFlags::AlignRight); } if (HasScrollbar)