-
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 #15 from alborrajo/feature/npcs
Data structures and handlers related to enemy spawning
- Loading branch information
Showing
20 changed files
with
565 additions
and
17 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
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
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
13 changes: 7 additions & 6 deletions
13
Arrowgene.Ddon.GameServer/Handler/StageGetStageListHandler.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 |
---|---|---|
@@ -1,25 +1,26 @@ | ||
using Arrowgene.Ddon.GameServer.Dump; | ||
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 StageGetStageListHandler : PacketHandler<GameClient> | ||
public class StageGetStageListHandler : StructurePacketHandler<GameClient, C2SStageGetStageListReq> | ||
{ | ||
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(StageGetStageListHandler)); | ||
|
||
|
||
public StageGetStageListHandler(DdonGameServer server) : base(server) | ||
{ | ||
} | ||
|
||
public override PacketId Id => PacketId.C2S_STAGE_GET_STAGE_LIST_REQ; | ||
|
||
public override void Handle(GameClient client, Packet packet) | ||
public override void Handle(GameClient client, StructurePacket<C2SStageGetStageListReq> packet) | ||
{ | ||
client.Send(GameDump.Dump_19); | ||
S2CStageGetStageListRes obj = new S2CStageGetStageListRes(); | ||
obj.StageList = (Server as DdonGameServer).StageList; | ||
|
||
client.Send(obj); | ||
} | ||
} | ||
} |
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.Shared/Entity/PacketStructure/C2SQuestGetTutorialQuestListRes.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.Shared.Network; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure | ||
{ | ||
public class C2SQuestGetTutorialQuestListRes : IPacketStructure | ||
{ | ||
public PacketId Id => PacketId.C2S_QUEST_GET_TUTORIAL_QUEST_LIST_REQ; | ||
|
||
public uint StageNo { get; set; } | ||
|
||
public C2SQuestGetTutorialQuestListRes() | ||
{ | ||
StageNo = 0; | ||
} | ||
|
||
public class Serializer : EntitySerializer<C2SQuestGetTutorialQuestListRes> | ||
{ | ||
public override void Write(IBuffer buffer, C2SQuestGetTutorialQuestListRes obj) | ||
{ | ||
WriteUInt32(buffer, obj.StageNo); | ||
} | ||
|
||
public override C2SQuestGetTutorialQuestListRes Read(IBuffer buffer) | ||
{ | ||
C2SQuestGetTutorialQuestListRes obj = new C2SQuestGetTutorialQuestListRes(); | ||
obj.StageNo = ReadUInt32(buffer); | ||
return obj; | ||
} | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SStageAreaChangeReq.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,35 @@ | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Shared.Network; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure | ||
{ | ||
public class C2SStageAreaChangeReq : IPacketStructure | ||
{ | ||
public PacketId Id => PacketId.C2S_STAGE_AREA_CHANGE_REQ; | ||
|
||
public uint StageId { get; set; } | ||
public uint JumpType { get; set; } | ||
|
||
public C2SStageAreaChangeReq() { | ||
StageId=0; | ||
JumpType=0; | ||
} | ||
|
||
public class Serializer : EntitySerializer<C2SStageAreaChangeReq> | ||
{ | ||
public override void Write(IBuffer buffer, C2SStageAreaChangeReq obj) | ||
{ | ||
WriteUInt32(buffer, obj.StageId); | ||
WriteUInt32(buffer, obj.JumpType); | ||
} | ||
|
||
public override C2SStageAreaChangeReq Read(IBuffer buffer) | ||
{ | ||
C2SStageAreaChangeReq obj = new C2SStageAreaChangeReq(); | ||
obj.StageId = ReadUInt32(buffer); | ||
obj.JumpType = ReadUInt32(buffer); | ||
return obj; | ||
} | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SStageGetStageListReq.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 C2SStageGetStageListReq : IPacketStructure | ||
{ | ||
public PacketId Id => PacketId.C2S_STAGE_GET_STAGE_LIST_REQ; | ||
|
||
public class Serializer : EntitySerializer<C2SStageGetStageListReq> | ||
{ | ||
public override void Write(IBuffer buffer, C2SStageGetStageListReq obj) | ||
{ | ||
} | ||
|
||
public override C2SStageGetStageListReq Read(IBuffer buffer) | ||
{ | ||
return new C2SStageGetStageListReq(); | ||
} | ||
} | ||
} | ||
} |
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; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.