mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-25 06:07:46 +00:00
Cleaned up inventory packets.
This commit is contained in:
parent
7c4091a196
commit
1339975ade
10 changed files with 14 additions and 44 deletions
|
@ -159,7 +159,6 @@
|
||||||
<Compile Include="packets\send\actor\ActorDoEmotePacket.cs" />
|
<Compile Include="packets\send\actor\ActorDoEmotePacket.cs" />
|
||||||
<Compile Include="packets\send\actor\ActorInstantiatePacket.cs" />
|
<Compile Include="packets\send\actor\ActorInstantiatePacket.cs" />
|
||||||
<Compile Include="packets\send\actor\ActorSpecialGraphicPacket.cs" />
|
<Compile Include="packets\send\actor\ActorSpecialGraphicPacket.cs" />
|
||||||
<Compile Include="packets\send\actor\BattleAction1Packet.cs" />
|
|
||||||
<Compile Include="packets\send\actor\battle\BattleAction.cs" />
|
<Compile Include="packets\send\actor\battle\BattleAction.cs" />
|
||||||
<Compile Include="packets\send\actor\battle\BattleActionX00Packet.cs" />
|
<Compile Include="packets\send\actor\battle\BattleActionX00Packet.cs" />
|
||||||
<Compile Include="packets\send\actor\battle\BattleActionX18Packet.cs" />
|
<Compile Include="packets\send\actor\battle\BattleActionX18Packet.cs" />
|
||||||
|
|
|
@ -63,24 +63,24 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toPlayer.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, toPlayer.actorId, 0x23, Inventory.EQUIPMENT_OTHERPLAYER));
|
toPlayer.QueuePacket(InventorySetBeginPacket.BuildPacket(owner.actorId, 0x23, Inventory.EQUIPMENT_OTHERPLAYER));
|
||||||
int currentIndex = 0;
|
int currentIndex = 0;
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (items.Count - currentIndex >= 16)
|
if (items.Count - currentIndex >= 16)
|
||||||
toPlayer.QueuePacket(InventoryListX16Packet.BuildPacket(owner.actorId, toPlayer.actorId, items, ref currentIndex));
|
toPlayer.QueuePacket(InventoryListX16Packet.BuildPacket(owner.actorId, items, ref currentIndex));
|
||||||
else if (items.Count - currentIndex > 1)
|
else if (items.Count - currentIndex > 1)
|
||||||
toPlayer.QueuePacket(InventoryListX08Packet.BuildPacket(owner.actorId, toPlayer.actorId, items, ref currentIndex));
|
toPlayer.QueuePacket(InventoryListX08Packet.BuildPacket(owner.actorId, items, ref currentIndex));
|
||||||
else if (items.Count - currentIndex == 1)
|
else if (items.Count - currentIndex == 1)
|
||||||
{
|
{
|
||||||
toPlayer.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, toPlayer.actorId, items[currentIndex]));
|
toPlayer.QueuePacket(InventoryListX01Packet.BuildPacket(owner.actorId, items[currentIndex]));
|
||||||
currentIndex++;
|
currentIndex++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
toPlayer.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId, toPlayer.actorId));
|
toPlayer.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendFullEquipment(bool DoClear)
|
public void SendFullEquipment(bool DoClear)
|
||||||
|
|
|
@ -10,12 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
public const ushort OPCODE = 0x0148;
|
public const ushort OPCODE = 0x0148;
|
||||||
public const uint PACKET_SIZE = 0x90;
|
public const uint PACKET_SIZE = 0x90;
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint playerActorId, InventoryItem item)
|
public static SubPacket BuildPacket(uint sourceActorId, InventoryItem item)
|
||||||
{
|
|
||||||
return BuildPacket(playerActorId, playerActorId, item);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, InventoryItem item)
|
|
||||||
{
|
{
|
||||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
public const ushort OPCODE = 0x0149;
|
public const ushort OPCODE = 0x0149;
|
||||||
public const uint PACKET_SIZE = 0x3A8;
|
public const uint PACKET_SIZE = 0x3A8;
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint playerActorId, List<InventoryItem> items, ref int listOffset)
|
public static SubPacket BuildPacket(uint sourceActorId, List<InventoryItem> items, ref int listOffset)
|
||||||
{
|
|
||||||
return BuildPacket(playerActorId, playerActorId, items, ref listOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, List<InventoryItem> items, ref int listOffset)
|
|
||||||
{
|
{
|
||||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
public const ushort OPCODE = 0x014A;
|
public const ushort OPCODE = 0x014A;
|
||||||
public const uint PACKET_SIZE = 0x720;
|
public const uint PACKET_SIZE = 0x720;
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint playerActorId, List<InventoryItem> items, ref int listOffset)
|
public static SubPacket BuildPacket(uint sourceActorId, List<InventoryItem> items, ref int listOffset)
|
||||||
{
|
|
||||||
return BuildPacket(playerActorId, playerActorId, items, ref listOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, List<InventoryItem> items, ref int listOffset)
|
|
||||||
{
|
{
|
||||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||||
|
|
||||||
|
@ -40,5 +35,6 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
|
|
||||||
return new SubPacket(OPCODE, sourceActorId, data);
|
return new SubPacket(OPCODE, sourceActorId, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
{
|
{
|
||||||
public const ushort OPCODE = 0x0152;
|
public const ushort OPCODE = 0x0152;
|
||||||
public const uint PACKET_SIZE = 0x28;
|
public const uint PACKET_SIZE = 0x28;
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint playerActorID, ushort slot)
|
public static SubPacket BuildPacket(uint playerActorID, ushort slot)
|
||||||
{
|
{
|
||||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||||
|
@ -21,7 +20,6 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
binWriter.Write((UInt16)slot);
|
binWriter.Write((UInt16)slot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SubPacket(OPCODE, playerActorID, data);
|
return new SubPacket(OPCODE, playerActorID, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
{
|
{
|
||||||
public const ushort OPCODE = 0x0153;
|
public const ushort OPCODE = 0x0153;
|
||||||
public const uint PACKET_SIZE = 0x38;
|
public const uint PACKET_SIZE = 0x38;
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
public static SubPacket BuildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
||||||
{
|
{
|
||||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||||
|
@ -36,7 +35,6 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
binWriter.Write((Byte)max);
|
binWriter.Write((Byte)max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SubPacket(OPCODE, playerActorID, data);
|
return new SubPacket(OPCODE, playerActorID, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,12 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
public const ushort OPCODE = 0x0146;
|
public const ushort OPCODE = 0x0146;
|
||||||
public const uint PACKET_SIZE = 0x28;
|
public const uint PACKET_SIZE = 0x28;
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint playerActorId, ushort size, ushort code)
|
public static SubPacket BuildPacket(uint sourceActorId, ushort size, ushort code)
|
||||||
{
|
|
||||||
return BuildPacket(playerActorId, playerActorId, size, code);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, ushort size, ushort code)
|
|
||||||
{
|
{
|
||||||
byte[] data = new byte[8];
|
byte[] data = new byte[8];
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
{
|
{
|
||||||
class InventorySetEndPacket
|
class InventorySetEndPacket
|
||||||
{
|
{
|
||||||
|
|
||||||
public const ushort OPCODE = 0x0147;
|
public const ushort OPCODE = 0x0147;
|
||||||
public const uint PACKET_SIZE = 0x28;
|
public const uint PACKET_SIZE = 0x28;
|
||||||
|
|
||||||
|
@ -13,10 +12,5 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||||
return new SubPacket(OPCODE, playerActorId, new byte[8]);
|
return new SubPacket(OPCODE, playerActorId, new byte[8]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorID)
|
|
||||||
{
|
|
||||||
return new SubPacket(OPCODE, sourceActorId, new byte[8]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue