mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04: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:
@@ -13,24 +13,23 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x016C;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, byte unknown1, byte unknown2, ushort emoteId, 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((Byte)0);
|
||||
binWriter.Write((Byte)0);
|
||||
binWriter.Write((UInt16)0);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(eventName), 0, Encoding.ASCII.GetByteCount(eventName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(eventName));
|
||||
{
|
||||
binWriter.Write((Byte)unknown1);
|
||||
binWriter.Write((Byte)unknown2);
|
||||
binWriter.Write((UInt16)emoteId);
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,23 +13,22 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x016B;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, byte 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((Byte)0);
|
||||
binWriter.Write((Byte)0);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(eventName), 0, Encoding.ASCII.GetByteCount(eventName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(eventName));
|
||||
{
|
||||
binWriter.Write((Byte)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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x016F;
|
||||
public const uint PACKET_SIZE = 0x58;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
return new SubPacket(OPCODE, sourceActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x0170;
|
||||
public const uint PACKET_SIZE = 0x60;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
return new SubPacket(OPCODE, sourceActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x0175;
|
||||
public const uint PACKET_SIZE = 0x58;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
return new SubPacket(OPCODE, sourceActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,23 +13,21 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x012E;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, byte 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((Byte)0);
|
||||
binWriter.Write((Byte)0);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(eventName), 0, Encoding.ASCII.GetByteCount(eventName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(eventName));
|
||||
{
|
||||
binWriter.Write((Byte)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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user