Fixed event status packet using the wrong event type. Changed kickevent in player class to use notice type.

This commit is contained in:
Filip Maj 2020-02-28 00:05:46 -05:00
parent d588dd0348
commit 99c8aff702
3 changed files with 13 additions and 12 deletions

View file

@ -27,12 +27,12 @@ using Meteor.Common;
namespace Meteor.Map.packets.send.actor.events
{
class SetEventStatus
class SetEventStatusPacket
{
public const ushort OPCODE = 0x0136;
public const uint PACKET_SIZE = 0x48;
public static SubPacket BuildPacket(uint sourceActorId, bool enabled, byte unknown2, string conditionName)
public static SubPacket BuildPacket(uint sourceActorId, bool enabled, byte type, string conditionName)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@ -41,7 +41,7 @@ namespace Meteor.Map.packets.send.actor.events
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((UInt32)(enabled ? 1 : 0));
binWriter.Write((Byte)unknown2);
binWriter.Write((Byte)type);
binWriter.Write(Encoding.ASCII.GetBytes(conditionName), 0, Encoding.ASCII.GetByteCount(conditionName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(conditionName));
}
}