public void SendSyncExploreBoss(ExploreStatus explore, int toClientId = -1)
    {
        Coop_Model_RoomSyncExploreBoss coop_Model_RoomSyncExploreBoss = new Coop_Model_RoomSyncExploreBoss();

        coop_Model_RoomSyncExploreBoss.id  = 1001;
        coop_Model_RoomSyncExploreBoss.mId = explore.GetCurrentBossMapId();
        if (explore.bossStatus != null)
        {
            coop_Model_RoomSyncExploreBoss.hp  = explore.bossStatus.hp;
            coop_Model_RoomSyncExploreBoss.hpm = explore.bossStatus.hpMax;
            coop_Model_RoomSyncExploreBoss.bhp = explore.bossStatus.barrierHp;
            coop_Model_RoomSyncExploreBoss.shp = explore.bossStatus.shieldHp;
            coop_Model_RoomSyncExploreBoss.SetRegions(explore.bossStatus.regionWorks);
            coop_Model_RoomSyncExploreBoss.angid   = explore.bossStatus.nowAngryId;
            coop_Model_RoomSyncExploreBoss.eangids = explore.bossStatus.execAngryIds;
            coop_Model_RoomSyncExploreBoss.isMM    = explore.bossStatus.isMadMode;
        }
        else
        {
            coop_Model_RoomSyncExploreBoss.hp = -1;
        }
        if (toClientId > 0)
        {
            MonoBehaviourSingleton <CoopNetworkManager> .I.SendTo(toClientId, coop_Model_RoomSyncExploreBoss, true, null, null);
        }
        else
        {
            MonoBehaviourSingleton <CoopNetworkManager> .I.SendBroadcast(coop_Model_RoomSyncExploreBoss, true, null, null);
        }
    }
    public void InitPortalPointForExplore(ExploreStatus exploreStatus)
    {
        if (current != null && current.fieldPortalInfoList != null)
        {
            foreach (FieldMapPortalInfo fieldPortalInfo in current.fieldPortalInfoList)
            {
                if (fieldPortalInfo.IsValid())
                {
                    FieldMapTable.PortalTableData portalData = Singleton <FieldMapTable> .I.GetPortalData(fieldPortalInfo.portalData.portalID);

                    FieldPortal fieldPortal = new FieldPortal();
                    fieldPortal.pId   = (int)fieldPortalInfo.portalData.portalID;
                    fieldPortal.used  = false;
                    fieldPortal.point = 0;
                    ExplorePortalPoint portalData2 = exploreStatus.GetPortalData(fieldPortal.pId);
                    if (portalData2 != null)
                    {
                        fieldPortal.point = portalData2.point;
                        fieldPortal.used  = (ExplorePortalPoint.USEDFLAG_CLOSED != portalData2.used);
                    }
                    fieldPortalInfo.fieldPortal = fieldPortal;
                }
            }
            _ResetPortalPointToIndex(0);
        }
    }
Beispiel #3
0
 private void Clear()
 {
     if (exploreStatus != null)
     {
         exploreStatus.onChangeExploreMemberList -= OnChangeExploreMemberList;
         exploreStatus = null;
     }
 }
Beispiel #4
0
 public void Initialize(ExploreStatus exploreStatus)
 {
     if (this.exploreStatus != exploreStatus)
     {
         Clear();
         this.exploreStatus = exploreStatus;
         exploreStatus.onChangeExploreMemberList += OnChangeExploreMemberList;
     }
     OnChangeExploreMemberList();
 }
Beispiel #5
0
    public static void QuestStart(Action <bool> call_back = null)
    {
        int           eSetNo  = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.eSetNo;
        int           questId = (int)MonoBehaviourSingleton <QuestManager> .I.currentQuestID;
        bool          currentQuestIsFreeJoin = MonoBehaviourSingleton <QuestManager> .I.currentQuestIsFreeJoin;
        ExploreStatus exploreStatus          = MonoBehaviourSingleton <QuestManager> .I.GetExploreStatus();

        if (MonoBehaviourSingleton <InGameManager> .I.IsRush())
        {
            PartyModel.Party partyData = MonoBehaviourSingleton <PartyManager> .I.partyData;
            questId = partyData.quest.questId;
        }
        MonoBehaviourSingleton <QuestManager> .I.SendQuestStart(questId, eSetNo, currentQuestIsFreeJoin, delegate(bool is_start)
        {
            Logd("QuestStarted:{0}", is_start);
            if (is_start)
            {
                uint num = MonoBehaviourSingleton <QuestManager> .I.GetCurrentMapId();
                if (MonoBehaviourSingleton <QuestManager> .I.IsExplore())
                {
                    num = (uint)MonoBehaviourSingleton <QuestManager> .I.GetExploreStartMapId();
                }
                if (MonoBehaviourSingleton <FieldManager> .I.currentMapID != num)
                {
                    MonoBehaviourSingleton <FieldManager> .I.SetCurrentFieldMapID(num, 0f, 0f, 0f);
                }
                MonoBehaviourSingleton <QuestManager> .I.resultUserCollection.AddSelf();
                if (MonoBehaviourSingleton <QuestManager> .I.GetCurrentQuestType() == QUEST_TYPE.ORDER && MonoBehaviourSingleton <UserInfoManager> .I.userStatus.tutorialQuestId != MonoBehaviourSingleton <QuestManager> .I.GetCurrentQuestId())
                {
                    MonoBehaviourSingleton <QuestManager> .I.isBackGachaQuest = true;
                }
            }
            if (call_back != null)
            {
                call_back(is_start);
            }
        });

        if (exploreStatus != null)
        {
            MonoBehaviourSingleton <QuestManager> .I.SetExploreStatus(exploreStatus);
        }
        if (PartyManager.IsValidInParty())
        {
            PartyModel.Party       partyData2 = MonoBehaviourSingleton <PartyManager> .I.partyData;
            PartyModel.ExploreInfo explore    = partyData2.quest.explore;
            if (explore != null)
            {
                MonoBehaviourSingleton <QuestManager> .I.SetExploreInfo(explore);
            }
        }
    }