mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 22:44:36 +02:00
Added director code to player class and actor namespace.
This commit is contained in:
parent
49a13effca
commit
9c28e966f7
7 changed files with 165 additions and 2 deletions
|
@ -0,0 +1,39 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
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.events
|
||||
{
|
||||
class KickEventPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x012F;
|
||||
public const uint PACKET_SIZE = 0x90;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId, uint targetActorId, string conditionName, List<LuaParam> luaParams)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt32)playerActorId);
|
||||
binWriter.Write((UInt32)targetActorId);
|
||||
binWriter.Write((UInt32)0);
|
||||
binWriter.Write((UInt32)0);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(conditionName), 0, Encoding.ASCII.GetByteCount(conditionName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(conditionName));
|
||||
|
||||
LuaUtils.writeLuaParams(binWriter, luaParams);
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorId, playerActorId, data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue