public uint Execute(PacketDistributed ipacket) { CG_BUY_GOLDMONEYSHOPGOODS packet = (CG_BUY_GOLDMONEYSHOPGOODS )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
public void MsgBoxBuyGoldMoneyItemOK(int nCurNum) { //nCurNum数量判断 if (nCurNum < 1 || nCurNum > m_LeftCount) { return; } //背包判断 if (GameManager.gameManager.PlayerDataPool.BackPack.GetCanContainerSize() <= 0) { Singleton <ObjManager> .Instance.MainPlayer.SendNoticMsg(false, "#{1903}"); return; } //判断个人公会积分是否够 int nRealCost = m_nPrice * nCurNum; if (nRealCost > 0) { // int nGuildDKP = GameManager.gameManager.PlayerDataPool.Money.GetMoney_Coin(); int nBindYuanBaoCount = GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBaoBind(); if (nRealCost > nBindYuanBaoCount) { //个人公会积分,返回 GUIData.AddNotifyData("#{1018}"); return; } } else { //可能溢出,直接返回 return; } //发送购买消息包 CG_BUY_GOLDMONEYSHOPGOODS msg = (CG_BUY_GOLDMONEYSHOPGOODS)PacketDistributed.CreatePacket(MessageID.PACKET_CG_BUY_GOLDMONEYSHOPGOODS); msg.GoodID = m_GoodsId; msg.BuyNum = nCurNum; msg.GoodIndex = m_GoodsIndex; msg.SendPacket(); }