MCPcopy Create free account
hub / github.com/EasyRPG/Player / UpdateSellSelection

Method UpdateSellSelection

src/scene_shop.cpp:281–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281void Scene_Shop::UpdateSellSelection() {
282 if (Input::IsTriggered(Input::CANCEL)) {
283 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Cancel));
284 if (allow_buy) {
285 SetMode(BuySellLeave2);
286 } else {
287 Scene::Pop();
288 }
289 } else if (Input::IsTriggered(Input::DECISION)) {
290 const lcf::rpg::Item* item = sell_window->GetItem();
291 int item_id = (item != nullptr) ? item->ID : 0;
292 status_window->SetItemId(item_id);
293 party_window->SetItemId(item_id);
294
295 if (item && item->price > 0) {
296 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Decision));
297 number_window->SetData(item->ID, Main_Data::game_party->GetItemCount(item->ID), item->price / 2);
298 SetMode(SellHowMany);
299 } else {
300 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Buzzer));
301 }
302 }
303}
304
305void Scene_Shop::UpdateNumberInput() {
306 if (Input::IsTriggered(Input::CANCEL)) {

Callers

nothing calls this directly

Calls 5

SePlayMethod · 0.80
GetItemMethod · 0.45
SetItemIdMethod · 0.45
SetDataMethod · 0.45
GetItemCountMethod · 0.45

Tested by

no test coverage detected