Commit 7189e370 authored by Melledy's avatar Melledy
Browse files

Use `getOpenStateMap()` in PlayerOpenStateManager

parent f87088f4
......@@ -33,7 +33,7 @@ public class PlayerOpenStateManager extends BasePlayerDataManager {
public static final Set<OpenState> DEV_OPEN_STATES = Stream.of(OpenState.values())
.filter(s -> s != OpenState.OPEN_STATE_NONE && s.getUnlockLevel() <= 1)
.collect(Collectors.toSet());
public PlayerOpenStateManager(Player player) {
super(player);
}
......@@ -44,11 +44,11 @@ public class PlayerOpenStateManager extends BasePlayerDataManager {
}
public int getOpenState(OpenState openState) {
return this.map.getOrDefault(openState.getValue(), 0);
return getOpenStateMap().getOrDefault(openState.getValue(), 0);
}
public void setOpenState(OpenState openState, Integer value) {
Integer previousValue = this.map.getOrDefault(openState.getValue(),0);
Integer previousValue = getOpenStateMap().getOrDefault(openState.getValue(),0);
if (value != previousValue) {
this.map.put(openState.getValue(), value);
player.getSession().send(new PacketOpenStateChangeNotify(openState.getValue(),value));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment