mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Actor speed packet done, actor position packet implemented.
This commit is contained in:
parent
327dfc656b
commit
f0c914844e
@ -16,6 +16,7 @@ using FFXIVClassic_Map_Server.packets.send;
|
||||
using FFXIVClassic_Map_Server.packets.send.login;
|
||||
using FFXIVClassic_Map_Server.packets.send.Actor.inventory;
|
||||
using FFXIVClassic_Map_Server.packets.send.Actor;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
|
||||
namespace FFXIVClassic_Lobby_Server
|
||||
{
|
||||
@ -181,7 +182,6 @@ namespace FFXIVClassic_Lobby_Server
|
||||
|
||||
BasePacket reply5 = new BasePacket("./packets/login/login5.bin");
|
||||
BasePacket reply6 = new BasePacket("./packets/login/login6_data.bin");
|
||||
BasePacket reply62 = new BasePacket("./packets/login/login6_2.bin");
|
||||
BasePacket reply7 = new BasePacket("./packets/login/login7_data.bin");
|
||||
BasePacket reply8 = new BasePacket("./packets/login/login8_data.bin");
|
||||
BasePacket reply9 = new BasePacket("./packets/login/login9_zonesetup.bin");
|
||||
@ -207,8 +207,12 @@ namespace FFXIVClassic_Lobby_Server
|
||||
client.queuePacket(BasePacket.createPacket(_0x2Packet.buildPacket(player.actorID), true, false));
|
||||
|
||||
client.queuePacket(reply5);
|
||||
|
||||
client.queuePacket(BasePacket.createPacket(AddActorPacket.buildPacket(player.actorID, player.actorID), true, false));
|
||||
|
||||
client.queuePacket(reply6);
|
||||
|
||||
client.queuePacket(BasePacket.createPacket(SetActorPositionPacket.buildPacket(player.actorID, player.actorID, SetActorPositionPacket.INNPOS_X, SetActorPositionPacket.INNPOS_Y, SetActorPositionPacket.INNPOS_Z, SetActorPositionPacket.INNPOS_ROT, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE), true, false));
|
||||
client.queuePacket(BasePacket.createPacket(player.getActor().createSpeedPacket(player.actorID), true, false));
|
||||
client.queuePacket(BasePacket.createPacket(player.getActor().createStatePacket(player.actorID), true, false));
|
||||
|
||||
|
@ -13,16 +13,21 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x00CE;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public const uint SPAWNTYPE_NORMAL = 1;
|
||||
public const uint SPAWNTYPE_WARP1 = 2;
|
||||
public const uint SPAWNTYPE_FADEIN = 0;
|
||||
public const uint SPAWNTYPE_PLAYERWAKE = 1;
|
||||
public const uint SPAWNTYPE_WARP_DUTY = 2;
|
||||
public const uint SPAWNTYPE_WARP2 = 3;
|
||||
public const uint SPAWNTYPE_WARP3 = 4;
|
||||
public const uint SPAWNTYPE_WARP_YELLOW = 5;
|
||||
public const uint SPAWNTYPE_WARP_DUTY2 = 6;
|
||||
public const uint SPAWNTYPE_WARP_LIGHT = 7;
|
||||
|
||||
public const float INNPOS_X = 157.550003f;
|
||||
public const float INNPOS_Y = 000.000000f;
|
||||
public const float INNPOS_Z = 165.050003f;
|
||||
public const float INNPOS_ROT = -1.530000f;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint actorID, float x, float y, float z, float rotation)
|
||||
public static SubPacket buildPacket(uint sourceActorID, uint targetActorID, float x, float y, float z, float rotation, uint spawnType)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE-0x20];
|
||||
|
||||
@ -31,15 +36,19 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((Int32)0);
|
||||
binWriter.Write((Int32)0);
|
||||
binWriter.Write((Int32)sourceActorID);
|
||||
binWriter.Write((Single)x);
|
||||
binWriter.Write((Single)y);
|
||||
binWriter.Write((Single)z);
|
||||
binWriter.Write((Single)rotation);
|
||||
|
||||
binWriter.BaseStream.Seek(0x24, SeekOrigin.Begin);
|
||||
|
||||
binWriter.Write((UInt32)spawnType);
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, actorID, data);
|
||||
return new SubPacket(OPCODE, sourceActorID, targetActorID, data);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,86 @@
|
||||
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 SetActorSpeedPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x00D0;
|
||||
public const uint PACKET_SIZE = 0xA8;
|
||||
|
||||
public const ushort DEFAULT_STOP = 0x0000;
|
||||
public const ushort DEFAULT_WALK = 0x4000;
|
||||
public const ushort DEFAULT_RUN = 0x40A0;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt16)00);
|
||||
binWriter.Write((UInt16)DEFAULT_STOP);
|
||||
binWriter.Write((UInt32)0);
|
||||
|
||||
binWriter.Write((UInt16)00);
|
||||
binWriter.Write((UInt16)DEFAULT_WALK);
|
||||
binWriter.Write((UInt32)1);
|
||||
|
||||
binWriter.Write((UInt16)00);
|
||||
binWriter.Write((UInt16)DEFAULT_RUN);
|
||||
binWriter.Write((UInt32)2);
|
||||
|
||||
binWriter.Write((UInt16)00);
|
||||
binWriter.Write((UInt16)DEFAULT_RUN);
|
||||
binWriter.Write((UInt32)3);
|
||||
|
||||
binWriter.BaseStream.Seek(0x80, SeekOrigin.Begin);
|
||||
|
||||
binWriter.Write((UInt32)5);
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, targetActorID, data);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, ushort stopSpeed, ushort walkSpeed, ushort runSpeed)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt16)00);
|
||||
binWriter.Write((UInt16)stopSpeed);
|
||||
binWriter.Write((UInt32)0);
|
||||
|
||||
binWriter.Write((UInt16)00);
|
||||
binWriter.Write((UInt16)walkSpeed);
|
||||
binWriter.Write((UInt32)1);
|
||||
|
||||
binWriter.Write((UInt16)00);
|
||||
binWriter.Write((UInt16)runSpeed);
|
||||
binWriter.Write((UInt32)2);
|
||||
|
||||
binWriter.Write((UInt16)00);
|
||||
binWriter.Write((UInt16)runSpeed);
|
||||
binWriter.Write((UInt32)3);
|
||||
|
||||
binWriter.BaseStream.Seek(0x90, SeekOrigin.Begin);
|
||||
|
||||
binWriter.Write((UInt32)5);
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, targetActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user