mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-02-05 09:42:39 +01:00
Read Open States from Excels (#1557)
* Make sure we never access PlayerOpenStateManager::map directly. * Read OpenStates from excels. * Add defaultState * Replace hardcoded open states with the ones read from excels. * Don't send change notify when unlocking on login. * Add open state blacklist for default unlocks. * Add a way to temporarily set open states for dev * Remove old OpenState.java * Fix UnlockAllCommand * Change condType to an enum.
This commit is contained in:
@@ -435,8 +435,8 @@ public class Player {
|
||||
this.updateWorldLevel();
|
||||
this.updateProfile();
|
||||
|
||||
// Handle OpenState unlocks from level-up.
|
||||
this.getOpenStateManager().unlockLevelDependentStates();
|
||||
// Handle open state unlocks from level-up.
|
||||
this.getOpenStateManager().tryUnlockOpenStates();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1342,9 +1342,6 @@ public class Player {
|
||||
this.forgingManager.sendForgeDataNotify();
|
||||
this.resinManager.onPlayerLogin();
|
||||
this.cookingManager.sendCookDataNofity();
|
||||
|
||||
// Unlock in case this is an existing user that reached a level before we implemented unlocking.
|
||||
this.getOpenStateManager().unlockLevelDependentStates();
|
||||
this.getOpenStateManager().onPlayerLogin();
|
||||
|
||||
getTodayMoonCard(); // The timer works at 0:0, some users log in after that, use this method to check if they have received a reward today or not. If not, send the reward.
|
||||
|
||||
Reference in New Issue
Block a user