-
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.
Training room request and response structures
- Loading branch information
Showing
5 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Arrowgene.Ddon.Shared/Entity/PacketStructure/C2STraningRoomGetEnemyListReq.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,22 @@ | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Shared.Network; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure | ||
{ | ||
public class C2STraningRoomGetEnemyListReq : IPacketStructure | ||
{ | ||
public PacketId Id => PacketId.C2S_INSTANCE_TRANING_ROOM_GET_ENEMY_LIST_REQ; | ||
public class Serializer : EntitySerializer<C2STraningRoomGetEnemyListReq> | ||
{ | ||
public override void Write(IBuffer buffer, C2STraningRoomGetEnemyListReq obj) | ||
{ | ||
} | ||
|
||
public override C2STraningRoomGetEnemyListReq Read(IBuffer buffer) | ||
{ | ||
return new C2STraningRoomGetEnemyListReq(); | ||
} | ||
} | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
Arrowgene.Ddon.Shared/Entity/PacketStructure/C2STraningRoomSetEnemyReq.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 C2STraningRoomSetEnemyReq : IPacketStructure | ||
{ | ||
public PacketId Id => PacketId.C2S_INSTANCE_TRANING_ROOM_SET_ENEMY_REQ; | ||
|
||
public uint ID { get; set; } | ||
public uint Lv { get; set; } | ||
|
||
public C2STraningRoomSetEnemyReq() | ||
{ | ||
ID = 0; | ||
Lv = 0; | ||
} | ||
|
||
public class Serializer : EntitySerializer<C2STraningRoomSetEnemyReq> | ||
{ | ||
public override void Write(IBuffer buffer, C2STraningRoomSetEnemyReq obj) | ||
{ | ||
WriteUInt32(buffer, obj.ID); | ||
WriteUInt32(buffer, obj.Lv); | ||
} | ||
|
||
public override C2STraningRoomSetEnemyReq Read(IBuffer buffer) | ||
{ | ||
C2STraningRoomSetEnemyReq obj = new C2STraningRoomSetEnemyReq(); | ||
obj.ID = ReadUInt32(buffer); | ||
obj.Lv = ReadUInt32(buffer); | ||
return obj; | ||
} | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CTraningRoomGetEnemyListRes.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,40 @@ | ||
using System.Collections.Generic; | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Shared.Entity.Structure; | ||
using Arrowgene.Ddon.Shared.Network; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure | ||
{ | ||
public class S2CTraningRoomGetEnemyListRes : ServerResponse | ||
{ | ||
public S2CTraningRoomGetEnemyListRes() | ||
{ | ||
InfoList = new List<CDataTraningRoomEnemyHeader>(); | ||
MaxLv = 100; | ||
} | ||
|
||
public override PacketId Id => PacketId.S2C_INSTANCE_TRANING_ROOM_GET_ENEMY_LIST_RES; | ||
|
||
public List<CDataTraningRoomEnemyHeader> InfoList { get; set; } | ||
public uint MaxLv { get; set; } | ||
|
||
public class Serializer : EntitySerializer<S2CTraningRoomGetEnemyListRes> | ||
{ | ||
public override void Write(IBuffer buffer, S2CTraningRoomGetEnemyListRes obj) | ||
{ | ||
WriteServerResponse(buffer, obj); | ||
WriteEntityList<CDataTraningRoomEnemyHeader>(buffer, obj.InfoList); | ||
WriteUInt32(buffer, obj.MaxLv); | ||
} | ||
|
||
public override S2CTraningRoomGetEnemyListRes Read(IBuffer buffer) | ||
{ | ||
S2CTraningRoomGetEnemyListRes obj = new S2CTraningRoomGetEnemyListRes(); | ||
ReadServerResponse(buffer, obj); | ||
obj.InfoList = ReadEntityList<CDataTraningRoomEnemyHeader>(buffer); | ||
obj.MaxLv = ReadUInt32(buffer); | ||
return obj; | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CTraningRoomSetEnemyRes.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,26 @@ | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Shared.Network; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure | ||
{ | ||
public class S2CTraningRoomSetEnemyRes : ServerResponse | ||
{ | ||
public override PacketId Id => PacketId.S2C_INSTANCE_TRANING_ROOM_SET_ENEMY_RES; | ||
|
||
public class Serializer : EntitySerializer<S2CTraningRoomSetEnemyRes> | ||
{ | ||
public override void Write(IBuffer buffer, S2CTraningRoomSetEnemyRes obj) | ||
{ | ||
WriteServerResponse(buffer, obj); | ||
} | ||
|
||
public override S2CTraningRoomSetEnemyRes Read(IBuffer buffer) | ||
{ | ||
S2CTraningRoomSetEnemyRes obj = new S2CTraningRoomSetEnemyRes(); | ||
ReadServerResponse(buffer, obj); | ||
return obj; | ||
} | ||
} | ||
|
||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
Arrowgene.Ddon.Shared/Entity/Structure/CDataTraningRoomEnemyHeader.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,34 @@ | ||
using System; | ||
using Arrowgene.Buffers; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.Structure | ||
{ | ||
public class CDataTraningRoomEnemyHeader | ||
{ | ||
public CDataTraningRoomEnemyHeader() | ||
{ | ||
ID = 0; | ||
StrName = string.Empty; | ||
} | ||
|
||
public uint ID { get; set; } | ||
public string StrName { get; set; } | ||
|
||
public class Serializer : EntitySerializer<CDataTraningRoomEnemyHeader> | ||
{ | ||
public override void Write(IBuffer buffer, CDataTraningRoomEnemyHeader obj) | ||
{ | ||
WriteUInt32(buffer, obj.ID); | ||
WriteMtString(buffer, obj.StrName); | ||
} | ||
|
||
public override CDataTraningRoomEnemyHeader Read(IBuffer buffer) | ||
{ | ||
CDataTraningRoomEnemyHeader obj = new CDataTraningRoomEnemyHeader(); | ||
obj.ID = ReadUInt32(buffer); | ||
obj.StrName = ReadMtString(buffer); | ||
return obj; | ||
} | ||
} | ||
} | ||
} |