ModernUO/Projects/Server/Network/Packets/OutgoingGumpPackets.cs
Kamron Batman 353b46fbbd
fix(core): Converts more packets (#383)
- [X] Converts damage packets
- [X] Converts effect packets
- [X] Converts equipment packets
- [X] Converts gump packets
- [X] Converts light packets
- [X] Converts map packets
- [X] Converts menu packets
2021-01-04 23:11:43 -08:00

40 lines
1.6 KiB
C#

/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: OutgoingGumpPackets.cs *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*************************************************************************/
using System.Buffers;
namespace Server.Network
{
public static class OutgoingGumpPackets
{
public static void SendCloseGump(this NetState ns, int typeId, int buttonId)
{
if (ns == null)
{
return;
}
var writer = new SpanWriter(stackalloc byte[13]);
writer.Write((byte)0xBF); // Packet ID
writer.Write((ushort)13);
writer.Write((short)0x04);
writer.Write(typeId);
writer.Write(buttonId);
ns.Send(writer.Span);
}
}
}