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

Method GetHighestLeveledActorWhoCanUse

src/game_party.cpp:779–790  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

777}
778
779Game_Actor* Game_Party::GetHighestLeveledActorWhoCanUse(const lcf::rpg::Item* item) const {
780 Game_Actor* best = nullptr;
781
782 for (auto* actor : GetActors()) {
783 if (actor->CanAct()
784 && actor->IsItemUsable(item->ID)
785 && (best == nullptr || best->GetLevel() < actor->GetLevel())) {
786 best = actor;
787 }
788 }
789 return best;
790}
791
792std::pair<int,bool> Game_Party::GetItemIndex(int item_id) const {
793 auto& ids = data.item_ids;

Callers

nothing calls this directly

Calls 3

CanActMethod · 0.80
GetLevelMethod · 0.80
IsItemUsableMethod · 0.45

Tested by

no test coverage detected