-
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.
Merge pull request #42 from aaKeyXBM/develop
Not rumi's shortcuts req/res and handler
- Loading branch information
Showing
9 changed files
with
547 additions
and
2 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
25 changes: 25 additions & 0 deletions
25
Arrowgene.Ddon.GameServer/Handler/SetCommunicationShortcutHandler.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,25 @@ | ||
using Arrowgene.Ddon.Server; | ||
using Arrowgene.Ddon.Server.Network; | ||
using Arrowgene.Ddon.Shared.Entity.PacketStructure; | ||
using Arrowgene.Ddon.Shared.Network; | ||
using Arrowgene.Logging; | ||
|
||
namespace Arrowgene.Ddon.GameServer.Handler | ||
{ | ||
public class SetCommunicationShortcutHandler : StructurePacketHandler<GameClient, C2SSetCommunicationShortcutReq> | ||
{ | ||
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(SetCommunicationShortcutHandler)); | ||
|
||
|
||
public SetCommunicationShortcutHandler(DdonGameServer server) : base(server) | ||
{ | ||
} | ||
|
||
public override void Handle(GameClient client, StructurePacket<C2SSetCommunicationShortcutReq> request) | ||
{ | ||
S2CSetCommunicationShortcutRes response = new S2CSetCommunicationShortcutRes(); | ||
|
||
client.Send(response); | ||
} | ||
} | ||
} |
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,27 @@ | ||
using Arrowgene.Ddon.Server; | ||
using Arrowgene.Ddon.Server.Network; | ||
using Arrowgene.Ddon.Shared.Entity.PacketStructure; | ||
using Arrowgene.Ddon.Shared.Network; | ||
using Arrowgene.Logging; | ||
|
||
namespace Arrowgene.Ddon.GameServer.Handler | ||
{ | ||
public class SetShortcutHandler : StructurePacketHandler<GameClient, C2SSetShortcutReq> | ||
{ | ||
//private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(WarpGetWarpPointListHandler)); | ||
|
||
|
||
public SetShortcutHandler(DdonGameServer server) : base(server) | ||
{ | ||
} | ||
|
||
public override void Handle(GameClient client, StructurePacket<C2SSetShortcutReq> request) | ||
{ | ||
S2CSetShortcutRes response = new S2CSetShortcutRes(); | ||
// response.WarpPointID = 0; | ||
// response.Rim = 0; | ||
|
||
client.Send(response); | ||
} | ||
} | ||
} |
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
50 changes: 50 additions & 0 deletions
50
Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SSetCommunicationShortcutReq.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,50 @@ | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Shared.Network; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure | ||
{ | ||
public class C2SSetCommunicationShortcutReq : IPacketStructure | ||
{ | ||
public PacketId Id => PacketId.C2S_PROFILE_SET_COMMUNICATION_SHORTCUT_LIST_REQ; | ||
|
||
public uint PageNo { get; set; } | ||
public uint ButtonNo { get; set; } | ||
public byte Type { get; set; } | ||
public byte Category { get; set; } | ||
public uint ID { get; set; } | ||
|
||
|
||
public C2SSetCommunicationShortcutReq() { | ||
PageNo = 0; | ||
ButtonNo = 0; | ||
Type = 0x00; | ||
Category = 0x00; | ||
ID = 0; | ||
|
||
} | ||
|
||
public class Serializer : PacketEntitySerializer<C2SSetCommunicationShortcutReq> { | ||
public override void Write(IBuffer buffer, C2SSetCommunicationShortcutReq obj) | ||
{ | ||
WriteUInt32(buffer, obj.PageNo); | ||
WriteUInt32(buffer, obj.ButtonNo); | ||
WriteByte(buffer, obj.Type); | ||
WriteByte(buffer, obj.Category); | ||
WriteUInt32(buffer, obj.ID); | ||
} | ||
|
||
public override C2SSetCommunicationShortcutReq Read(IBuffer buffer) | ||
{ | ||
C2SSetCommunicationShortcutReq obj = new C2SSetCommunicationShortcutReq(); | ||
obj.PageNo = ReadUInt32(buffer); | ||
obj.ButtonNo = ReadUInt32(buffer); | ||
obj.Type = ReadByte(buffer); | ||
obj.Category = ReadByte(buffer); | ||
obj.ID = ReadUInt32(buffer); | ||
return obj; | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SSetShortcutReq.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,52 @@ | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Shared.Network; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure | ||
{ | ||
public class C2SSetShortcutReq : IPacketStructure | ||
{ | ||
public PacketId Id => PacketId.C2S_PROFILE_SET_SHORTCUT_LIST_REQ; | ||
|
||
public uint PageNo { get; set; } | ||
public uint ButtonNo { get; set; } | ||
public uint ShortcutID { get; set; } | ||
public uint U32Data { get; set; } | ||
public uint F32Data { get; set; } | ||
public byte ExexType { get; set; } | ||
|
||
public C2SSetShortcutReq() { | ||
PageNo = 0; | ||
ButtonNo = 0; | ||
ShortcutID = 0; | ||
U32Data = 0; | ||
F32Data = 0; | ||
ExexType = 0x00; | ||
} | ||
|
||
public class Serializer : PacketEntitySerializer<C2SSetShortcutReq> { | ||
public override void Write(IBuffer buffer, C2SSetShortcutReq obj) | ||
{ | ||
WriteUInt32(buffer, obj.PageNo); | ||
WriteUInt32(buffer, obj.ButtonNo); | ||
WriteUInt32(buffer, obj.ShortcutID); | ||
WriteUInt32(buffer, obj.U32Data); | ||
WriteUInt32(buffer, obj.F32Data); | ||
WriteByte(buffer, obj.ExexType); | ||
} | ||
|
||
public override C2SSetShortcutReq Read(IBuffer buffer) | ||
{ | ||
C2SSetShortcutReq obj = new C2SSetShortcutReq(); | ||
obj.PageNo = ReadUInt32(buffer); | ||
obj.ButtonNo = ReadUInt32(buffer); | ||
obj.ShortcutID = ReadUInt32(buffer); | ||
obj.U32Data = ReadUInt32(buffer); | ||
obj.F32Data = ReadUInt32(buffer); | ||
obj.ExexType = ReadByte(buffer); | ||
return obj; | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CSetCommunicationShortcutRes.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,31 @@ | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Shared.Network; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure { | ||
public class S2CSetCommunicationShortcutRes : ServerResponse | ||
{ | ||
public override PacketId Id => PacketId.S2C_PROFILE_SET_COMMUNICATION_SHORTCUT_LIST_RES; | ||
|
||
|
||
public S2CSetCommunicationShortcutRes() { | ||
|
||
} | ||
|
||
public class Serializer : PacketEntitySerializer<S2CSetCommunicationShortcutRes> { | ||
public override void Write(IBuffer buffer, S2CSetCommunicationShortcutRes obj) | ||
{ | ||
WriteServerResponse(buffer, obj); | ||
} | ||
|
||
public override S2CSetCommunicationShortcutRes Read(IBuffer buffer) | ||
{ | ||
S2CSetCommunicationShortcutRes obj = new S2CSetCommunicationShortcutRes(); | ||
ReadServerResponse(buffer, obj); | ||
|
||
return obj; | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CSetShortcutRes.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,36 @@ | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Shared.Network; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure { | ||
public class S2CSetShortcutRes : ServerResponse | ||
{ | ||
public override PacketId Id => PacketId.S2C_PROFILE_SET_SHORTCUT_LIST_RES; | ||
|
||
// public uint unk1 { get; set; } | ||
// public uint unk2 { get; set; } | ||
public S2CSetShortcutRes() { | ||
// unk1 = 0; | ||
// unk2 = 0; | ||
} | ||
|
||
public class Serializer : PacketEntitySerializer<S2CSetShortcutRes> { | ||
public override void Write(IBuffer buffer, S2CSetShortcutRes obj) | ||
{ | ||
WriteServerResponse(buffer, obj); | ||
// WriteUInt32(buffer, obj.unk1); | ||
// WriteUInt32(buffer, obj.unk2); | ||
} | ||
|
||
public override S2CSetShortcutRes Read(IBuffer buffer) | ||
{ | ||
S2CSetShortcutRes obj = new S2CSetShortcutRes(); | ||
ReadServerResponse(buffer, obj); | ||
// obj.unk1 = ReadUInt32(buffer); | ||
// obj.unk2 = ReadUInt32(buffer); | ||
return obj; | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.