Fix deprecated chat references

This commit is contained in:
AnimeGitB 2022-08-16 14:28:15 +09:30 committed by Luke H-W
parent c115fe1abe
commit 97779fd35a
5 changed files with 10 additions and 10 deletions

View File

@ -798,7 +798,7 @@ public class Player {
return;
}
this.getServer().getChatManager().sendPrivateMessageFromServer(getUid(), message.toString());
this.getServer().getChatSystem().sendPrivateMessageFromServer(getUid(), message.toString());
// this.sendPacket(new PacketPrivateChatNotify(GameConstants.SERVER_CONSOLE_UID, getUid(), message.toString()));
}
@ -810,7 +810,7 @@ public class Player {
*/
public void sendMessage(Player sender, Object message) {
// this.sendPacket(new PacketPrivateChatNotify(sender.getUid(), this.getUid(), message.toString()));
this.getServer().getChatManager().sendPrivateMessage(sender, this.getUid(), message.toString());
this.getServer().getChatSystem().sendPrivateMessage(sender, this.getUid(), message.toString());
}
// ---------------------MAIL------------------------
@ -1199,7 +1199,7 @@ public class Player {
this.hasSentLoginPackets = true;
// Send server welcome chat.
this.getServer().getChatManager().sendServerWelcomeMessages(this);
this.getServer().getChatSystem().sendServerWelcomeMessages(this);
// Set session state
session.setState(SessionState.ACTIVE);
@ -1219,7 +1219,7 @@ public class Player {
public void onLogout() {
try {
// Clear chat history.
this.getServer().getChatManager().clearHistoryOnLogout(this);
this.getServer().getChatSystem().clearHistoryOnLogout(this);
// stop stamina calculation
getStaminaManager().stopSustainedStaminaHandler();

View File

@ -17,9 +17,9 @@ public class HandlerPlayerChatReq extends PacketHandler {
ChatInfo.ContentCase content = req.getChatInfo().getContentCase();
if (content == ChatInfo.ContentCase.TEXT) {
session.getServer().getChatManager().sendTeamMessage(session.getPlayer(), req.getChannelId(), req.getChatInfo().getText());
session.getServer().getChatSystem().sendTeamMessage(session.getPlayer(), req.getChannelId(), req.getChatInfo().getText());
} else if (content == ChatInfo.ContentCase.ICON) {
session.getServer().getChatManager().sendTeamMessage(session.getPlayer(), req.getChannelId(), req.getChatInfo().getIcon());
session.getServer().getChatSystem().sendTeamMessage(session.getPlayer(), req.getChannelId(), req.getChatInfo().getIcon());
}
session.send(new PacketPlayerChatRsp());

View File

@ -15,9 +15,9 @@ public class HandlerPrivateChatReq extends PacketHandler {
PrivateChatReq.ContentCase content = req.getContentCase();
if (content == PrivateChatReq.ContentCase.TEXT) {
session.getServer().getChatManager().sendPrivateMessage(session.getPlayer(), req.getTargetUid(), req.getText());
session.getServer().getChatSystem().sendPrivateMessage(session.getPlayer(), req.getTargetUid(), req.getText());
} else if (content == PrivateChatReq.ContentCase.ICON) {
session.getServer().getChatManager().sendPrivateMessage(session.getPlayer(), req.getTargetUid(), req.getIcon());
session.getServer().getChatSystem().sendPrivateMessage(session.getPlayer(), req.getTargetUid(), req.getIcon());
}
}

View File

@ -14,7 +14,7 @@ public class HandlerPullPrivateChatReq extends PacketHandler {
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
PullPrivateChatReq req = PullPrivateChatReq.parseFrom(payload);
session.getServer().getChatManager().handlePullPrivateChatReq(session.getPlayer(), req.getTargetUid());
session.getServer().getChatSystem().handlePullPrivateChatReq(session.getPlayer(), req.getTargetUid());
// session.send(new PacketPullPrivateChatRsp(req.getTargetUid()));
}

View File

@ -10,6 +10,6 @@ import emu.grasscutter.server.packet.send.PacketPullRecentChatRsp;
public class HandlerPullRecentChatReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
session.getServer().getChatManager().handlePullRecentChatReq(session.getPlayer());
session.getServer().getChatSystem().handlePullRecentChatReq(session.getPlayer());
}
}