Commit cdc23a06 authored by Melledy's avatar Melledy
Browse files

Random cleanups in the gameserver and player

parent a16bc721
...@@ -177,7 +177,7 @@ public class BattlePassManager { ...@@ -177,7 +177,7 @@ public class BattlePassManager {
// Take reward // Take reward
if (mission.getStatus() == BattlePassMissionStatus.MISSION_STATUS_FINISHED) { if (mission.getStatus() == BattlePassMissionStatus.MISSION_STATUS_FINISHED) {
this.addPointsDirectly(mission.getData().getAddPoint(), mission.getData().getRefreshType() == BattlePassMissionRefreshType.BATTLE_PASS_MISSION_REFRESH_CYCLE_CROSS_SCHEDULE); this.addPointsDirectly(mission.getData().getAddPoint(), mission.getData().isCycleRefresh());
mission.setStatus(BattlePassMissionStatus.MISSION_STATUS_POINT_TAKEN); mission.setStatus(BattlePassMissionStatus.MISSION_STATUS_POINT_TAKEN);
updatedMissions.add(mission); updatedMissions.add(mission);
......
...@@ -1483,10 +1483,6 @@ public class Player { ...@@ -1483,10 +1483,6 @@ public class Player {
// Call quit event. // Call quit event.
PlayerQuitEvent event = new PlayerQuitEvent(this); event.call(); PlayerQuitEvent event = new PlayerQuitEvent(this); event.call();
//reset wood
getDeforestationManager().resetWood();
}catch (Throwable e){ }catch (Throwable e){
e.printStackTrace(); e.printStackTrace();
Grasscutter.getLogger().warn("Player (UID {}) save failure", getUid()); Grasscutter.getLogger().warn("Player (UID {}) save failure", getUid());
......
...@@ -52,20 +52,19 @@ public final class GameServer extends KcpServer { ...@@ -52,20 +52,19 @@ public final class GameServer extends KcpServer {
private final Set<World> worlds; private final Set<World> worlds;
private ChatManagerHandler chatManager; private ChatManagerHandler chatManager;
private final InventoryManager inventoryManager; @Getter private final InventoryManager inventoryManager;
private final GachaManager gachaManager; @Getter private final GachaManager gachaManager;
private final ShopManager shopManager; @Getter private final ShopManager shopManager;
private final MultiplayerManager multiplayerManager; @Getter private final MultiplayerManager multiplayerManager;
private final DungeonManager dungeonManager; @Getter private final DungeonManager dungeonManager;
private final ExpeditionManager expeditionManager; @Getter private final ExpeditionManager expeditionManager;
private final CommandMap commandMap; @Getter private final CommandMap commandMap;
private final TaskMap taskMap; @Getter private final TaskMap taskMap;
private final DropManager dropManager; @Getter private final DropManager dropManager;
private final WorldDataManager worldDataManager; @Getter private final WorldDataManager worldDataManager;
private final BattlePassMissionManager battlePassMissionManager; @Getter private final BattlePassMissionManager battlePassMissionManager;
@Getter private final CombineManger combineManger;
private final CombineManger combineManger; @Getter private final TowerScheduleManager towerScheduleManager;
private final TowerScheduleManager towerScheduleManager;
public GameServer() { public GameServer() {
this(getAdapterInetSocketAddress()); this(getAdapterInetSocketAddress());
...@@ -133,57 +132,6 @@ public final class GameServer extends KcpServer { ...@@ -133,57 +132,6 @@ public final class GameServer extends KcpServer {
this.chatManager = chatManager; this.chatManager = chatManager;
} }
public InventoryManager getInventoryManager() {
return inventoryManager;
}
public GachaManager getGachaManager() {
return gachaManager;
}
public ShopManager getShopManager() {
return shopManager;
}
public MultiplayerManager getMultiplayerManager() {
return multiplayerManager;
}
public DropManager getDropManager() {
return dropManager;
}
public DungeonManager getDungeonManager() {
return dungeonManager;
}
public ExpeditionManager getExpeditionManager() {
return expeditionManager;
}
public CommandMap getCommandMap() {
return this.commandMap;
}
public CombineManger getCombineManger(){
return this.combineManger;
}
public TowerScheduleManager getTowerScheduleManager() {
return towerScheduleManager;
}
public WorldDataManager getWorldDataManager() {
return worldDataManager;
}
public BattlePassMissionManager getBattlePassMissionManager() {
return battlePassMissionManager;
}
public TaskMap getTaskMap() {
return this.taskMap;
}
private static InetSocketAddress getAdapterInetSocketAddress(){ private static InetSocketAddress getAdapterInetSocketAddress(){
InetSocketAddress inetSocketAddress; InetSocketAddress inetSocketAddress;
......
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