| 777 | } |
| 778 | |
| 779 | Game_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 | |
| 792 | std::pair<int,bool> Game_Party::GetItemIndex(int item_id) const { |
| 793 | auto& ids = data.item_ids; |
nothing calls this directly
no test coverage detected