mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 13:11:09 +00:00
Random cleanups in the gameserver and player
This commit is contained in:
parent
a16bc72101
commit
cdc23a0647
@ -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 {
|
|||||||
|
|
||||||
// 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 {
|
|||||||
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 {
|
|||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user