add ClearEmbedded command

This commit is contained in:
NguyenVanDat
2026-02-02 16:29:42 +07:00
parent fef0ef4921
commit 775bbd7c55
4 changed files with 30 additions and 0 deletions
@@ -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
@@ -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>()
};
SevClearEmbeddedChipContent content = new SevClearEmbeddedChipContent()
{
iEquipIdx = iEquipIdx,
tidEquip = tidEquip,
};
return SerializeCommand(CommandID.SEVNPC_SERVE, cmd, content);
}
}
}
@@ -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);
}
}
}
@@ -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()
{