-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LoginServer: Add DeleteCharacterHandler
- Loading branch information
1 parent
ea5cee5
commit f641d20
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Arrowgene.Ddon.LoginServer/Handler/DeleteCharacterHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Server.Logging; | ||
using Arrowgene.Ddon.Server.Network; | ||
using Arrowgene.Logging; | ||
using System.Text; | ||
|
||
namespace Arrowgene.Ddon.LoginServer.Handler | ||
{ | ||
public class DeleteCharacterHandler : PacketHandler<LoginClient> | ||
{ | ||
private static readonly DdonLogger Logger = LogProvider.Logger<DdonLogger>(typeof(DeleteCharacterHandler)); | ||
|
||
public DeleteCharacterHandler(DdonLoginServer server) : base(server) | ||
{ | ||
} | ||
|
||
public override PacketId Id => PacketId.C2L_DELETE_CHARACTER_INFO_REQ; | ||
|
||
public override void Handle(LoginClient client, Packet packet) | ||
{ | ||
IBuffer recv = packet.AsBuffer(); | ||
uint characterID = recv.ReadUInt32(Endianness.Big); | ||
Logger.Debug(client, $"Tried to delete character with ID: {characterID}"); | ||
|
||
|
||
IBuffer buffer = new StreamBuffer(); | ||
buffer.WriteInt32(0); //us_error | ||
buffer.WriteUInt32(0, Endianness.Big); | ||
client.Send(new Packet(PacketId.L2C_DELETE_CHARACTER_INFO_RES, buffer.GetAllBytes(), PacketSource.Server)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters