예제 #1
0
        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);
                    }
                }
            }
        }
예제 #2
0
        public static FuBenTongGuanData GiveCopyMapGiftNoScore(GameClient client, FuBenMapItem fuBenMapItem, bool bFirstPass)
        {
            FuBenTongGuanData result;

            if (null == fuBenMapItem)
            {
                result = null;
            }
            else
            {
                List <GoodsData> goodNormal = new List <GoodsData>();
                List <int>       goodsID    = new List <int>();
                WanMotaCopySceneManager.GetFubenItemReward(client, fuBenMapItem, bFirstPass, goodNormal, goodsID);
                if (bFirstPass)
                {
                    WanMotaCopySceneManager.GetFubenItemReward(client, fuBenMapItem, false, goodNormal, goodsID);
                }
                FuBenTongGuanData fuBenTongGuanData = new FuBenTongGuanData();
                fuBenTongGuanData.FuBenID      = fuBenMapItem.FuBenID;
                fuBenTongGuanData.TotalScore   = 0;
                fuBenTongGuanData.KillNum      = 0;
                fuBenTongGuanData.KillScore    = 0;
                fuBenTongGuanData.MaxKillScore = 0;
                fuBenTongGuanData.UsedSecs     = 0;
                fuBenTongGuanData.TimeScore    = 0;
                fuBenTongGuanData.MaxTimeScore = 0;
                fuBenTongGuanData.DieCount     = 0;
                fuBenTongGuanData.DieScore     = 0;
                fuBenTongGuanData.MaxDieScore  = 0;
                fuBenTongGuanData.GoodsIDList  = goodsID;
                string strTitle;
                if (bFirstPass)
                {
                    strTitle = string.Format(GLang.GetLang(570, new object[0]), client.ClientData.WanMoTaNextLayerOrder + 1);
                }
                else
                {
                    strTitle = string.Format(GLang.GetLang(571, new object[0]), client.ClientData.WanMoTaNextLayerOrder + 1);
                }
                if (bFirstPass)
                {
                    fuBenTongGuanData.AwardExp     = fuBenMapItem.nFirstExp + fuBenMapItem.Experience;
                    fuBenTongGuanData.AwardJinBi   = fuBenMapItem.nFirstGold + fuBenMapItem.Money1;
                    fuBenTongGuanData.AwardXingHun = fuBenMapItem.nFirstXingHunAward + fuBenMapItem.nXingHunAward;
                }
                else
                {
                    fuBenTongGuanData.AwardExp     = fuBenMapItem.Experience;
                    fuBenTongGuanData.AwardJinBi   = fuBenMapItem.Money1;
                    fuBenTongGuanData.AwardXingHun = fuBenMapItem.nXingHunAward;
                }
                WanMotaCopySceneManager.AddRewardToClient(client, goodNormal, fuBenTongGuanData.AwardExp, fuBenTongGuanData.AwardJinBi, fuBenTongGuanData.AwardXingHun, strTitle);
                int nWanMoTaNextLayerOrder = GameManager.ClientMgr.GetWanMoTaPassLayerValue(client) + 1;
                GameManager.ClientMgr.SaveWanMoTaPassLayerValue(client, nWanMoTaNextLayerOrder, false);
                client.ClientData.WanMoTaNextLayerOrder = nWanMoTaNextLayerOrder;
                SingletonTemplate <WanMoTaTopLayerManager> .Instance().OnClientPass(client, nWanMoTaNextLayerOrder);

                GameManager.ClientMgr.NotifySelfParamsValueChange(client, RoleCommonUseIntParamsIndexs.WanMoTaCurrLayerOrder, 0);
                WanMoTaDBCommandManager.LayerChangeDBCommand(client, nWanMoTaNextLayerOrder);
                ProcessTask.ProcessRoleTaskVal(client, TaskTypes.WanMoTa, -1);
                result = fuBenTongGuanData;
            }
            return(result);
        }