Exemple #1
0
        public override OctetsStream unmarshal(OctetsStream _os_)
        {
            endtype  = _os_.unmarshal_int();
            smid     = _os_.unmarshal_int();
            time     = _os_.unmarshal_int();
            zhangjie = _os_.unmarshal_int();

            //魔盒
            for (int _size_ = _os_.uncompact_uint32(); _size_ > 0; --_size_)
            {
                int key;
                key = _os_.unmarshal_int();

                Mohe _v_ = new Mohe();
                _v_.unmarshal(_os_);
                moheshop.Add(key, _v_);
            }

            //神秘商店
            for (int _size_ = _os_.uncompact_uint32(); _size_ > 0; --_size_)
            {
                int key;
                key = _os_.unmarshal_int();
                Smshopdata _v_ = new Smshopdata();
                _v_.unmarshal(_os_);

                smshop.Add(key, _v_);
            }

            return(_os_);
        }
Exemple #2
0
        public override void Process()
        {
            ObjectSelf.GetInstance().SetIsOpenSealBox(false);
            if (moheshop.Count > 0)
            {
                ObjectSelf.GetInstance().MoheDataClear();
                ObjectSelf.GetInstance().SetIsOpenSealBox(true);
                int nCount = DataTemplate.GetInstance().m_BossboxTable.getDataCount();
                for (int i = 1; i <= nCount; i++)
                {
                    if (moheshop.ContainsKey(i))
                    {
                        Mohe data = moheshop[i] as Mohe;
                        ObjectSelf.GetInstance().MoheDataAdd(data);
                    }
                }
            }
            BattleStageMgr pData = ObjectSelf.GetInstance().BattleStageData;

            if (smid > 0)
            {
                //UnityEngine.Debug.Log("调试:强制修改smid至1310281000 hashTable:" + smshop.Count);
                //smid = 1310281000;
                //time = 600;
                pData.m_IsOpenSpecialStage = true;
                pData.m_SpecialStage.CopyData(smid, time, zhangjie);



                if (smid > 1299999999 && smid < 1400000000)//特殊关卡
                {
                    //GameEventDispatcher.Inst.dispatchEvent(GameEventID.UI_SpecialStageTips, true);
                    UI_FightControler.Inst.SetIsSpecialStage(true);
                }
                else                                        //触发神秘商店
                {
                    if (smshop.Count > 0)
                    {
                        pData.LoadMysteriousShop(smshop);
                        //GameEventDispatcher.Inst.dispatchEvent(GameEventID.UI_MysteriousShopSpecialTips,true);
                        UI_FightControler.Inst.SetIsMysteriousShop(true);
                    }
                }
            }

            if (endtype == END_OK)
            {
                GameEventDispatcher.Inst.dispatchEvent(GameEventID.SE_FightWin);
            }
        }
Exemple #3
0
        public override OctetsStream unmarshal(OctetsStream _os_)
        {
            endtype = _os_.unmarshal_int();
            moheid  = _os_.unmarshal_int();

            //침분
            for (int _size_ = _os_.uncompact_uint32(); _size_ > 0; --_size_)
            {
                int key;
                key = _os_.unmarshal_int();

                Mohe _v_ = new Mohe();
                _v_.unmarshal(_os_);
                moheshop.Add(key, _v_);
            }

            return(_os_);
        }
Exemple #4
0
        public override void Process()
        {
            if (endtype == END_OK)
            {
                int count = 0;
                UI_SealBox.Inst.MoheListClear();
                int nCount = DataTemplate.GetInstance().m_BossboxTable.getDataCount();
                for (int i = 1; i <= nCount; i++)
                {
                    if (moheshop.ContainsKey(i))
                    {
                        Mohe data = moheshop[i] as Mohe;
                        UI_SealBox.Inst.MoheListAdd(data);
                        if (data.place == 0)
                        {
                            count += 1;
                        }
                    }
                }
                UI_SealBox.Inst.SetCurOpenNum(count);
                GameEventDispatcher.Inst.dispatchEvent(GameEventID.F_SealBox);

                //if (moheshop.ContainsKey(moheid))
                //{
                //    Mohe data = moheshop[moheid] as Mohe;
                //    if (data != null && data.isopen == 1)
                //    {
                //        UI_SealBox._inst.SetCurMohe(data);
                //    }
                //    if (data.place == 0)
                //    {
                //        count += 1;
                //    }
                //}
            }
            else
            {
            }
        }