mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-20 11:47:48 +00:00
Incorporated the GM packets into the packet processor. Still need to connect it to the DB. Added IssueListPacket and Start/EndGMTicketPacket.
This commit is contained in:
parent
1f7c876461
commit
1b190b1b4f
4 changed files with 86 additions and 2 deletions
|
@ -21,6 +21,7 @@ using FFXIVClassic_Map_Server;
|
|||
using FFXIVClassic_Map_Server.packets.send.script;
|
||||
using FFXIVClassic_Map_Server.packets.send.player;
|
||||
using FFXIVClassic_Map_Server.dataobjects.chara;
|
||||
using FFXIVClassic_Map_Server.packets.send.supportdesk;
|
||||
|
||||
namespace FFXIVClassic_Lobby_Server
|
||||
{
|
||||
|
@ -334,7 +335,32 @@ namespace FFXIVClassic_Lobby_Server
|
|||
break;
|
||||
case 0x012F:
|
||||
subpacket.debugPrintSubPacket();
|
||||
|
||||
break;
|
||||
/* SUPPORT DESK STUFF */
|
||||
//Request for FAQ/Info List
|
||||
case 0x01D0:
|
||||
subpacket.debugPrintSubPacket();
|
||||
client.queuePacket(BasePacket.createPacket(FaqListResponsePacket.buildPacket(player.actorID, new string[]{"Testing FAQ1", "Coded style!"}), true, false));
|
||||
break;
|
||||
//Request for body of a faq/info selection
|
||||
case 0x01D1:
|
||||
client.queuePacket(BasePacket.createPacket(FaqBodyResponsePacket.buildPacket(player.actorID, "HERE IS A GIANT BODY. Nothing else to say!"), true, false));
|
||||
subpacket.debugPrintSubPacket();
|
||||
break;
|
||||
//Request issue list
|
||||
case 0x01D2:
|
||||
client.queuePacket(BasePacket.createPacket(IssueListResponsePacket.buildPacket(player.actorID, new string[] { "Test1", "Test2", "Test3", "Test4", "Test5"}), true, false));
|
||||
subpacket.debugPrintSubPacket();
|
||||
break;
|
||||
//Request for GM response message
|
||||
case 0x01D4:
|
||||
client.queuePacket(BasePacket.createPacket(GMTicketPacket.buildPacket(player.actorID, "This is a GM Ticket Title", "This is a GM Ticket Body."), true, false));
|
||||
subpacket.debugPrintSubPacket();
|
||||
break;
|
||||
//Request to end ticket
|
||||
case 0x01D6:
|
||||
client.queuePacket(BasePacket.createPacket(EndGMTicketPacket.buildPacket(player.actorID), true, false));
|
||||
subpacket.debugPrintSubPacket();
|
||||
break;
|
||||
default:
|
||||
Log.debug(String.Format("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode));
|
||||
|
|
|
@ -12,9 +12,10 @@ namespace FFXIVClassic_Map_Server.packets.send.supportdesk
|
|||
public const ushort OPCODE = 0x01D6;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, bool wasSent)
|
||||
public static SubPacket buildPacket(uint playerActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
data[0] = 1;
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
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.supportdesk
|
||||
{
|
||||
class IssueListResponsePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x01D2;
|
||||
public const uint PACKET_SIZE = 0x160;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, string[] issueStrings)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
for (int i = 0; i < (issueStrings.Length <= 5 ? issueStrings.Length : 5); i++)
|
||||
{
|
||||
binWriter.Seek(0x40 * i, SeekOrigin.Begin);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(issueStrings[i]), 0, Encoding.ASCII.GetByteCount(issueStrings[i]) >= 0x40 ? 0x40 : Encoding.ASCII.GetByteCount(issueStrings[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.supportdesk
|
||||
{
|
||||
class StartGMTicketPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x01D3;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
data[0] = 1;
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue