mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-12 17:22:26 -04:00
Removed NioTSO client and server
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
This commit is contained in:
parent
f12ba1502b
commit
22191ce648
591 changed files with 53264 additions and 3362 deletions
50
server/FSO.Server.Protocol/Voltron/VoltronPackets.cs
Executable file
50
server/FSO.Server.Protocol/Voltron/VoltronPackets.cs
Executable file
|
@ -0,0 +1,50 @@
|
|||
using FSO.Server.Protocol.Voltron.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FSO.Server.Protocol.Voltron
|
||||
{
|
||||
public class VoltronPackets
|
||||
{
|
||||
public static Dictionary<ushort, Type> VOLTRON_PACKET_BY_TYPEID;
|
||||
public static Type[] VOLTRON_PACKETS = new Type[] {
|
||||
typeof(ClientOnlinePDU),
|
||||
typeof(HostOnlinePDU),
|
||||
typeof(SetIgnoreListPDU),
|
||||
typeof(SetIgnoreListResponsePDU),
|
||||
typeof(SetInvinciblePDU),
|
||||
typeof(RSGZWrapperPDU),
|
||||
typeof(TransmitCreateAvatarNotificationPDU),
|
||||
typeof(DataServiceWrapperPDU),
|
||||
typeof(DBRequestWrapperPDU),
|
||||
typeof(OccupantArrivedPDU),
|
||||
typeof(ClientByePDU),
|
||||
typeof(ServerByePDU),
|
||||
typeof(FindPlayerPDU),
|
||||
typeof(FindPlayerResponsePDU),
|
||||
typeof(ChatMsgPDU),
|
||||
typeof(AnnouncementMsgPDU)
|
||||
};
|
||||
|
||||
static VoltronPackets()
|
||||
{
|
||||
VOLTRON_PACKET_BY_TYPEID = new Dictionary<ushort, Type>();
|
||||
foreach (Type packetType in VOLTRON_PACKETS)
|
||||
{
|
||||
IVoltronPacket packet = (IVoltronPacket)Activator.CreateInstance(packetType);
|
||||
VOLTRON_PACKET_BY_TYPEID.Add(packet.GetPacketType().GetPacketCode(), packetType);
|
||||
}
|
||||
}
|
||||
|
||||
public static Type GetByPacketCode(ushort code)
|
||||
{
|
||||
if (VOLTRON_PACKET_BY_TYPEID.ContainsKey(code))
|
||||
{
|
||||
return VOLTRON_PACKET_BY_TYPEID[code];
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue