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

Method GetItemCount

src/game_actor.cpp:398–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398int Game_Actor::GetItemCount(int item_id) {
399 int number = 0;
400
401 // quirk: 0 is "no item in slot"
402 // This can be used to count how many slots are empty
403 if (item_id >= 0) {
404 for (int16_t i : GetWholeEquipment()) {
405 if (item_id == i) {
406 ++number;
407 }
408 }
409 }
410
411 return number;
412}
413
414void Game_Actor::FullHeal() {
415 RemoveAllStates();

Callers 15

ItemMethod · 0.45
DrawItemValueMethod · 0.45
UpdateItemMethod · 0.45
DrawItemMethod · 0.45
CheckEnableMethod · 0.45
PopMethod · 0.45
vUpdateMethod · 0.45
DoItemMethod · 0.45
UpdateBuySelectionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected