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

Method GetEquippedItemCount

src/game_party.cpp:146–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146int Game_Party::GetEquippedItemCount(int item_id) const {
147 int number = 0;
148 if (item_id >= 0) {
149 for (int i = 0; i < (int) data.party.size(); i++) {
150 Game_Actor* actor = Main_Data::game_actors->GetActor(data.party[i]);
151 number += actor->GetItemCount(item_id);
152 }
153 }
154 return number;
155}
156
157int Game_Party::GetItemTotalCount(int item_id) const {
158 return GetItemCount(item_id) + GetEquippedItemCount(item_id);

Callers 4

ItemMethod · 0.80
AreConditionsMetMethod · 0.80
RefreshMethod · 0.80

Calls 3

sizeMethod · 0.45
GetActorMethod · 0.45
GetItemCountMethod · 0.45

Tested by

no test coverage detected