Skip to content

Commit

Permalink
Remove stash gold sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 committed Oct 7, 2024
1 parent baaa906 commit fb67f48
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Source/stores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,15 +396,10 @@ void ScrollSmithBuy(int idx)
ScrollVendorStore(SmithItems, static_cast<int>(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<uint32_t>(price);
return MyPlayer->_pGold >= static_cast<uint32_t>(price);

Check warning on line 402 in Source/stores.cpp

View workflow job for this annotation

GitHub Actions / build

'>=': signed/unsigned mismatch
}

void StartSmithBuy()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fb67f48

Please sign in to comment.