Skip to content

Commit

Permalink
Add QuestHelper.getQuestBySlot method
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Oct 12, 2023
1 parent 774af2b commit 7bae7e5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/utilities/QuestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,21 @@ public static boolean isLoaded(final String... slots) {
}
return true;
}

/**
* Retrieves a loaded quest instance.
*
* @param slot
* Quest string identifier.
* @return
* Quest instance or `null` if not loaded.
*/
public static IQuest getQuestBySlot(final String slot) {
for (final IQuest q: getQuestResources()) {
if (q.getSlotName().equals(slot)) {
return q;
}
}
return null;
}
}

0 comments on commit 7bae7e5

Please sign in to comment.