mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 13:47:46 +00:00
Implemented newly discovered packets (Dalamud, Countdown).
This commit is contained in:
parent
9649d755a9
commit
58334a0e5f
3 changed files with 42 additions and 5 deletions
|
@ -523,7 +523,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
public void SendZoneInPackets(WorldManager world, ushort spawnType)
|
||||
{
|
||||
QueuePacket(SetActorIsZoningPacket.BuildPacket(actorId, false));
|
||||
QueuePacket(_0x10Packet.BuildPacket(actorId, 0xFF));
|
||||
QueuePacket(SetDalamudPacket.BuildPacket(actorId, 0));
|
||||
QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.bgmDay, 0x01));
|
||||
QueuePacket(SetWeatherPacket.BuildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1));
|
||||
|
||||
|
@ -1623,6 +1623,11 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
currentEventRunning = null;
|
||||
}
|
||||
|
||||
public void BroadcastCountdown(byte countdownLength, uint startTime)
|
||||
{
|
||||
BroadcastPacket(StartCountdownPacket.BuildPacket(actorId, countdownLength, startTime, "Go!"), true);
|
||||
}
|
||||
|
||||
public void SendInstanceUpdate()
|
||||
{
|
||||
//Server.GetWorldManager().SeamlessCheck(this);
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
using FFXIVClassic.Common;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
{
|
||||
class StartCountdownPacket
|
||||
{
|
||||
public const ushort OPCODE = 0xE5;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, byte countdownLength, uint startTime, string message)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((Byte)countdownLength);
|
||||
binWriter.Seek(8, SeekOrigin.Begin);
|
||||
binWriter.Write((UInt32)startTime);
|
||||
binWriter.Seek(18, SeekOrigin.Begin);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(message), 0, Encoding.ASCII.GetByteCount(message) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(message));
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,12 +5,12 @@ using FFXIVClassic.Common;
|
|||
|
||||
namespace FFXIVClassic_Map_Server.packets.send
|
||||
{
|
||||
class _0x10Packet
|
||||
class SetDalamudPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0010;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint playerActorId, int val)
|
||||
public static SubPacket BuildPacket(uint playerActorId, sbyte dalamudLevel)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace FFXIVClassic_Map_Server.packets.send
|
|||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt32)val);
|
||||
binWriter.Write((Int32)dalamudLevel);
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue