Fix Excruciate removign status from enemy rather than caster
This commit is contained in:
Yogurt
2019-06-05 19:28:02 -07:00
272 changed files with 8223 additions and 2425 deletions

View File

@@ -1,6 +1,6 @@
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class AddActorPacket
{

View File

@@ -1,6 +1,6 @@
using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class DeleteAllActorsPacket
{

View File

@@ -1,9 +1,5 @@
using FFXIVClassic.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.packets.send.actor
{

View File

@@ -2,7 +2,7 @@
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class PlayBGAnimation
{

View File

@@ -5,7 +5,7 @@ using System.Linq;
using System.Reflection;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorPropetyPacket
{
@@ -110,6 +110,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
{
string[] split = name.Split('.');
int arrayIndex = 0;
if (!(split[0].Equals("work") || split[0].Equals("charaWork") || split[0].Equals("playerWork") || split[0].Equals("npcWork") || split[0].Equals("guildleveWork")))
return false;

View File

@@ -1,7 +1,7 @@
using FFXIVClassic.Common;
using System;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorStatePacket
{

View File

@@ -2,7 +2,7 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorStatusAllPacket
{

View File

@@ -2,7 +2,7 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorStatusPacket
{

View File

@@ -1,10 +1,9 @@
using System;
using System.IO;
using System.IO;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.actors.chara;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class SetActorSubStatePacket
{

View File

@@ -3,7 +3,7 @@ using System;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor
namespace FFXIVClassic_Map_Server.packets.send.actor
{
class _0x132Packet
{

View File

@@ -0,0 +1,12 @@
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
class BattleAction
{
public uint targetId;
public ushort amount;
public ushort worldMasterTextId;
public uint effectId;
public byte param;
public byte unknown;
}
}

View File

@@ -0,0 +1,59 @@
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
class BattleActionX10Packet
{
public const ushort OPCODE = 0x013A;
public const uint PACKET_SIZE = 0xD8;
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((UInt32)sourceActorId);
binWriter.Write((UInt32)animationId);
//Missing... last value is float, string in here as well?
binWriter.Seek(0x20, SeekOrigin.Begin);
binWriter.Write((UInt32) actionList.Length); //Num actions (always 1 for this)
binWriter.Write((UInt16)commandId);
binWriter.Write((UInt16)810); //?
binWriter.Seek(0x20, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((UInt32)action.targetId);
binWriter.Seek(0x50, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((UInt16)action.amount);
binWriter.Seek(0x64, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((UInt16)action.worldMasterTextId);
binWriter.Seek(0x78, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((UInt32)action.effectId);
binWriter.Seek(0xA0, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((Byte)action.param);
binWriter.Seek(0xAA, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((Byte)action.unknown);
}
}
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View File

@@ -0,0 +1,59 @@
using FFXIVClassic.Common;
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
class BattleActionX18Packet
{
public const ushort OPCODE = 0x013B;
public const uint PACKET_SIZE = 0x148;
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((UInt32)sourceActorId);
binWriter.Write((UInt32)animationId);
//Missing... last value is float, string in here as well?
binWriter.Seek(0x20, SeekOrigin.Begin);
binWriter.Write((UInt32) actionList.Length); //Num actions (always 1 for this)
binWriter.Write((UInt16)commandId);
binWriter.Write((UInt16)810); //?
binWriter.Seek(0x58, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((UInt32)action.targetId);
binWriter.Seek(0xA0, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((UInt16)action.amount);
binWriter.Seek(0xC4, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((UInt16)action.worldMasterTextId);
binWriter.Seek(0xE8, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((UInt32)action.effectId);
binWriter.Seek(0x130, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((Byte)action.param);
binWriter.Seek(0x142, SeekOrigin.Begin);
foreach (BattleAction action in actionList)
binWriter.Write((Byte)action.unknown);
}
}
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View File

@@ -1,12 +1,9 @@
using FFXIVClassic.Common;
using System;
using System.Collections.Generic;
using System;
using FFXIVClassic_Map_Server.actors.chara.ai;
using FFXIVClassic_Map_Server.actors.chara.ai.utils;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.packets.send.actor.battle;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
//These flags can be stacked and mixed, but the client will prioritize certain flags over others.
[Flags]

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{

View File

@@ -2,7 +2,7 @@
using System;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
{
class CommandResultX00Packet
{

View File

@@ -4,7 +4,7 @@ using System;
using System.IO;
using System.Text;
namespace FFXIVClassic_Map_Server.packets.send.actor.events
namespace FFXIVClassic_Map_Server.packets.send.actor.events
{
class SetEmoteEventCondition
{

View File

@@ -7,16 +7,13 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
public const ushort OPCODE = 0x016D;
public const uint PACKET_SIZE = 0x28;
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId)
public static SubPacket BuildPacket(uint playerActorID, bool clearItemPackage = false)
{
byte[] data = new byte[8];
data[0] = 2;
return new SubPacket(OPCODE, sourceActorId, data);
}
public static SubPacket BuildPacket(uint playerActorID)
{
byte[] data = new byte[8];
if (clearItemPackage)
data[0] = 2;
return new SubPacket(OPCODE, playerActorID, data);
}
}

View File

@@ -3,7 +3,7 @@ using System;
using System.Collections.Generic;
using System.IO;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class InventoryRemoveX08Packet
{

View File

@@ -2,15 +2,16 @@
using System.IO;
using FFXIVClassic.Common;
using FFXIVClassic_Map_Server.dataobjects;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX01Packet
class LinkedItemListX01Packet
{
public const ushort OPCODE = 0x014D;
public const uint PACKET_SIZE = 0x28;
public static SubPacket BuildPacket(uint playerActorID, ushort equipSlot, uint itemSlot)
public static SubPacket BuildPacket(uint playerActorID, ushort position, InventoryItem linkedItem)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@@ -18,12 +19,13 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((UInt16)equipSlot);
binWriter.Write((UInt32)itemSlot);
binWriter.Write((UInt16)position);
binWriter.Write((UInt16)linkedItem.slot);
binWriter.Write((UInt16)linkedItem.itemPackage);
}
}
return new SubPacket(OPCODE, playerActorID, data);
}
}
}
}

View File

@@ -7,12 +7,12 @@ using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX08Packet
class LinkedItemListX08Packet
{
public const ushort OPCODE = 0x14E;
public const uint PACKET_SIZE = 0x58;
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] linkedItemList, List<ushort> slotsToUpdate, ref int listOffset)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@@ -28,8 +28,9 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
for (int i = 0; i < max; i++)
{
binWriter.Write((UInt16)slotsToUpdate[i]);
binWriter.Write((UInt32)equipment[slotsToUpdate[i]].slot);
binWriter.Write((UInt16)slotsToUpdate[i]); //LinkedItemPackageSlot
binWriter.Write((UInt16)linkedItemList[slotsToUpdate[i]].slot); //ItemPackage Slot
binWriter.Write((UInt16)linkedItemList[slotsToUpdate[i]].itemPackage); //ItemPackage Code
listOffset++;
}

View File

@@ -7,12 +7,12 @@ using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX16Packet
class LinkedItemListX16Packet
{
public const ushort OPCODE = 0x14F;
public const uint PACKET_SIZE = 0x80;
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] linkedItemList, List<ushort> slotsToUpdate, ref int listOffset)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@@ -28,8 +28,9 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
for (int i = 0; i < max; i++)
{
binWriter.Write((UInt16)slotsToUpdate[i]);
binWriter.Write((UInt32)equipment[slotsToUpdate[i]].slot);
binWriter.Write((UInt16)slotsToUpdate[i]); //LinkedItemPackageSlot
binWriter.Write((UInt16)linkedItemList[slotsToUpdate[i]].slot); //ItemPackage Slot
binWriter.Write((UInt16)linkedItemList[slotsToUpdate[i]].itemPackage); //ItemPackage Code
listOffset++;
}

View File

@@ -7,12 +7,12 @@ using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX32Packet
class LinkedItemListX32Packet
{
public const ushort OPCODE = 0x150;
public const uint PACKET_SIZE = 0xE0;
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] linkedItemList, List<ushort> slotsToUpdate, ref int listOffset)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@@ -28,8 +28,9 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
for (int i = 0; i < max; i++)
{
binWriter.Write((UInt16)slotsToUpdate[i]);
binWriter.Write((UInt32)equipment[slotsToUpdate[i]].slot);
binWriter.Write((UInt16)slotsToUpdate[i]); //LinkedItemPackageSlot
binWriter.Write((UInt16)linkedItemList[slotsToUpdate[i]].slot); //ItemPackage Slot
binWriter.Write((UInt16)linkedItemList[slotsToUpdate[i]].itemPackage); //ItemPackage Code
listOffset++;
}

View File

@@ -7,12 +7,12 @@ using FFXIVClassic.Common;
namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
{
class EquipmentListX64Packet
class LinkedItemListX64Packet
{
public const ushort OPCODE = 0x151;
public const uint PACKET_SIZE = 0x194;
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] linkedItemList, List<ushort> slotsToUpdate, ref int listOffset)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@@ -28,8 +28,9 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
for (int i = 0; i < max; i++)
{
binWriter.Write((UInt16)slotsToUpdate[i]);
binWriter.Write((UInt32)equipment[slotsToUpdate[i]].slot);
binWriter.Write((UInt16)slotsToUpdate[i]); //LinkedItemPackageSlot
binWriter.Write((UInt16)linkedItemList[slotsToUpdate[i]].slot); //ItemPackage Slot
binWriter.Write((UInt16)linkedItemList[slotsToUpdate[i]].itemPackage); //ItemPackage Code
listOffset++;
}