예제 #1
0
    public void OnRecvChatStamp(int fromClientId, Coop_Model_RoomChatStamp model)
    {
        CoopClient coopClient = clients.FindByClientId(fromClientId);

        if (!(coopClient == null))
        {
            Player player = coopClient.GetPlayer();
            if (Object.op_Implicit(player))
            {
                player.ChatSayStamp(model.stampId);
            }
            else if (QuestManager.IsValidInGameExplore())
            {
                ExplorePlayerStatus explorePlayerStatus = MonoBehaviourSingleton <QuestManager> .I.GetExplorePlayerStatus(model.userId);

                if (MonoBehaviourSingleton <UIInGameMessageBar> .IsValid() && MonoBehaviourSingleton <UIInGameMessageBar> .I.get_isActiveAndEnabled() && explorePlayerStatus != null)
                {
                    MonoBehaviourSingleton <UIInGameMessageBar> .I.Announce(explorePlayerStatus.userName, model.stampId);
                }
            }
            if (chatConnection != null)
            {
                if (Object.op_Implicit(player))
                {
                    chatConnection.OnReceiveStamp(coopClient.userId, player.charaName, model.stampId);
                }
                else if (coopClient != null)
                {
                    chatConnection.OnReceiveStamp(coopClient.userId, coopClient.GetPlayerName(), model.stampId);
                }
            }
        }
    }
예제 #2
0
    public void OnRecvNotifyTraceBoss(int fromClientId, Coop_Model_RoomNotifyTraceBoss model)
    {
        if (MonoBehaviourSingleton <QuestManager> .IsValid())
        {
            ExploreStatus.TraceInfo[] bossTraceHistory = MonoBehaviourSingleton <QuestManager> .I.GetBossTraceHistory();

            if (bossTraceHistory == null || bossTraceHistory.Length <= 0 || bossTraceHistory[bossTraceHistory.Length - 1].mapId != model.mid)
            {
                bool       reserve    = false;
                CoopClient coopClient = clients.FindByClientId(fromClientId);
                string     playerName = coopClient.GetPlayerName();
                if (MonoBehaviourSingleton <InGameProgress> .IsValid() && MonoBehaviourSingleton <InGameProgress> .I.progressEndType == InGameProgress.PROGRESS_END_TYPE.NONE)
                {
                    int num = 0;
                    num = ((model.lc != 0) ? 8004 : 8003);
                    string text = StringTable.Format(STRING_CATEGORY.IN_GAME, (uint)num, playerName);
                    UIInGamePopupDialog.PushOpen(text, false, 1.22f);
                }
                else if (QuestManager.IsValidExplore())
                {
                    reserve = true;
                }
                if (QuestManager.IsValidExplore())
                {
                    MonoBehaviourSingleton <QuestManager> .I.UpdateBossTraceHistory(model.mid, model.lc, playerName, reserve);
                }
            }
        }
    }
예제 #3
0
    public void OnRecvNotifyEncounterBoss(int fromClientId, Coop_Model_RoomNotifyEncounterBoss model)
    {
        if (!QuestManager.IsValidInGameExplore() || !MonoBehaviourSingleton <QuestManager> .I.IsExploreBossMap())
        {
            if (!MonoBehaviourSingleton <QuestManager> .I.IsEncountered() && MonoBehaviourSingleton <InGameProgress> .IsValid() && MonoBehaviourSingleton <InGameProgress> .I.progressEndType == InGameProgress.PROGRESS_END_TYPE.NONE)
            {
                CoopClient coopClient = clients.FindByClientId(fromClientId);
                MonoBehaviourSingleton <QuestManager> .I.SetMemberEncounteredMap(model.mid);

                uint currentQuestID = MonoBehaviourSingleton <QuestManager> .I.currentQuestID;
                QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData(currentQuestID);

                int    mainEnemyID = questData.GetMainEnemyID();
                string enemyName   = Singleton <EnemyTable> .I.GetEnemyName((uint)mainEnemyID);

                string text = StringTable.Format(STRING_CATEGORY.IN_GAME, 8000u, coopClient.GetPlayerName(), enemyName);
                UIInGamePopupDialog.PushOpen(text, false, 1.22f);
            }
            if (QuestManager.IsValidExplore())
            {
                MonoBehaviourSingleton <QuestManager> .I.UpdatePortalUsedFlag(model.pid);
            }
        }
    }
예제 #4
0
    public void OnRecvSyncPlayerStatus(int fromClientId, Coop_Model_RoomSyncPlayerStatus model)
    {
        if (QuestManager.IsValidExplore())
        {
            CoopClient coopClient = clients.FindByClientId(fromClientId);
            if (model.hp <= 0 && Object.op_Implicit(coopClient))
            {
                ExplorePlayerStatus explorePlayerStatus = MonoBehaviourSingleton <QuestManager> .I.GetExplorePlayerStatus(coopClient.userId);

                if (explorePlayerStatus != null && explorePlayerStatus.hp > 0 && MonoBehaviourSingleton <UIDeadAnnounce> .IsValid())
                {
                    MonoBehaviourSingleton <UIDeadAnnounce> .I.Announce(UIDeadAnnounce.ANNOUNCE_TYPE.DEAD, coopClient.GetPlayerName());
                }
            }
            MonoBehaviourSingleton <QuestManager> .I.UpdateExplorePlayerStatus(coopClient, model);
        }
    }