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

Method GetItemIndex

src/game_party.cpp:792–796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790}
791
792std::pair<int,bool> Game_Party::GetItemIndex(int item_id) const {
793 auto& ids = data.item_ids;
794 auto iter = std::lower_bound(ids.begin(), ids.end(), item_id);
795 return std::make_pair<int,bool>(iter - ids.begin(), (iter != ids.end() && *iter == item_id));
796}

Callers 1

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected