public void SendNotifyEncounterBoss(int mapId, int portalId)
    {
        Coop_Model_RoomNotifyEncounterBoss coop_Model_RoomNotifyEncounterBoss = new Coop_Model_RoomNotifyEncounterBoss();

        coop_Model_RoomNotifyEncounterBoss.id  = 1001;
        coop_Model_RoomNotifyEncounterBoss.mid = mapId;
        coop_Model_RoomNotifyEncounterBoss.pid = portalId;
        MonoBehaviourSingleton <CoopNetworkManager> .I.SendBroadcast(coop_Model_RoomNotifyEncounterBoss, true, null, null);
    }
예제 #2
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);
            }
        }
    }
    protected override bool HandleCoopEvent(CoopPacket packet)
    {
        bool result = false;

        switch (packet.packetType)
        {
        case PACKET_TYPE.ROOM_SYNC_ALL_PORTAL_POINT:
        {
            Coop_Model_RoomSyncAllPortalPoint model16 = packet.GetModel <Coop_Model_RoomSyncAllPortalPoint>();
            coopRoom.OnRecvSyncAllPortalPoint(model16);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_UPDATE_PORTAL_POINT:
        {
            Coop_Model_RoomUpdatePortalPoint model15 = packet.GetModel <Coop_Model_RoomUpdatePortalPoint>();
            coopRoom.OnRecvRoomUpdatePortalPoint(model15);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_SYNC_EXPLORE_BOSS:
        {
            Coop_Model_RoomSyncExploreBoss model14 = packet.GetModel <Coop_Model_RoomSyncExploreBoss>();
            coopRoom.OnRecvSyncExploreBoss(model14);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_SYNC_EXPLORE_BOSS_MAP:
        {
            Coop_Model_RoomSyncExploreBossMap model13 = packet.GetModel <Coop_Model_RoomSyncExploreBossMap>();
            coopRoom.OnRecvSyncExploreBossMap(model13);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_EXPLORE_BOSS_DAMAGE:
        {
            Coop_Model_RoomExploreBossDamage model12 = packet.GetModel <Coop_Model_RoomExploreBossDamage>();
            coopRoom.OnRecvExploreBossDamage(packet.fromClientId, model12);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_EXPLORE_ALIVE:
        {
            Coop_Model_RoomExploreAlive model11 = packet.GetModel <Coop_Model_RoomExploreAlive>();
            coopRoom.OnRecvExploreAlive();
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_EXPLORE_ALIVE_REQUEST:
        {
            Coop_Model_RoomExploreAliveRequest model10 = packet.GetModel <Coop_Model_RoomExploreAliveRequest>();
            coopRoom.OnRecvExploreAliveRequest();
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_EXPLORE_BOSS_DEAD:
        {
            Coop_Model_RoomExploreBossDead model9 = packet.GetModel <Coop_Model_RoomExploreBossDead>();
            result = coopRoom.OnRecvExploreBossDead(model9);
            break;
        }

        case PACKET_TYPE.ROOM_NOTIFY_ENCOUNTER_BOSS:
        {
            Coop_Model_RoomNotifyEncounterBoss model8 = packet.GetModel <Coop_Model_RoomNotifyEncounterBoss>();
            coopRoom.OnRecvNotifyEncounterBoss(packet.fromClientId, model8);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_SYNC_PLAYER_STATUS:
        {
            Coop_Model_RoomSyncPlayerStatus model7 = packet.GetModel <Coop_Model_RoomSyncPlayerStatus>();
            coopRoom.OnRecvSyncPlayerStatus(packet.fromClientId, model7);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_CHAT_STAMP:
        {
            Coop_Model_RoomChatStamp model6 = packet.GetModel <Coop_Model_RoomChatStamp>();
            coopRoom.OnRecvChatStamp(packet.fromClientId, model6);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_MOVE_FIELD:
        {
            Coop_Model_RoomMoveField model5 = packet.GetModel <Coop_Model_RoomMoveField>();
            coopRoom.OnRecvMoveField(model5);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_RUSH_REQUEST:
        {
            Coop_Model_RushRequest model4 = packet.GetModel <Coop_Model_RushRequest>();
            coopRoom.OnRecvRushRequest(packet.fromClientId, model4);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_RUSH_REQUESTED:
        {
            Coop_Model_RushRequested model3 = packet.GetModel <Coop_Model_RushRequested>();
            coopRoom.OnRecvRushRequested(model3);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_SYNC_DEFENSE_BATTLE:
        {
            Coop_Model_RoomSyncDefenseBattle model2 = packet.GetModel <Coop_Model_RoomSyncDefenseBattle>();
            coopRoom.OnRecvSyncDefenseBattle(model2);
            result = true;
            break;
        }

        case PACKET_TYPE.ROOM_NOTIFY_TRACE_BOSS:
        {
            Coop_Model_RoomNotifyTraceBoss model = packet.GetModel <Coop_Model_RoomNotifyTraceBoss>();
            coopRoom.OnRecvNotifyTraceBoss(packet.fromClientId, model);
            result = true;
            break;
        }
        }
        return(result);
    }