mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-21 04:07:48 +00:00
Figured out all main actor states and implemented the stuff properly. Implemented the chocobo/goobbue appearance stuff. Formatted CharaWork a bit.
This commit is contained in:
parent
b04310ef32
commit
7aeb33d884
6 changed files with 96 additions and 20 deletions
|
@ -147,6 +147,8 @@
|
||||||
<Compile Include="packets\send\list\ListStartPacket.cs" />
|
<Compile Include="packets\send\list\ListStartPacket.cs" />
|
||||||
<Compile Include="packets\send\player\SendAchievementRatePacket.cs" />
|
<Compile Include="packets\send\player\SendAchievementRatePacket.cs" />
|
||||||
<Compile Include="packets\send\player\SetCurrentJobPacket.cs" />
|
<Compile Include="packets\send\player\SetCurrentJobPacket.cs" />
|
||||||
|
<Compile Include="packets\send\player\SetCurrentMountGoobbuePacket.cs" />
|
||||||
|
<Compile Include="packets\send\player\SetCurrentMountChocoboPacket.cs" />
|
||||||
<Compile Include="packets\send\player\SetGrandCompanyPacket.cs" />
|
<Compile Include="packets\send\player\SetGrandCompanyPacket.cs" />
|
||||||
<Compile Include="packets\send\actor\SetActorNamePacket.cs" />
|
<Compile Include="packets\send\actor\SetActorNamePacket.cs" />
|
||||||
<Compile Include="packets\send\actor\SetActorPropetyPacket.cs" />
|
<Compile Include="packets\send\actor\SetActorPropetyPacket.cs" />
|
||||||
|
|
|
@ -42,7 +42,8 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
||||||
public uint currentTarget = 0xC0000000;
|
public uint currentTarget = 0xC0000000;
|
||||||
public uint currentLockedTarget = 0xC0000000;
|
public uint currentLockedTarget = 0xC0000000;
|
||||||
|
|
||||||
public uint currentState = SetActorStatePacket.STATE_PASSIVE;
|
public uint currentMainState = SetActorStatePacket.MAIN_STATE_PASSIVE;
|
||||||
|
public uint currentSubState = SetActorStatePacket.SUB_STATE_PLAYER;
|
||||||
|
|
||||||
public CharaWork charaWork = new CharaWork();
|
public CharaWork charaWork = new CharaWork();
|
||||||
public PlayerWork playerWork = new PlayerWork();
|
public PlayerWork playerWork = new PlayerWork();
|
||||||
|
@ -59,7 +60,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
||||||
|
|
||||||
public SubPacket createStatePacket(uint playerActorID)
|
public SubPacket createStatePacket(uint playerActorID)
|
||||||
{
|
{
|
||||||
return SetActorStatePacket.buildPacket(actorId, playerActorID, currentState);
|
return SetActorStatePacket.buildPacket(actorId, playerActorID, currentMainState, currentSubState);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BasePacket createActorSpawnPackets(uint playerActorID)
|
public BasePacket createActorSpawnPackets(uint playerActorID)
|
||||||
|
|
|
@ -9,20 +9,31 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||||
{
|
{
|
||||||
class SetActorStatePacket
|
class SetActorStatePacket
|
||||||
{
|
{
|
||||||
public const ushort OPCODE = 0x0134;
|
public const int MAIN_STATE_PASSIVE = 0;
|
||||||
|
public const int MAIN_STATE_DEAD = 1;
|
||||||
|
public const int MAIN_STATE_ACTIVE = 2;
|
||||||
|
public const int MAIN_STATE_DEAD2 = 3;
|
||||||
|
|
||||||
|
public const int MAIN_STATE_SITTING_OBJECT = 11;
|
||||||
|
public const int MAIN_STATE_SITTING_FLOOR = 13;
|
||||||
|
|
||||||
|
public const int MAIN_STATE_MOUNTED = 15;
|
||||||
|
|
||||||
|
public const int MAIN_STATE_UNKNOWN1 = 0x0E;
|
||||||
|
public const int MAIN_STATE_UNKNOWN2 = 0x1E;
|
||||||
|
public const int MAIN_STATE_UNKNOWN3 = 0x1F;
|
||||||
|
public const int MAIN_STATE_UNKNOWN4 = 0x20;
|
||||||
|
|
||||||
|
//What is this for?
|
||||||
|
public const int SUB_STATE_PLAYER = 0xBF;
|
||||||
|
public const int SUB_STATE_MONSTER = 0x03;
|
||||||
|
|
||||||
|
public const ushort OPCODE = 0x134;
|
||||||
public const uint PACKET_SIZE = 0x28;
|
public const uint PACKET_SIZE = 0x28;
|
||||||
|
|
||||||
public const int STATE_NONE = 0x0000;
|
public static SubPacket buildPacket(uint playerActorID, uint targetID, uint mainState, uint subState)
|
||||||
public const int STATE_DEAD = 0x0303;
|
|
||||||
public const int STATE_PASSIVE = 0xBF00;
|
|
||||||
public const int STATE_ACTIVE = 0xBF02;
|
|
||||||
|
|
||||||
public static SubPacket buildPacket(uint playerActorID, uint targetID, uint state)
|
|
||||||
{
|
{
|
||||||
ulong combined = 0;
|
uint combined = (mainState & 0xFF) | ((subState & 0xFF) << 8);
|
||||||
|
|
||||||
combined |= state;
|
|
||||||
|
|
||||||
return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes(combined));
|
return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes(combined));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
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.player
|
||||||
|
{
|
||||||
|
class SetCurrentMountChocoboPacket
|
||||||
|
{
|
||||||
|
public const int CHOCOBO_NORMAL = 0;
|
||||||
|
|
||||||
|
public const int CHOCOBO_LIMSA1 = 0x1;
|
||||||
|
public const int CHOCOBO_LIMSA2 = 0x2;
|
||||||
|
public const int CHOCOBO_LIMSA3 = 0x3;
|
||||||
|
public const int CHOCOBO_LIMSA4 = 0x4;
|
||||||
|
|
||||||
|
public const int CHOCOBO_GRIDANIA1 = 0x1F;
|
||||||
|
public const int CHOCOBO_GRIDANIA2 = 0x20;
|
||||||
|
public const int CHOCOBO_GRIDANIA3 = 0x21;
|
||||||
|
public const int CHOCOBO_GRIDANIA4 = 0x22;
|
||||||
|
|
||||||
|
public const int CHOCOBO_ULDAH1 = 0x3D;
|
||||||
|
public const int CHOCOBO_ULDAH2 = 0x3E;
|
||||||
|
public const int CHOCOBO_ULDAH3 = 0x3F;
|
||||||
|
public const int CHOCOBO_ULDAH4 = 0x40;
|
||||||
|
|
||||||
|
public const ushort OPCODE = 0x0197;
|
||||||
|
public const uint PACKET_SIZE = 0x28;
|
||||||
|
|
||||||
|
public static SubPacket buildPacket(uint playerActorID, int appearanceId)
|
||||||
|
{
|
||||||
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||||
|
data[5] = (byte)(appearanceId & 0xFF);
|
||||||
|
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
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.player
|
||||||
|
{
|
||||||
|
class SetCurrentMountGoobbuePacket
|
||||||
|
{
|
||||||
|
|
||||||
|
public const ushort OPCODE = 0x01a0;
|
||||||
|
public const uint PACKET_SIZE = 0x28;
|
||||||
|
|
||||||
|
public static SubPacket buildPacket(uint playerActorID, int appearanceId)
|
||||||
|
{
|
||||||
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||||
|
data[0] = (byte)(appearanceId & 0xFF);
|
||||||
|
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue