mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-31 23:06:17 +02:00
Implemented more packets. Implemented zone grid map.
This commit is contained in:
parent
8f7e7d4c0d
commit
b0ab527550
7 changed files with 174 additions and 1 deletions
|
@ -0,0 +1,43 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.Actor
|
||||
{
|
||||
class SetActorNamePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x013D;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint displayNameID, string customName)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt32)displayNameID);
|
||||
|
||||
if (displayNameID == 0xFFFFFFFF)
|
||||
{
|
||||
if (customName.Length <= 0x20)
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(customName));
|
||||
else
|
||||
binWriter.Write(Encoding.ASCII.GetBytes("ERROR: NAME TO BIG"));
|
||||
}
|
||||
|
||||
}
|
||||
data = mem.GetBuffer();
|
||||
}
|
||||
|
||||
SubPacket packet = new SubPacket(OPCODE, playerActorID, targetActorID, data);
|
||||
return packet;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
{
|
||||
class ChangeEquipmentPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x014D;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public const UInt16 SLOT_MAINHAND = 0x00;
|
||||
public const UInt16 SLOT_OFFHAND = 0x01;
|
||||
public const UInt16 SLOT_THROWINGWEAPON = 0x04;
|
||||
public const UInt16 SLOT_PACK = 0x05;
|
||||
public const UInt16 SLOT_POUCH = 0x06;
|
||||
public const UInt16 SLOT_HEAD = 0x08;
|
||||
public const UInt16 SLOT_UNDERSHIRT = 0x09;
|
||||
public const UInt16 SLOT_BODY = 0x0A;
|
||||
public const UInt16 SLOT_UNDERGARMENT = 0x0B;
|
||||
public const UInt16 SLOT_LEGS = 0x0C;
|
||||
public const UInt16 SLOT_HANDS = 0x0D;
|
||||
public const UInt16 SLOT_BOOTS = 0x0E;
|
||||
public const UInt16 SLOT_WAIST = 0x0F;
|
||||
public const UInt16 SLOT_NECK = 0x10;
|
||||
public const UInt16 SLOT_EARS = 0x11;
|
||||
public const UInt16 SLOT_WRISTS = 0x13;
|
||||
public const UInt16 SLOT_RIGHTFINGER = 0x15;
|
||||
public const UInt16 SLOT_LEFTFINGER = 0x16;
|
||||
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, ushort equipSlot, uint inventorySlot)
|
||||
{
|
||||
ulong combined = equipSlot | (inventorySlot << 32);
|
||||
return new SubPacket(OPCODE, 0, playerActorID, BitConverter.GetBytes(combined));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -15,7 +15,8 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
|||
|
||||
public const ushort CODE_ITEMS = 0x0000;
|
||||
public const ushort CODE_CURRANCYITEMS = 0x0063;
|
||||
public const ushort CODE_KEYITEMS = 0x0064;
|
||||
public const ushort CODE_KEYITEMS = 0x0064;
|
||||
public const ushort CODE_EQUIPMENT = 0x00FE;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, ushort size, ushort code)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue