mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Added all the base code for managing world-scope groups.
This commit is contained in:
		| @@ -0,0 +1,43 @@ | ||||
| using System; | ||||
| using System.IO; | ||||
|  | ||||
| namespace FFXIVClassic_World_Server.Packets.WorldPackets.Receive.Group | ||||
| { | ||||
|     class GroupControlCreateModifyPacket | ||||
|     { | ||||
|         public const byte GROUP_CONTROL_CREATE = 0; | ||||
|         public const byte GROUP_CONTROL_MODIFY = 1; | ||||
|  | ||||
|         public const byte GROUP_PARTY = 0; | ||||
|         public const byte GROUP_RETAINER = 1; | ||||
|         public const byte GROUP_LINKSHELL = 2; | ||||
|         public const byte GROUP_RELATION = 3; | ||||
|  | ||||
|         public bool invalidPacket = false; | ||||
|         public byte controlCode;         | ||||
|         public ulong groupId; | ||||
|         public byte groupType; | ||||
|          | ||||
|         public GroupControlCreateModifyPacket(byte[] data) | ||||
|         { | ||||
|             using (MemoryStream mem = new MemoryStream(data)) | ||||
|             { | ||||
|                 using (BinaryReader binReader = new BinaryReader(mem)) | ||||
|                 { | ||||
|                     try | ||||
|                     { | ||||
|                         controlCode = binReader.ReadByte(); | ||||
|                         groupType = binReader.ReadByte(); | ||||
|                         groupId = binReader.ReadUInt64(); | ||||
|                          | ||||
|                         //Work value data | ||||
|                     } | ||||
|                     catch (Exception) | ||||
|                     { | ||||
|                         invalidPacket = true; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,34 @@ | ||||
| using System; | ||||
| using System.IO; | ||||
|  | ||||
| namespace FFXIVClassic_World_Server.Packets.WorldPackets.Receive.Group | ||||
| { | ||||
|     class GroupControlGetDeletePacket | ||||
|     { | ||||
|         public const byte GROUP_CONTROL_GET = 0; | ||||
|         public const byte GROUP_CONTROL_DELETE = 1; | ||||
|          | ||||
|         public bool invalidPacket = false; | ||||
|         public uint controlCode;         | ||||
|         public ulong groupId; | ||||
|          | ||||
|         public GroupControlGetDeletePacket(byte[] data) | ||||
|         { | ||||
|             using (MemoryStream mem = new MemoryStream(data)) | ||||
|             { | ||||
|                 using (BinaryReader binReader = new BinaryReader(mem)) | ||||
|                 { | ||||
|                     try | ||||
|                     { | ||||
|                         controlCode = binReader.ReadUInt32(); | ||||
|                         groupId = binReader.ReadUInt64();                         | ||||
|                     } | ||||
|                     catch (Exception) | ||||
|                     { | ||||
|                         invalidPacket = true; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,36 @@ | ||||
| using System; | ||||
| using System.IO; | ||||
|  | ||||
| namespace FFXIVClassic_World_Server.Packets.WorldPackets.Receive.Group | ||||
| { | ||||
|     class GroupMemberChangePacket | ||||
|     { | ||||
|         public const int GROUP_MEMBER_ADD = 0; | ||||
|         public const int GROUP_MEMBER_REMOVE = 0; | ||||
|  | ||||
|         public bool invalidPacket = false; | ||||
|         public uint controlCode; | ||||
|         public ulong groupId; | ||||
|         public uint memberId; | ||||
|  | ||||
|         public GroupMemberChangePacket(byte[] data) | ||||
|         { | ||||
|             using (MemoryStream mem = new MemoryStream(data)) | ||||
|             { | ||||
|                 using (BinaryReader binReader = new BinaryReader(mem)) | ||||
|                 { | ||||
|                     try | ||||
|                     { | ||||
|                         controlCode = binReader.ReadUInt32(); | ||||
|                         groupId = binReader.ReadUInt64(); | ||||
|                         memberId = binReader.ReadUInt32(); | ||||
|                     } | ||||
|                     catch (Exception) | ||||
|                     { | ||||
|                         invalidPacket = true; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user