public uint Execute(PacketDistributed ipacket) { CG_PAY_SHOPPINGLIST_WAITPAY packet = (CG_PAY_SHOPPINGLIST_WAITPAY )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
void ConfirmOK() { if (m_Type == SHOW_TYPE.TYPE_INVALID) { return; } if (m_Type == SHOW_TYPE.TYPE_PRESENT || m_Type == SHOW_TYPE.TYPE_PAY) { int nPlayerYuanBao = GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBao(); if (nPlayerYuanBao < m_CostYuanBao) { MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1848}"), "", BuyChargeOK); return; } } if (m_Type == SHOW_TYPE.TYPE_PRESENT) { GameManager.gameManager.PlayerDataPool.ShoppingCart.Submit(m_ChooseFriendGuid, m_ChooseFriendName, ShoppingCart.SUBMIT_TYPE.TYPE_PRESENT); } else if (m_Type == SHOW_TYPE.TYPE_WAITPAY) { GameManager.gameManager.PlayerDataPool.ShoppingCart.Submit(m_ChooseFriendGuid, m_ChooseFriendName, ShoppingCart.SUBMIT_TYPE.TYPE_WAITPAY); } else if (m_Type == SHOW_TYPE.TYPE_PAY) { CG_PAY_SHOPPINGLIST_WAITPAY packet = (CG_PAY_SHOPPINGLIST_WAITPAY)PacketDistributed.CreatePacket(MessageID.PACKET_CG_PAY_SHOPPINGLIST_WAITPAY); packet.Guid = m_ChooseShoppingListGuid; packet.SendPacket(); } CleanUp(); if (PresentRootLogic.Instance() != null) { PresentRootLogic.Instance().CleanUp(); } gameObject.SetActive(false); }