mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-25 11:57:35 +00:00
Fix deprecated chat references
This commit is contained in:
parent
c115fe1abe
commit
97779fd35a
@ -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();
|
||||
|
@ -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());
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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()));
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user