diff --git a/src/games/stendhal/server/maps/quests/AbstractQuest.java b/src/games/stendhal/server/maps/quests/AbstractQuest.java index 232e458fef8..df7885dd277 100644 --- a/src/games/stendhal/server/maps/quests/AbstractQuest.java +++ b/src/games/stendhal/server/maps/quests/AbstractQuest.java @@ -146,8 +146,16 @@ public boolean isCompleted(final Player player) { && player.isQuestCompleted(getSlotName()); } + /** + * Retrieves number of times player has completed quest. + * + * @param player + * Player for whom quest is being checked. + * @return + * Number of completions. + */ @Override - public int getCompletedCount(final Player player) { + public int getCompletions(final Player player) { final String questSlot = getSlotName(); final boolean completed = isCompleted(player); if (player.hasQuest(questSlot)) { @@ -167,6 +175,12 @@ public int getCompletedCount(final Player player) { return completed ? 1 : 0; } + @Deprecated + @Override + public int getCompletedCount(final Player player) { + return getCompletions(player); + } + /** * Retrieves action to execute when completions count should be incremented. * diff --git a/src/games/stendhal/server/maps/quests/IQuest.java b/src/games/stendhal/server/maps/quests/IQuest.java index 21abe224cf8..9bfefaec8d8 100644 --- a/src/games/stendhal/server/maps/quests/IQuest.java +++ b/src/games/stendhal/server/maps/quests/IQuest.java @@ -74,6 +74,17 @@ public interface IQuest { * @return * Number of completions. */ + int getCompletions(Player player); + + /** + * Retrieves number of times player has completed quest. + * + * @param player + * Player for whom quest is being checked. + * @return + * Number of completions. + */ + @Deprecated int getCompletedCount(Player player); /**