mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-20 19:04:40 +01:00
Fix changing target UID when talking to the server
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user