void MakeItemOK() { CG_USE_LIVINGSKILL packet = (CG_USE_LIVINGSKILL)PacketDistributed.CreatePacket(MessageID.PACKET_CG_USE_LIVINGSKILL); packet.FormulaID = m_CurFormulaID; if (m_bIsMakeShenQi) { //神器把当前选择的材料装备GUID 带过去 foreach (LivingSkillShenQiStuffLogic stuff in m_StuffGrid.GetComponentsInChildren <LivingSkillShenQiStuffLogic>()) { GameItem stuffItem = GameManager.gameManager.PlayerDataPool.BackPack.GetItemByGuid(stuff.ItemGuid); if (stuffItem != null && stuffItem.IsValid()) { if (stuffItem.IsShenQiEquipMent()) { packet.ShenqiequipGuid = stuff.ItemGuid; } else if (stuffItem.IsEquipMent()) { packet.NormalequipGuid = stuff.ItemGuid; } } } if (null != GameManager.gameManager) { GameManager.gameManager.SoundManager.PlaySoundEffect(28); } //播放特效 延迟发包 if (BackCamerControll.Instance() != null) { BackCamerControll.Instance().PlaySceneEffect(133); } } if (m_bIsMakeSuit) { foreach (LivingSkillShenQiStuffLogic stuff in m_StuffGrid.GetComponentsInChildren <LivingSkillShenQiStuffLogic>()) { GameItem stuffItem = GameManager.gameManager.PlayerDataPool.BackPack.GetItemByGuid(stuff.ItemGuid); if (stuffItem != null && stuffItem.IsValid()) { if (stuffItem.IsEquipMent()) { packet.SuitEquipGuid = stuff.ItemGuid; } } } if (null != GameManager.gameManager) { GameManager.gameManager.SoundManager.PlaySoundEffect(28); } //播放特效 延迟发包 if (BackCamerControll.Instance() != null) { BackCamerControll.Instance().PlaySceneEffect(133); } } packet.SendPacket(); m_bIsMakeShenQi = false; }
public uint Execute(PacketDistributed ipacket) { CG_USE_LIVINGSKILL packet = (CG_USE_LIVINGSKILL )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }