mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-29 07:33:17 +02:00
Added event conditions to the database. This is a JSON object that stores all types of conditions. The server also sends the correct packets to enable these conditions (minus the push packets... those aren't implemented).
This commit is contained in:
parent
3b48ed1f74
commit
7bc3c8c2dd
13 changed files with 192 additions and 41 deletions
|
@ -13,22 +13,21 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
|||
public const ushort OPCODE = 0x0136;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, uint unknown1, byte unknown2, string conditionName)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
string eventName = "";
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt32)0);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(eventName), 0, Encoding.ASCII.GetByteCount(eventName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(eventName));
|
||||
binWriter.Write((UInt32)unknown1);
|
||||
binWriter.Write((Byte)unknown2);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(conditionName), 0, Encoding.ASCII.GetByteCount(conditionName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(conditionName));
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
return new SubPacket(OPCODE, sourceActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue