Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
443cc8fc
Commit
443cc8fc
authored
Jun 06, 2022
by
ImmuState
Committed by
Melledy
Jun 08, 2022
Browse files
Make the UI behave.
parent
9a313e50
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/managers/ForgingManager/ForgingManager.java
View file @
443cc8fc
...
@@ -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
r
emoved
)
{
private
void
sendForgeQueueDataNotify
(
boolean
hasR
emoved
)
{
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
()));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment