mirror of
https://git.muiegratis.online/suikoakari/Campofinale
synced 2025-12-23 23:14:36 +01:00
gift to chars work
This commit is contained in:
@@ -241,7 +241,7 @@ namespace Campofinale.Packets.Cs
|
||||
session.Send(new PacketScSpaceshipSync(session));
|
||||
session.Send(new PacketScSyncFullDungeonStatus(session));
|
||||
session.Send(new PacketScActivitySync(session));
|
||||
|
||||
session.Send(new PacketScSnsGetChatList(session));
|
||||
session.Send(ScMsgId.ScSyncFullDataEnd, new ScSyncFullDataEnd());
|
||||
session.EnterScene();
|
||||
session.Initialized = true;
|
||||
|
||||
28
Campofinale/Packets/Cs/HandleCsSpaceshipPresentGiftToChar.cs
Normal file
28
Campofinale/Packets/Cs/HandleCsSpaceshipPresentGiftToChar.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Campofinale.Network;
|
||||
using Campofinale.Packets.Sc;
|
||||
using Campofinale.Protocol;
|
||||
using Google.Protobuf;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Campofinale.Packets.Cs
|
||||
{
|
||||
public class HandleCsSpaceshipPresentGiftToChar
|
||||
{
|
||||
|
||||
[Server.Handler(CsMsgId.CsSpaceshipPresentGiftToChar)]
|
||||
public static void Handle(Player session, CsMsgId cmdId, Packet packet)
|
||||
{
|
||||
CsSpaceshipPresentGiftToChar req = packet.DecodeBody<CsSpaceshipPresentGiftToChar>();
|
||||
session.spaceshipManager.GiftToChar(req);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
33
Campofinale/Packets/Sc/PacketScSnsGetChatList.cs
Normal file
33
Campofinale/Packets/Sc/PacketScSnsGetChatList.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Campofinale.Network;
|
||||
using Campofinale.Protocol;
|
||||
using Campofinale.Resource;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Campofinale.Packets.Sc
|
||||
{
|
||||
public class PacketScSnsGetChatList : Packet
|
||||
{
|
||||
public PacketScSnsGetChatList(Player player) {
|
||||
ScSnsGetChatList proto = new ScSnsGetChatList() {
|
||||
|
||||
};
|
||||
foreach (var chat in ResourceManager.snsChatTable)
|
||||
{
|
||||
var chatInfo = new SnsChatInfo()
|
||||
{
|
||||
ChatId = chat.Value.chatId,
|
||||
ChatType = chat.Value.chatType,
|
||||
Timestamp = DateTime.UtcNow.ToUnixTimestampMilliseconds(),
|
||||
|
||||
};
|
||||
proto.ChatList.Add(chatInfo);
|
||||
}
|
||||
SetData(ScMsgId.ScSnsGetChatList, proto);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user