Пример #1
0
 public ReaderMtgaOutputLogGreMatchToClient(
     IntermissionReqConverter converterIntermissionReq,
     ConnectRespConverter converterConnectResp,
     MulliganReqConverter converterMulliganReq,
     GameStateMessageConverter converterGameStateMessage,
     SubmitDeckReqConverter converterSubmitDeckAfterGame1,
     DieRollResultsRespConverter dieRollResultsRespConverter,
     SelectNReqConverter selectNReqConverter,
     GroupReqConverter groupReqConverter
     )
 {
     converters.Add(GREMessageType_IntermissionReq, converterIntermissionReq);
     converters.Add(GREMessageType_ConnectResp, converterConnectResp);
     converters.Add(GREMessageType_MulliganReq, converterMulliganReq);
     converters.Add(GREMessageType_GameStateMessage, converterGameStateMessage);
     converters.Add(GREMessageType_QueuedGameStateMessage, converterGameStateMessage);
     converters.Add(GREMessageType_SubmitDeckReq, converterSubmitDeckAfterGame1);
     converters.Add(GREMessageType_DieRollResultsResp, dieRollResultsRespConverter);
     converters.Add(GREMessageType_SelectNReq, selectNReqConverter);
     converters.Add(GREMessageType_GroupReq, groupReqConverter);
 }
        public ReaderMtgaOutputLogUnityCrossThreadLogger(
            GetDecksListV3Converter converterGetDecksListV3,
            GetCombinedRankInfoConverter converterGetCombinedRankInfo,
            GetPlayerV3CardsConverter converterGetPlayerCardsV3,
            GetPlayerInventoryConverter converterGetPlayerInventory,
            MatchCreatedConverter converterMatchCreated,
            RankUpdatedConverter converterRankUpdated,
            InventoryUpdatedConverter converterInventoryUpdated,
            GetActiveEventsV2Converter converterGetActiveEventsV2,
            //DuelSceneGameStopConverter converterDuelSceneGameStop,
            //DuelSceneSideboardingStartConverter duelSceneSideboardingStartConverter,
            //DuelSceneSideboardingStopConverter duelSceneSideboardingStopConverter,
            DeckSubmitConverter converterDeckSubmit,
            //ClientConnectedConverter clientConnectedConverter,
            ReaderMtgaOutputLogGreMatchToClient converterGreMatchToClient,
            // Migrated from ReaderMtgaOutputLogGreMatchToClient
            IntermissionReqConverter converterIntermissionReq,
            ConnectRespConverter converterConnectResp,
            MulliganReqConverter converterMulliganReq,
            GameStateMessageConverter converterGameStateMessage,
            SubmitDeckReqConverter converterSubmitDeckAfterGame1,
            MythicRatingUpdatedConverter mythicRatingUpdatedConverter,
            AuthenticateResponseConverter authenticateResponseConverter,
            GetEventPlayerCourseV2Converter getEventPlayerCourseV2Converter,
            GetEventPlayerCoursesV2Converter getEventPlayerCoursesV2Converter,
            LogInfoRequestConverter logInfoRequestConverter,
            CompleteDraftConverter completeDraftConverter,
            DraftStatusConverter draftStatusConverter,
            DraftMakePickConverter draftMakePickConverter,
            StateChangedConverter stateChangedConverter,
            GetPreconDecksV3Converter getPreconDecksConverter,
            ClientToMatchConverterGeneric clientToMatchConverterGeneric,
            GetSeasonAndRankDetailConverter getSeasonAndRankDetailConverter,
            GetPlayerProgressConverter getPlayerProgressConverter,
            PayEntryConverter payEntryConverter,
            ProgressionGetAllTracksConverter progressionGetAllTracksConverter,
            EventClaimPrizeConverter eventClaimPrizeConverter,
            GetPlayerQuestsConverter getPlayerQuestsConverter,
            PostMatchUpdateConverter postMatchUpdateConverter,
            CrackBoostersConverter crackBoostersConverter,
            CompleteVaultConverter completeVaultConverter,
            JoinPodmakingConverter JoinPodmakingConverter
            )
        {
            converters.Add("GetActiveEventsV2", converterGetActiveEventsV2);
            converters.Add("GetDeckListsV3", converterGetDecksListV3);
            converters.Add("GetCombinedRankInfo", converterGetCombinedRankInfo);
            converters.Add("GetPlayerCardsV3", converterGetPlayerCardsV3);
            converters.Add("GetPlayerInventory", converterGetPlayerInventory);
            converters.Add("==> Event.MatchCreated", converterMatchCreated);
            converters.Add("==> Event.JoinPodmaking", JoinPodmakingConverter);
            converters.Add("Event.DeckSubmit", converterDeckSubmit);
            converters.Add("==> Rank.Updated", converterRankUpdated);
            converters.Add("==> Inventory.Updated", converterInventoryUpdated);
            //converters.Add(UnityCrossThreadLogger_DuelSceneGameStop, converterDuelSceneGameStop);
            //converters.Add(UnityCrossThreadLogger_DuelSceneSideboardingStart, duelSceneSideboardingStartConverter);
            //converters.Add(UnityCrossThreadLogger_DuelSceneSideboardingStop, duelSceneSideboardingStopConverter);
            //converters.Add(UnityCrossThreadLogger_ClientConnected, clientConnectedConverter);
            converters.Add("AuthenticateResponse", authenticateResponseConverter);  // Order is important, `AuthenticateResponse` has priority over `PREFIX_MATCH_TO_CLIENT`
            converters.Add(PREFIX_MATCH_TO_CLIENT, converterGreMatchToClient);
            converters.Add(PREFIX_CLIENT_TO_MATCH, clientToMatchConverterGeneric);
            converters.Add("MythicRating.Updated", mythicRatingUpdatedConverter);
            converters.Add("Event.GetPlayerCourseV2", getEventPlayerCourseV2Converter);
            converters.Add("Event.GetPlayerCoursesV2", getEventPlayerCoursesV2Converter);
            converters.Add("<== Event.CompleteDraft", completeDraftConverter);
            converters.Add("<== Draft.DraftStatus", draftStatusConverter);
            converters.Add("<== Draft.MakePick", draftMakePickConverter);
            converters.Add("STATE CHANGED", stateChangedConverter);
            converters.Add("Deck.GetPreconDecks", getPreconDecksConverter);
            converters.Add("GetPlayerProgress", getPlayerProgressConverter);
            converters.Add("Event.GetSeasonAndRankDetail", getSeasonAndRankDetailConverter);
            converters.Add("Event.PayEntry", payEntryConverter);
            converters.Add("ClaimPrize", eventClaimPrizeConverter);
            converters.Add("Progression.GetAllTracks", progressionGetAllTracksConverter);
            converters.Add("GetPlayerQuests", getPlayerQuestsConverter);
            converters.Add("==> PostMatch.Update", postMatchUpdateConverter);
            converters.Add("PlayerInventory.CrackBoostersV3", crackBoostersConverter);
            converters.Add("PlayerInventory.CompleteVault", completeVaultConverter);
            converters.Add("==> Log", logInfoRequestConverter);                     // Order is important, some events now are in requests (MatchCreated,....)

            // After the Client GRE messages disappeared in July 25 patch
            converters.Add(ReaderMtgaOutputLogGreMatchToClient.GREMessageType_IntermissionReq, converterIntermissionReq);
            //converters.Add(ReaderMtgaOutputLogGreMatchToClient.GREMessageType_ConnectResp, converterConnectResp);
            converters.Add(ReaderMtgaOutputLogGreMatchToClient.GREMessageType_ConnectResp, converterConnectResp);
            converters.Add(ReaderMtgaOutputLogGreMatchToClient.GREMessageType_MulliganReq, converterMulliganReq);
            converters.Add(ReaderMtgaOutputLogGreMatchToClient.GREMessageType_GameStateMessage, converterGameStateMessage);
            converters.Add(ReaderMtgaOutputLogGreMatchToClient.GREMessageType_QueuedGameStateMessage, converterGameStateMessage);
            converters.Add(ReaderMtgaOutputLogGreMatchToClient.GREMessageType_SubmitDeckReq, converterSubmitDeckAfterGame1);
        }