Skip to content
Snippets Groups Projects
Commit 443cc8fc authored by ImmuState's avatar ImmuState Committed by Melledy
Browse files

Make the UI behave.

parent 9a313e50
Branches
Tags
No related merge requests found
...@@ -118,9 +118,14 @@ public class ForgingManager { ...@@ -118,9 +118,14 @@ public class ForgingManager {
var queueData = this.determineCurrentForgeQueueData(); var queueData = this.determineCurrentForgeQueueData();
this.player.sendPacket(new PacketForgeQueueDataNotify(queueData, List.of())); this.player.sendPacket(new PacketForgeQueueDataNotify(queueData, List.of()));
} }
private void sendForgeQueueDataNotify(int removed) { private void sendForgeQueueDataNotify(boolean hasRemoved) {
var queueData = this.determineCurrentForgeQueueData(); var queueData = this.determineCurrentForgeQueueData();
this.player.sendPacket(new PacketForgeQueueDataNotify(queueData, List.of(removed)));
if (hasRemoved) {
this.player.sendPacket(new PacketForgeQueueDataNotify(Map.of(), List.of(1, 2, 3, 4)));
}
this.player.sendPacket(new PacketForgeQueueDataNotify(queueData, List.of()));
} }
public void handleForgeStartReq(ForgeStartReq req) { public void handleForgeStartReq(ForgeStartReq req) {
...@@ -227,7 +232,8 @@ public class ForgingManager { ...@@ -227,7 +232,8 @@ public class ForgingManager {
// Otherwise, completely remove it. // Otherwise, completely remove it.
else { else {
this.player.getActiveForges().remove(queueId - 1); this.player.getActiveForges().remove(queueId - 1);
this.sendForgeQueueDataNotify(queueId); // this.sendForgeQueueDataNotify(queueId);
this.sendForgeQueueDataNotify(true);
} }
// Send response. // Send response.
...@@ -268,7 +274,7 @@ public class ForgingManager { ...@@ -268,7 +274,7 @@ public class ForgingManager {
// Remove the forge queue. // Remove the forge queue.
this.player.getActiveForges().remove(queueId - 1); this.player.getActiveForges().remove(queueId - 1);
this.sendForgeQueueDataNotify(queueId); this.sendForgeQueueDataNotify(true);
// Send response. // Send response.
this.player.sendPacket(new PacketForgeQueueManipulateRsp(Retcode.RET_SUCC, ForgeQueueManipulateType.FORGE_QUEUE_MANIPULATE_TYPE_STOP_FORGE, List.of(), returnItems, List.of())); this.player.sendPacket(new PacketForgeQueueManipulateRsp(Retcode.RET_SUCC, ForgeQueueManipulateType.FORGE_QUEUE_MANIPULATE_TYPE_STOP_FORGE, List.of(), returnItems, List.of()));
......
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