Files
GameServer/MistoxServer/mPacket/ResevedPackets.cs
T

56 lines
1.8 KiB
C#

using System;
using System.Net;
using System.Numerics;
using Mistox.Attributes;
namespace Mistox.ResevedPackets {
// Implimented
// Packet send to server for Auth and responded to the client with Auth Success
[mPacket]
public class UserAuthPacket {
// Sent to the server
public string UserName { get; set; } = "";
public string ConnectionKey { get; set; } = "";
// Response from the server
public string ServerName { get; set; } = "";
public int AuthSuccessful { get; set; } = 0; // 0 is standard, -1 is auth failure, 1 is auth success
}
// Not Implimented
// Generic networked object packet
[mPacket]
public class EntityPacket {
// Tag to make sure the object on the other side is the same object i want to update here
// Need to map these Object ID's to a dictionary to make sure I only send network updates when there is a change
public ushort ObjectId { get; set; }
// Packet payload data that im matching for in the dictionary
public byte[] InnerPayload { get; set; }
}
// Not implemented
// Packet sent to all clients when a users TCP stream connects to the server
[mPacket]
public class UserConnectedPacket {
public string UserName { get; set; }
public IPAddress ClientIPAddress { get; set; }
}
// Not implemented
// Packet sent to all clients when a global position update occurrs
[mPacket]
public class UserPositionUpdatePacket {
public string UserName { get; set; }
public Vector3 Position { get; set; }
}
// Not implimented
// Packet sent to all clients when a users TCP stream disconnects from the server
[mPacket]
public class UserDisconnectedPacket {
public string UserName { get; set; }
}
}