Пример #1
0
 void intoFubenBack(int missionLevel)
 {
     //判断玩家是否有足够的存储空间
     if (FuBenManagerment.Instance.isStoreFull())
     {
         return;
     }
     UiManager.Instance.openWindow <EmptyWindow> ((win) => {
         EventDelegate.Add(win.OnStartAnimFinish, () => {
             //如果是英雄之章
             HeroRoadIntoFPort port = FPortManager.Instance.getFPort("HeroRoadIntoFPort") as HeroRoadIntoFPort;
             //发阵形
             port.intoRoad(HeroRoadManagerment.Instance.currentHeroRoad.sample.sid, ArmyManager.Instance.activeID, (isFight) => {
                 UserManager.Instance.self.costPoint(1, MissionEventCostType.COST_CHV);
                 if (!isFight)
                 {
                     //进副本保存队伍
                     FuBenIntoFPort.intoMission(mission.sid, missionLevel, -1);
                 }
                 else
                 {
                     MaskWindow.instance.setServerReportWait(true);
                     GameManager.Instance.battleReportCallback = GameManager.Instance.intoBattle;
                     //直接战斗等后台推战报
                 }
             });
         });
     });
 }
Пример #2
0
    public void intoFubenBack(int missionLevel)
    {
        //判断玩家是否有足够的存储空间
        if (FuBenManagerment.Instance.isStoreFull())
        {
            return;
        }

        if (m_sid == 0)
        {
            throw new Exception(this.GetType() + " m_sid is 0!");
        }
        MissionSample sample = MissionSampleManager.Instance.getMissionSampleBySid(m_sid);
        int           type   = ChapterSampleManager.Instance.getChapterSampleBySid(sample.chapterSid).type;

        if (type == ChapterType.HERO_ROAD)
        {
            UiManager.Instance.switchWindow <EmptyWindow> ((win) => {
                EventDelegate.Add(win.OnStartAnimFinish, () => {
                    //如果是英雄之章
                    HeroRoadIntoFPort port = FPortManager.Instance.getFPort("HeroRoadIntoFPort") as HeroRoadIntoFPort;
                    //发阵形
                    port.intoRoad(HeroRoadManagerment.Instance.currentHeroRoad.sample.sid, ArmyManager.Instance.activeID, (isFight) => {
                        UserManager.Instance.self.costPoint(1, MissionEventCostType.COST_CHV);
                        if (!isFight)
                        {
                            //进副本保存队伍
                            FuBenIntoFPort.intoMission(m_sid, missionLevel);
                        }
                        else
                        {
                            MaskWindow.instance.setServerReportWait(true);
                            GameManager.Instance.battleReportCallback = GameManager.Instance.intoBattle;
                            //直接战斗等后台推战报
                        }
                        //	UiManager.Instance.backGroundWindow.hideAllBackGround ();
                    });
                });
            });
        }
        else if (type == ChapterType.WAR)
        {
            FuBenManagerment.Instance.tmpStorageVersion = StorageManagerment.Instance.tmpStorageVersion;
            (FPortManager.Instance.getFPort("FuBenWarAttackFPort") as FuBenWarAttackFPort).attackBoss(m_sid, () => {
                //直接战斗等后台推战报
                MaskWindow.instance.setServerReportWait(true);
                GameManager.Instance.battleReportCallback = GameManager.Instance.intoBattleNoSwitchWindow;
                MissionInfoManager.Instance.saveMission(m_sid, 1);
            });
        }
        else
        {
            FuBenIntoFPort port = FPortManager.Instance.getFPort("FuBenIntoFPort") as FuBenIntoFPort;
            //特殊情况,在新手指引中,进入指定副本
            if (GuideManager.Instance.guideSid == GuideGlobal.SPECIALSID1)
            {
                port.intoFuben(GuideGlobal.SECOND_MISSION_SID, missionLevel, ArmyManager.Instance.getActiveArmy().armyid, FuBenIntoFPort.intoMission);
                return;
            }
            Mission mission = MissionInfoManager.Instance.getMissionBySid(m_sid);
            if (mission.getChapterType() == ChapterType.PRACTICE)
            {
                MissionInfoManager.Instance.saveMission(m_sid, missionLevel);
                port.intoPracticeFuben(m_sid, missionLevel, ArmyManager.Instance.getActiveArmy().armyid, continueIntoMission);
            }
            else
            {
                port.intoFuben(m_sid, missionLevel, ArmyManager.Instance.getActiveArmy().armyid, FuBenIntoFPort.intoMission);
            }
        }
    }