mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-14 15:14:36 +01:00
unstable whisper, now you can dm your friend(if you have any lol)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using Common.Database;
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers.Chat
|
||||
{
|
||||
[PacketCmdId(CmdId.GetPrivateHistoryChatMsgReq)]
|
||||
internal class GetPrivateHistoryChatMsgReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetPrivateHistoryChatMsgReq Data = packet.GetDecodedBody<GetPrivateHistoryChatMsgReq>();
|
||||
GetPrivateHistoryChatMsgRsp Rsp = new() { retcode = GetPrivateHistoryChatMsgRsp.Retcode.Succ };
|
||||
|
||||
if (Data.UidLists.Length > 0)
|
||||
{
|
||||
foreach (uint targetUid in Data.UidLists)
|
||||
{
|
||||
Rsp.ChatLists.AddRange(PrivateMessage.GetMessages(session.Player.User.Uid, targetUid));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Rsp.ChatLists.AddRange(PrivateMessage.GetMessages(session.Player.User.Uid));
|
||||
}
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetPrivateHistoryChatMsgRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Common.Resources.Proto;
|
||||
using Common.Database;
|
||||
using Common.Resources.Proto;
|
||||
using PemukulPaku.GameServer.Game.Chatrooms;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers
|
||||
@@ -11,6 +12,8 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
SendChatMsgNotify Data = packet.GetDecodedBody<SendChatMsgNotify>();
|
||||
if (Data.ChatMsg.Channel == ChatMsg.MsgChannel.World)
|
||||
WorldChatroom.GetInstance().GetChatroom(session).OnSendChat(session, Data.ChatMsg);
|
||||
else if (Data.ChatMsg.Channel == ChatMsg.MsgChannel.Private)
|
||||
PrivateChatManager.OnSendChatMsg(session, Data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
}
|
||||
}
|
||||
}
|
||||
stigmata.WaitSelectRuneGroupLists.Clear();
|
||||
stigmata.WaitSelectRuneGroupLists?.Clear();
|
||||
}
|
||||
session.Player.Equipment.Save();
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.SelectNewStigmataRuneRsp));
|
||||
|
||||
@@ -16,7 +16,9 @@ namespace PemukulPaku.GameServer.Handlers.Two
|
||||
|
||||
if(user is not null)
|
||||
{
|
||||
Player player = new(user);
|
||||
Player? player = Session.FromUid(user.Uid)?.Player;
|
||||
player ??= new(user);
|
||||
|
||||
Rsp.CardData = new()
|
||||
{
|
||||
Uid = player.User.Uid,
|
||||
|
||||
Reference in New Issue
Block a user