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

Method CheckEnable

src/window_item.cpp:50–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50bool Window_Item::CheckEnable(int item_id) {
51 auto* item = lcf::ReaderUtil::GetElement(lcf::Data::items, item_id);
52 if (!item) {
53 return false;
54 }
55 if (item->type == lcf::rpg::Item::Type_medicine
56 && (!Game_Battle::IsBattleRunning() || !item->occasion_field1)) {
57 return true;
58 }
59 return Main_Data::game_party->IsItemUsable(item_id, actor);
60}
61
62void Window_Item::Refresh() {
63 std::vector<int> party_items;

Callers 5

vUpdateMethod · 0.45
vUpdateMethod · 0.45
ItemSelectedMethod · 0.45
SkillSelectedMethod · 0.45
UpdateBuySelectionMethod · 0.45

Calls 1

IsItemUsableMethod · 0.45

Tested by

no test coverage detected