public static void GetWanmotaSweepReward(GameClient client, int nFubenID)
        {
            FuBenMapItem fuBenMapItem = FuBenManager.FindMapCodeByFuBenID(nFubenID, nFubenID);

            if (null != fuBenMapItem)
            {
                List <GoodsData> goodNormal = new List <GoodsData>();
                List <int>       goodsID    = new List <int>();
                WanMotaCopySceneManager.GetFubenItemReward(client, fuBenMapItem, false, goodNormal, goodsID);
                if (null == client.ClientData.LayerRewardData)
                {
                    client.ClientData.LayerRewardData = new LayerRewardData();
                }
                if (WanMotaCopySceneManager.IsWanMoTaMapCode(nFubenID))
                {
                    List <SingleLayerRewardData> listRewardData = null;
                    SingleLayerRewardData        layerReward    = WanMotaCopySceneManager.AddSingleSweepReward(client, goodNormal, nFubenID - WanMotaCopySceneManager.nWanMoTaFirstFuBenOrder + 1, fuBenMapItem.Experience, fuBenMapItem.Money1, fuBenMapItem.nXingHunAward, out listRewardData);
                    SweepWanMotaManager.UpdataSweepInfo(client, listRewardData);
                    lock (client.ClientData.LayerRewardData)
                    {
                        client.ClientData.LayerRewardData.WanMoTaLayerRewardList.Add(layerReward);
                    }
                }
            }
        }
        public static SingleLayerRewardData AddSingleSweepReward(GameClient client, List <GoodsData> goodNormal, int nParamLayerOrder, int nParamExp, int nParamMoney, int nParamXinHun, out List <SingleLayerRewardData> listRewardData)
        {
            SingleLayerRewardData layerReward = new SingleLayerRewardData
            {
                nLayerOrder         = nParamLayerOrder,
                nExp                = nParamExp,
                nMoney              = nParamMoney,
                nXinHun             = nParamXinHun,
                sweepAwardGoodsList = goodNormal
            };

            listRewardData = new List <SingleLayerRewardData>();
            listRewardData.Add(layerReward);
            return(layerReward);
        }
Beispiel #3
0
        /// <summary>
        /// 汇总扫荡奖励
        /// </summary>
        public static List <SingleLayerRewardData> SummarySweepRewardInfo(GameClient client)
        {
            List <SingleLayerRewardData> listRewardData = null;

            if (null == client.ClientData.LayerRewardData || client.ClientData.LayerRewardData.WanMoTaLayerRewardList.Count < 1)
            {
                return(listRewardData);
            }

            int nExp    = 0;
            int nMoney  = 0;
            int nXinHun = 0;
            List <GoodsData> rewardList = new List <GoodsData>();

            lock (client.ClientData.LayerRewardData)
            {
                // 将各层的奖励汇总
                for (int i = 0; i < client.ClientData.LayerRewardData.WanMoTaLayerRewardList.Count; i++)
                {
                    nExp    += client.ClientData.LayerRewardData.WanMoTaLayerRewardList[i].nExp;
                    nMoney  += client.ClientData.LayerRewardData.WanMoTaLayerRewardList[i].nMoney;
                    nXinHun += client.ClientData.LayerRewardData.WanMoTaLayerRewardList[i].nXinHun;

                    if (null != client.ClientData.LayerRewardData.WanMoTaLayerRewardList[i].sweepAwardGoodsList)
                    {
                        for (int j = 0; j < client.ClientData.LayerRewardData.WanMoTaLayerRewardList[i].sweepAwardGoodsList.Count; j++)
                        {
                            CombineGoodList(rewardList, client.ClientData.LayerRewardData.WanMoTaLayerRewardList[i].sweepAwardGoodsList[j]);
                        }
                    }
                }

                SingleLayerRewardData layerReward = WanMotaCopySceneManager.AddSingleSweepReward(client, rewardList, 0,
                                                                                                 nExp, nMoney, nXinHun, out listRewardData);
            }

            return(listRewardData);
        }