| 95 | } |
| 96 | |
| 97 | bool Window_ShopBuy::CheckEnable(int item_id) { |
| 98 | const lcf::rpg::Item* item = lcf::ReaderUtil::GetElement(lcf::Data::items, item_id); |
| 99 | if (!item) { |
| 100 | return false; |
| 101 | } |
| 102 | |
| 103 | return (item->price <= Main_Data::game_party->GetGold() && |
| 104 | Main_Data::game_party->GetItemCount(item_id) < Main_Data::game_party->GetMaxItemCount(item_id)); |
| 105 | } |
nothing calls this directly
no test coverage detected