Package com.prineside.tdi2.managers
Class DailyQuestManager
java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.DailyQuestManager
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Manager
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
Nested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T>
-
Field Summary
Modifier and TypeFieldDescriptioncom.badlogic.gdx.utils.Array<DailyQuestManager.DailyLootDayConfig>
int
int
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Получает с сервера название сегодняшнего уровня Сервер может вернуть status FAILED, если игра не последней версии, в таком случае применяется локальный алгоритм Если уровень берется первый раз за день, id его пройденных квестов сбрасываютсяint
int
int
int
int
getDailyQuestHash
(int questId) Local, internal or nullvoid
getDailyQuestHashFromServer
(int id, ObjectConsumer<String> retriever) void
getLeaderboards
(String boardDate, ObjectConsumer<DailyQuestManager.DailyQuestLeaderboards> retriever) int
boolean
void
loadAndStoreDailyQuestFromServer
(int questId, ObjectConsumer<BasicLevel> retriever) void
removeLoadedDailyQuestMapIfMd5HashDiffers
(int questId, String hash) void
setLastCompletedDailyQuestTimestamp
(int timestamp) void
setup()
Вызывается, когда объекты всех менеджеров созданы и можно к ним обращатьсяvoid
Methods inherited from class com.prineside.tdi2.Manager.ManagerAdapter
clearPools, dispose, postRender, preRender, test
-
Field Details
-
LEVEL_NAME_PREFIX
- See Also:
-
RESET_QUESTS_QUEST_ID
- See Also:
-
dailyLootMinBonusPerMonth
public int dailyLootMinBonusPerMonth -
dailyLootMaxBonusPerMonth
public int dailyLootMaxBonusPerMonth -
dailyLootDayConfigs
-
-
Constructor Details
-
DailyQuestManager
public DailyQuestManager()
-
-
Method Details
-
getDailyLootCurrentDayIndex
public int getDailyLootCurrentDayIndex() -
getDailyLootCurrentMonthIndex
public int getDailyLootCurrentMonthIndex() -
getDailyLootNextDaysInRowMilestone
public int getDailyLootNextDaysInRowMilestone() -
getDailyLootNextDaysInRowLegendariesCount
public int getDailyLootNextDaysInRowLegendariesCount() -
getDailyLootCurrentQuest
-
getDailyLootDaysInRow
public int getDailyLootDaysInRow() -
getSecondsTillNextDailyLoot
public int getSecondsTillNextDailyLoot() -
isTodayDailyLootQuestCompleted
public boolean isTodayDailyLootQuestCompleted() -
setDailyLootQuestCompleted
- Returns:
- IssuedItems или null
-
setup
public void setup()Description copied from interface:Manager
Вызывается, когда объекты всех менеджеров созданы и можно к ним обращаться- Specified by:
setup
in interfaceManager
- Overrides:
setup
in classManager.ManagerAdapter
-
getCurrentDayDate
-
getNextDayDate
-
getDailyQuestLevelCache
-
getDailyQuestHashFromServer
-
getCurrentDayLevel
Получает с сервера название сегодняшнего уровня Сервер может вернуть status FAILED, если игра не последней версии, в таком случае применяется локальный алгоритм Если уровень берется первый раз за день, id его пройденных квестов сбрасываются -
getDailyQuestHash
Local, internal or null -
removeLoadedDailyQuestMapIfMd5HashDiffers
-
loadAndStoreDailyQuestFromServer
- Parameters:
retriever
- может получить null в случае ошибки
-
setLastCompletedDailyQuestTimestamp
public void setLastCompletedDailyQuestTimestamp(int timestamp) -
startDailyLevel
public void startDailyLevel() -
getLeaderboards
public void getLeaderboards(String boardDate, ObjectConsumer<DailyQuestManager.DailyQuestLeaderboards> retriever)
-