From 775bbd7c5554bafe0df157a88d5a1bb78fb379b6 Mon Sep 17 00:00:00 2001 From: NguyenVanDat Date: Mon, 2 Feb 2026 16:29:42 +0700 Subject: [PATCH] add ClearEmbedded command --- .../Network/CSNetwork/C2SCommand/C2SCommand.cs | 6 ++++++ .../CSNetwork/C2SCommand/C2SCommandFactory.cs | 14 ++++++++++++++ .../Scripts/Network/CSNetwork/GameSession.cs | 6 ++++++ .../Scripts/Network/UnityGameSession.cs | 4 ++++ 4 files changed, 30 insertions(+) diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs index 106516a128..abe6fe50b2 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs @@ -1600,6 +1600,12 @@ namespace CSNetwork.S2CCommand public int strength; public int agility; } + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct SevClearEmbeddedChipContent + { + public int iEquipIdx; + public int tidEquip; + } } // Player and NPC state \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs index 7ef1385a41..945c82c648 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs @@ -993,5 +993,19 @@ namespace CSNetwork.C2SCommand }; return SerializeCommand(CommandID.SET_STATUS_POINT, pCmd); } + public static Octets CreateNPCSevClearEmbeddedChipCmd(int iEquipIdx, int tidEquip) + { + var cmd = new cmd_sevnpc_serve + { + service_type = NPC_service_type.GP_NPCSEV_CLEAR_TESSERA, + len = (uint)Marshal.SizeOf() + }; + SevClearEmbeddedChipContent content = new SevClearEmbeddedChipContent() + { + iEquipIdx = iEquipIdx, + tidEquip = tidEquip, + }; + return SerializeCommand(CommandID.SEVNPC_SERVE, cmd, content); + } } } diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs index b3fda706b1..b72971090f 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs @@ -1858,5 +1858,11 @@ namespace CSNetwork gamedatasend.Data = C2SCommandFactory.CreateSetStatusPtCmd(vitality, energy, strength, agility); SendProtocol(gamedatasend); } + public void c2s_CmdNPCSevClearEmbeddedChip(int iEquipIdx, int tidEquip) + { + gamedatasend gamedatasend = new gamedatasend(); + gamedatasend.Data = C2SCommandFactory.CreateNPCSevClearEmbeddedChipCmd(iEquipIdx, tidEquip); + SendProtocol(gamedatasend); + } } } \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs b/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs index 0162ca2a57..7eb7779fa6 100644 --- a/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs +++ b/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs @@ -486,6 +486,10 @@ namespace BrewMonster.Network { Instance._gameSession.c2s_SendCmdGivePresent(roleid, mail_id, goods_id, goods_index, goods_slot); } + public static void c2s_CmdNPCSevClearEmbeddedChip(int iEquipIdx, int tidEquip) + { + Instance._gameSession.c2s_CmdNPCSevClearEmbeddedChip(iEquipIdx, tidEquip); + } public void Update() {