mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-13 17:43:31 +08:00
Fix changing target UID when talking to the server
This commit is contained in:
parent
cad6e90c90
commit
d5de603d76
@ -145,8 +145,11 @@ public class ChatSystem implements ChatSystemHandler {
|
||||
event.call(); if (event.isCanceled()) return;
|
||||
|
||||
// Fetch the new target.
|
||||
targetUid = event.getTargetUid();
|
||||
if (targetUid == -1) return;
|
||||
if (targetUid != GameConstants.SERVER_CONSOLE_UID) {
|
||||
targetUid = event.getTargetUid();
|
||||
if (targetUid == -1) return;
|
||||
}
|
||||
|
||||
// Fetch the new message.
|
||||
message = event.getMessage();
|
||||
if (message == null || message.length() == 0) return;
|
||||
@ -179,8 +182,10 @@ public class ChatSystem implements ChatSystemHandler {
|
||||
event.call(); if (event.isCanceled()) return;
|
||||
|
||||
// Fetch the new target.
|
||||
targetUid = event.getTargetUid();
|
||||
if (targetUid == -1) return;
|
||||
if (targetUid != GameConstants.SERVER_CONSOLE_UID) {
|
||||
targetUid = event.getTargetUid();
|
||||
if (targetUid == -1) return;
|
||||
}
|
||||
// Fetch the new emote.
|
||||
emote = event.getMessageAsInt();
|
||||
if (emote == -1) return;
|
||||
|
Loading…
Reference in New Issue
Block a user