Skip to content
Closed
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
3 changes: 2 additions & 1 deletion include/action/buy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void action::buy(ENetEvent& event, const std::string& header, const std::string_
});
return;
}
const auto base_items = shouhin.items; // @note keep the store contents for the next purchase
std::vector<short> ids{};
if (shouhin.btn == "basic_splice") // @note source: https://growtopia.fandom.com/wiki/Basic_Splicing_Kit
{
Expand Down Expand Up @@ -132,7 +133,7 @@ void action::buy(ENetEvent& event, const std::string& header, const std::string_
else modify_item_inventory(event, {item.first, item.second});
received.append(std::format("{}, ", raw_name)); // @todo add green text to rare items, or something cool.
}
shouhin.items.clear(); // @todo
shouhin.items = base_items; // @note restore, so packs work on every purchase

send_varlist(event.peer, { "OnStorePurchaseResult", (_tab < 5) ?
std::format(
Expand Down
Loading