mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 08:25:21 +01:00
Move forging stuff to ForgingManager, make client respond to ForgeGetQueueDataReq and actually display forging queues.
This commit is contained in:
@@ -30,6 +30,7 @@ import emu.grasscutter.game.managers.InsectCaptureManager;
|
||||
import emu.grasscutter.game.managers.StaminaManager.StaminaManager;
|
||||
import emu.grasscutter.game.managers.SotSManager;
|
||||
import emu.grasscutter.game.managers.EnergyManager.EnergyManager;
|
||||
import emu.grasscutter.game.managers.ForgingManager.ForgingManager;
|
||||
import emu.grasscutter.game.props.ActionReason;
|
||||
import emu.grasscutter.game.props.EntityType;
|
||||
import emu.grasscutter.game.props.PlayerProperty;
|
||||
@@ -153,6 +154,7 @@ public class Player {
|
||||
@Transient private MapMarksManager mapMarksManager;
|
||||
@Transient private StaminaManager staminaManager;
|
||||
@Transient private EnergyManager energyManager;
|
||||
@Transient private ForgingManager forgingManager;
|
||||
@Transient private DeforestationManager deforestationManager;
|
||||
|
||||
private long springLastUsed;
|
||||
@@ -209,6 +211,7 @@ public class Player {
|
||||
this.staminaManager = new StaminaManager(this);
|
||||
this.sotsManager = new SotSManager(this);
|
||||
this.energyManager = new EnergyManager(this);
|
||||
this.forgingManager = new ForgingManager(this);
|
||||
}
|
||||
|
||||
// On player creation
|
||||
@@ -240,6 +243,7 @@ public class Player {
|
||||
this.sotsManager = new SotSManager(this);
|
||||
this.energyManager = new EnergyManager(this);
|
||||
this.deforestationManager = new DeforestationManager(this);
|
||||
this.forgingManager = new ForgingManager(this);
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
@@ -1120,6 +1124,10 @@ public class Player {
|
||||
return this.energyManager;
|
||||
}
|
||||
|
||||
public ForgingManager getForgingManager() {
|
||||
return this.forgingManager;
|
||||
}
|
||||
|
||||
public AbilityManager getAbilityManager() {
|
||||
return abilityManager;
|
||||
}
|
||||
@@ -1265,7 +1273,7 @@ public class Player {
|
||||
session.send(new PacketWidgetGadgetAllDataNotify());
|
||||
session.send(new PacketPlayerHomeCompInfoNotify(this));
|
||||
session.send(new PacketHomeComfortInfoNotify(this));
|
||||
session.send(new PacketForgeDataNotify(this));
|
||||
this.forgingManager.sendForgeDataNotify();
|
||||
|
||||
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