diff --git a/Arrowgene.Ddon.GameServer/DdonGameServer.cs b/Arrowgene.Ddon.GameServer/DdonGameServer.cs index 8091f414b..88256ddb6 100644 --- a/Arrowgene.Ddon.GameServer/DdonGameServer.cs +++ b/Arrowgene.Ddon.GameServer/DdonGameServer.cs @@ -125,6 +125,7 @@ private void LoadPacketHandler() AddHandler(new GroupChatGroupChatGetMemberListHandler(this)); + AddHandler(new InstanceEnemyKillHandler(this)); AddHandler(new InstanceGetEnemySetListHandler(this)); AddHandler(new InstanceGetItemSetListHandler(this)); diff --git a/Arrowgene.Ddon.GameServer/Handler/InstanceEnemyKillHandler.cs b/Arrowgene.Ddon.GameServer/Handler/InstanceEnemyKillHandler.cs new file mode 100644 index 000000000..c15481c72 --- /dev/null +++ b/Arrowgene.Ddon.GameServer/Handler/InstanceEnemyKillHandler.cs @@ -0,0 +1,23 @@ +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 InstanceEnemyKillHandler : StructurePacketHandler + { + private static readonly ServerLogger Logger = LogProvider.Logger(typeof(InstanceEnemyKillHandler)); + + + public InstanceEnemyKillHandler(DdonGameServer server) : base(server) + { + } + + public override void Handle(GameClient client, StructurePacket packet) + { + client.Send(new S2CInstanceEnemyKillRes()); + } + } +} \ No newline at end of file diff --git a/Arrowgene.Ddon.GameServer/Handler/InstanceGetEnemySetListHandler.cs b/Arrowgene.Ddon.GameServer/Handler/InstanceGetEnemySetListHandler.cs index d0fd39469..68acd2120 100644 --- a/Arrowgene.Ddon.GameServer/Handler/InstanceGetEnemySetListHandler.cs +++ b/Arrowgene.Ddon.GameServer/Handler/InstanceGetEnemySetListHandler.cs @@ -31,8 +31,8 @@ public override void Handle(GameClient client, StructurePacket PacketId.C2S_INSTANCE_ENEMY_KILL_REQ; + + public C2SInstanceEnemyKillReq() + { + LayoutId=new CStageLayoutID(); + SetId=0; + InnerId=0; + DropPosX=0; + DropPosY=0; + DropPosZ=0; + IsNoBattleReword=false; + Unk0=false; + RegionFlag=0; + } + + public CStageLayoutID LayoutId { get; set; } + public uint SetId { get; set; } + public uint InnerId { get; set; } + public double DropPosX { get; set; } + public float DropPosY { get; set; } + public double DropPosZ { get; set; } + public bool IsNoBattleReword { get; set; } + public bool Unk0 { get; set; } // It's possible that IsNoBattleReword is this data instead + public uint RegionFlag { get; set; } + + public class Serializer : EntitySerializer + { + public override void Write(IBuffer buffer, C2SInstanceEnemyKillReq obj) + { + WriteEntity(buffer, obj.LayoutId); + WriteUInt32(buffer, obj.SetId); + WriteUInt32(buffer, obj.InnerId); + WriteDouble(buffer, obj.DropPosX); + WriteFloat(buffer, obj.DropPosY); + WriteDouble(buffer, obj.DropPosZ); + WriteBool(buffer, obj.IsNoBattleReword); + WriteBool(buffer, obj.Unk0); + WriteUInt32(buffer, obj.RegionFlag); + } + + public override C2SInstanceEnemyKillReq Read(IBuffer buffer) + { + C2SInstanceEnemyKillReq obj = new C2SInstanceEnemyKillReq(); + obj.LayoutId = ReadEntity(buffer); + obj.SetId = ReadUInt32(buffer); + obj.InnerId = ReadUInt32(buffer); + obj.DropPosX = ReadDouble(buffer); + obj.DropPosY = ReadFloat(buffer); + obj.DropPosZ = ReadDouble(buffer); + obj.IsNoBattleReword = ReadBool(buffer); + obj.Unk0 = ReadBool(buffer); + obj.RegionFlag = ReadUInt32(buffer); + return obj; + } + } + } +} \ No newline at end of file diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CInstanceEnemyKillRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CInstanceEnemyKillRes.cs new file mode 100644 index 000000000..7c9b190ae --- /dev/null +++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CInstanceEnemyKillRes.cs @@ -0,0 +1,36 @@ +using Arrowgene.Buffers; +using Arrowgene.Ddon.Shared.Network; + +namespace Arrowgene.Ddon.Shared.Entity.PacketStructure +{ + public class S2CInstanceEnemyKillRes : ServerResponse + { + public override PacketId Id => PacketId.S2C_INSTANCE_ENEMY_KILL_RES; + + public S2CInstanceEnemyKillRes() + { + EnemyId = 0; + KillNum = 0; + } + + public uint EnemyId { get; set; } + public uint KillNum { get; set; } + + public class Serializer : EntitySerializer + { + public override void Write(IBuffer buffer, S2CInstanceEnemyKillRes obj) + { + WriteUInt32(buffer, obj.EnemyId); + WriteUInt32(buffer, obj.KillNum); + } + + public override S2CInstanceEnemyKillRes Read(IBuffer buffer) + { + S2CInstanceEnemyKillRes obj = new S2CInstanceEnemyKillRes(); + obj.EnemyId = ReadUInt32(buffer); + obj.KillNum = ReadUInt32(buffer); + return obj; + } + } + } +} \ No newline at end of file diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataStageLayoutEnemyPresetEnemyInfoClient.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataStageLayoutEnemyPresetEnemyInfoClient.cs index 57964934a..c4bdc5f12 100644 --- a/Arrowgene.Ddon.Shared/Entity/Structure/CDataStageLayoutEnemyPresetEnemyInfoClient.cs +++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataStageLayoutEnemyPresetEnemyInfoClient.cs @@ -30,7 +30,7 @@ public CDataStageLayoutEnemyPresetEnemyInfoClient() public uint EnemyId { get; set; } public uint NamedEnemyParamsId { get; set; } public uint RaidBossId { get; set; } - public ushort Scale { get; set; } + public ushort Scale { get; set; } // Scale as a percentage, 100(%) is normal public ushort Lv { get; set; } // Level public ushort HmPresetNo { get; set; } // Preset for human enemies? public byte StartThinkTblNo { get; set; } // Start Think Table Number???