Change manual packet numbering to a dictionary
This commit is contained in:
1 parent
37a6b5d59b
commit
b83887cb2a
8 files changed
+53
-44
No files matched your search
@@ -4,21 +4,7 @@ namespace Mistox.Attributes {
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
|
||||
public sealed class mPacket : Attribute {
|
||||
public byte ID { get; }
|
||||
public PacketUsage PacketUse { get; }
|
||||
public mPacket(byte id) {
|
||||
ID = id;
|
||||
PacketUse = PacketUsage.ClientToClient | PacketUsage.ClientToServer;
|
||||
}
|
||||
public mPacket(byte id, PacketUsage packetUse) {
|
||||
ID = id;
|
||||
PacketUse = packetUse;
|
||||
}
|
||||
}
|
||||
|
||||
public enum PacketUsage {
|
||||
ClientToClient = 0x01,
|
||||
ClientToServer = 0x10,
|
||||
public mPacket() {}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user