mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-06 06:30:27 -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
60
server/FSO.Server.Protocol/Electron/ElectronPackets.cs
Executable file
60
server/FSO.Server.Protocol/Electron/ElectronPackets.cs
Executable file
|
@ -0,0 +1,60 @@
|
|||
using FSO.Server.Protocol.Electron.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FSO.Server.Protocol.Electron
|
||||
{
|
||||
public class ElectronPackets
|
||||
{
|
||||
public static Dictionary<ushort, Type> ELECTRON_PACKET_BY_TYPEID;
|
||||
public static Type[] ELECTRON_PACKETS = new Type[] {
|
||||
typeof(CreateASimResponse),
|
||||
typeof(PurchaseLotRequest),
|
||||
typeof(PurchaseLotResponse),
|
||||
typeof(InstantMessage),
|
||||
typeof(FindLotRequest),
|
||||
typeof(FindLotResponse),
|
||||
typeof(FSOVMTickBroadcast),
|
||||
typeof(FSOVMDirectToClient),
|
||||
typeof(FSOVMCommand),
|
||||
typeof(FindAvatarRequest),
|
||||
typeof(FindAvatarResponse),
|
||||
typeof(ChangeRoommateRequest),
|
||||
typeof(KeepAlive),
|
||||
typeof(ChangeRoommateResponse),
|
||||
typeof(ModerationRequest),
|
||||
typeof(FSOVMProtocolMessage),
|
||||
typeof(AvatarRetireRequest),
|
||||
typeof(MailRequest),
|
||||
typeof(MailResponse),
|
||||
typeof(NhoodRequest),
|
||||
typeof(NhoodResponse),
|
||||
typeof(NhoodCandidateList),
|
||||
typeof(BulletinRequest),
|
||||
typeof(BulletinResponse),
|
||||
typeof(GlobalTuningUpdate)
|
||||
};
|
||||
|
||||
static ElectronPackets()
|
||||
{
|
||||
ELECTRON_PACKET_BY_TYPEID = new Dictionary<ushort, Type>();
|
||||
foreach (Type packetType in ELECTRON_PACKETS)
|
||||
{
|
||||
IElectronPacket packet = (IElectronPacket)Activator.CreateInstance(packetType);
|
||||
ELECTRON_PACKET_BY_TYPEID.Add(packet.GetPacketType().GetPacketCode(), packetType);
|
||||
}
|
||||
}
|
||||
|
||||
public static Type GetByPacketCode(ushort code)
|
||||
{
|
||||
if (ELECTRON_PACKET_BY_TYPEID.ContainsKey(code))
|
||||
{
|
||||
return ELECTRON_PACKET_BY_TYPEID[code];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue