예제 #1
0
 private void ShowReconnectingDialog()
 {
     AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
         m_headerText = GameStrings.Get("GLOBAL_RECONNECT_RECONNECTING_HEADER")
     };
     if (this.m_reconnectType == ReconnectType.LOGIN)
     {
         info.m_text = GameStrings.Get("GLOBAL_RECONNECT_RECONNECTING_LOGIN");
     }
     else
     {
         info.m_text = GameStrings.Get("GLOBAL_RECONNECT_RECONNECTING");
     }
     if (ApplicationMgr.CanQuitGame != null)
     {
         info.m_responseDisplay = AlertPopup.ResponseDisplay.CANCEL;
         info.m_cancelText      = GameStrings.Get("GLOBAL_RECONNECT_EXIT_BUTTON");
     }
     else
     {
         info.m_responseDisplay = AlertPopup.ResponseDisplay.NONE;
     }
     info.m_showAlertIcon    = true;
     info.m_responseCallback = new AlertPopup.ResponseCallback(this.OnReconnectingDialogResponse);
     DialogManager.Get().ShowPopup(info, new DialogManager.DialogProcessCallback(this.OnReconnectingDialogProcessed));
 }
예제 #2
0
    private void BnetParty_OnPartyAttributeChanged_DeclineReason(PartyInfo party, string attributeKey, bnet.protocol.attribute.Variant value)
    {
        if (((party.Type == PartyType.FRIENDLY_CHALLENGE) && this.DidSendChallenge()) && value.HasIntValue)
        {
            DeclineReason intValue = (DeclineReason)((int)value.IntValue);
            string        key      = null;
            switch (intValue)
            {
            case DeclineReason.NoValidDeck:
                key = "GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_RECIPIENT_NO_VALID_DECK_SENDER";
                break;

            case DeclineReason.NotUnlocked:
                key = "GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_RECIPIENT_NOT_UNLOCKED_SENDER";
                break;
            }
            if (key != null)
            {
                this.m_hasSeenDeclinedReason = true;
                AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
                    m_headerText      = GameStrings.Get("GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_HEADER"),
                    m_text            = GameStrings.Get(key),
                    m_responseDisplay = AlertPopup.ResponseDisplay.OK
                };
                DialogManager.Get().ShowPopup(info);
            }
        }
    }
예제 #3
0
 private void UpdateGameplayDialog()
 {
     AlertPopup.PopupInfo info = this.m_dialog.GetInfo();
     info.m_responseDisplay  = AlertPopup.ResponseDisplay.OK;
     info.m_responseCallback = new AlertPopup.ResponseCallback(this.OnGameplayDialogResponse);
     this.m_dialog.UpdateInfo(info);
 }
 private void HandleLastFatalBnetError()
 {
     if (this.m_lastFatalBnetErrorInfo != null)
     {
         if (this.m_handleLastFatalBnetErrorNow)
         {
             Network.Get().OnFatalBnetError(this.m_lastFatalBnetErrorInfo);
             this.m_handleLastFatalBnetErrorNow = false;
         }
         else
         {
             string key = (ApplicationMgr.AllowResetFromFatalError == null) ? "GAMEPLAY_DISCONNECT_BODY" : "GAMEPLAY_DISCONNECT_BODY_RESET";
             if (GameMgr.Get().IsSpectator())
             {
                 key = (ApplicationMgr.AllowResetFromFatalError == null) ? "GAMEPLAY_SPECTATOR_DISCONNECT_BODY" : "GAMEPLAY_SPECTATOR_DISCONNECT_BODY_RESET";
             }
             AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
                 m_headerText       = GameStrings.Get("GAMEPLAY_DISCONNECT_HEADER"),
                 m_text             = GameStrings.Get(key),
                 m_showAlertIcon    = true,
                 m_responseDisplay  = AlertPopup.ResponseDisplay.OK,
                 m_responseCallback = new AlertPopup.ResponseCallback(this.OnBnetErrorResponse)
             };
             DialogManager.Get().ShowPopup(info);
         }
         this.m_lastFatalBnetErrorInfo = null;
     }
 }
 public static void OnPlayerChallengeButtonPressed(FriendListChallengeButton challengeButton, BnetPlayer player)
 {
     SoundManager.Get().LoadAndPlay("Small_Click");
     if (ChatMgr.Get().FriendListFrame.IsInEditMode)
     {
         ChatMgr.Get().FriendListFrame.ShowRemoveFriendPopup(player);
     }
     else
     {
         BnetGameAccountId hearthstoneGameAccountId = player.GetHearthstoneGameAccountId();
         SpectatorManager  manager = SpectatorManager.Get();
         if (manager.CanSpectate(player))
         {
             manager.SpectatePlayer(player);
         }
         else if (manager.IsSpectatingMe(hearthstoneGameAccountId))
         {
             AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
                 m_headerText = GameStrings.Get("GLOBAL_SPECTATOR_KICK_PROMPT_HEADER")
             };
             object[] args = new object[] { FriendUtils.GetUniqueName(player) };
             info.m_text             = GameStrings.Format("GLOBAL_SPECTATOR_KICK_PROMPT_TEXT", args);
             info.m_showAlertIcon    = true;
             info.m_responseDisplay  = AlertPopup.ResponseDisplay.CONFIRM_CANCEL;
             info.m_responseCallback = new AlertPopup.ResponseCallback(FriendListFriendFrame.OnKickSpectatorDialogResponse);
             info.m_responseUserData = player;
             DialogManager.Get().ShowPopup(info);
         }
         else if (manager.CanInviteToSpectateMyGame(hearthstoneGameAccountId))
         {
             manager.InviteToSpectateMe(player);
         }
         else if (manager.IsSpectatingPlayer(hearthstoneGameAccountId))
         {
             if ((GameMgr.Get().IsFindingGame() || SceneMgr.Get().IsTransitioning()) || GameMgr.Get().IsTransitionPopupShown())
             {
                 return;
             }
             AlertPopup.PopupInfo info2 = new AlertPopup.PopupInfo {
                 m_headerText       = GameStrings.Get("GLOBAL_SPECTATOR_LEAVE_PROMPT_HEADER"),
                 m_text             = GameStrings.Get("GLOBAL_SPECTATOR_LEAVE_PROMPT_TEXT"),
                 m_showAlertIcon    = true,
                 m_responseDisplay  = AlertPopup.ResponseDisplay.CONFIRM_CANCEL,
                 m_responseCallback = new AlertPopup.ResponseCallback(FriendListFriendFrame.OnLeaveSpectatingDialogResponse)
             };
             DialogManager.Get().ShowPopup(info2);
         }
         else if (!manager.IsInvitedToSpectateMyGame(hearthstoneGameAccountId) && challengeButton.CanChallenge())
         {
             FriendChallengeMgr.Get().SendChallenge(player);
         }
         else
         {
             return;
         }
         challengeButton.UpdateButton();
         ChatMgr.Get().CloseChatUI();
     }
 }
예제 #6
0
 public void MakeConfirmPopUp(string title, string text)
 {
     AlertPopup.PopupInfo popupInfo = new AlertPopup.PopupInfo();
     popupInfo.m_headerText      = title;
     popupInfo.m_text            = text;
     popupInfo.m_responseDisplay = AlertPopup.ResponseDisplay.CONFIRM;
     DialogManager.Get().ShowPopup(popupInfo, null, null);
 }
예제 #7
0
 public void MakeConfirmPopUp(string title, string text)
 {
     AlertPopup.PopupInfo popupInfo = new AlertPopup.PopupInfo();
     popupInfo.m_headerText = title;
     popupInfo.m_text = text;
     popupInfo.m_responseDisplay = AlertPopup.ResponseDisplay.CONFIRM;
     DialogManager.Get().ShowPopup(popupInfo, null, null);
 }
예제 #8
0
 private void ShowGameplayDialog(SceneMgr.Mode nextMode)
 {
     AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
         m_headerText      = GameStrings.Get("GLOBAL_ERROR_NETWORK_TITLE"),
         m_text            = GameStrings.Get("GLOBAL_ERROR_NETWORK_LOST_GAME_CONNECTION"),
         m_responseDisplay = AlertPopup.ResponseDisplay.NONE
     };
     DialogManager.Get().ShowPopup(info, new DialogManager.DialogProcessCallback(this.OnGameplayDialogProcessed), nextMode);
 }
예제 #9
0
 private void OnCancelButtonPressed(UIEvent e)
 {
     AlertPopup.PopupInfo info = new AlertPopup.PopupInfo();
     object[]             args = new object[] { this.m_recruitInfo.Nickname };
     info.m_text             = GameStrings.Format("GLOBAL_FRIENDLIST_CANCEL_RECRUIT_ALERT_MESSAGE", args);
     info.m_showAlertIcon    = true;
     info.m_responseDisplay  = AlertPopup.ResponseDisplay.CONFIRM_CANCEL;
     info.m_responseCallback = new AlertPopup.ResponseCallback(this.OnCancelPopupResponse);
     DialogManager.Get().ShowPopup(info, new DialogManager.DialogProcessCallback(this.OnCancelShown));
 }
예제 #10
0
 private void ShowAlertPopup(string msgGameStringKey)
 {
     AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
         m_text             = GameStrings.Format(msgGameStringKey, new object[0]),
         m_showAlertIcon    = true,
         m_responseDisplay  = AlertPopup.ResponseDisplay.OK,
         m_responseCallback = null
     };
     DialogManager.Get().ShowPopup(info);
 }
예제 #11
0
    public bool ShowDisconnectedGameResult(NetCache.ProfileNoticeDisconnectedGame dcGame)
    {
        object[]             objArray1;
        AlertPopup.PopupInfo info;
        string str;

        if (GameUtils.IsMatchmadeGameType(dcGame.GameType))
        {
            switch (dcGame.GameResult)
            {
            case ProfileNoticeDisconnectedGameResult.GameResult.GR_WINNER:
            case ProfileNoticeDisconnectedGameResult.GameResult.GR_TIE:
                if (dcGame.GameType != GameType.GT_UNKNOWN)
                {
                    info = new AlertPopup.PopupInfo {
                        m_headerText = GameStrings.Get("GLUE_RECONNECT_RESULT_HEADER")
                    };
                    str = null;
                    if (dcGame.GameResult == ProfileNoticeDisconnectedGameResult.GameResult.GR_TIE)
                    {
                        str = "GLUE_RECONNECT_RESULT_TIE";
                        goto Label_00EA;
                    }
                    switch (dcGame.YourResult)
                    {
                    case ProfileNoticeDisconnectedGameResult.PlayerResult.PR_WON:
                        str = "GLUE_RECONNECT_RESULT_WIN";
                        goto Label_00EA;

                    case ProfileNoticeDisconnectedGameResult.PlayerResult.PR_LOST:
                    case ProfileNoticeDisconnectedGameResult.PlayerResult.PR_QUIT:
                        str = "GLUE_RECONNECT_RESULT_LOSE";
                        goto Label_00EA;

                    case ProfileNoticeDisconnectedGameResult.PlayerResult.PR_DISCONNECTED:
                        str = "GLUE_RECONNECT_RESULT_DISCONNECT";
                        goto Label_00EA;
                    }
                    Debug.LogError(string.Format("ReconnectMgr.ShowDisconnectedGameResult() - unhandled player result {0}", dcGame.YourResult));
                }
                return(false);
            }
            Debug.LogError(string.Format("ReconnectMgr.ShowDisconnectedGameResult() - unhandled game result {0}", dcGame.GameResult));
        }
        return(false);

Label_00EA:
        objArray1              = new object[] { this.GetGameTypeName(dcGame.GameType, dcGame.MissionId) };
        info.m_text            = GameStrings.Format(str, objArray1);
        info.m_responseDisplay = AlertPopup.ResponseDisplay.OK;
        info.m_showAlertIcon   = true;
        DialogManager.Get().ShowPopup(info);
        return(true);
    }
 private void OnDeleteButtonPressed(UIEvent e)
 {
     AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
         m_headerText       = GameStrings.Get("GLUE_COLLECTION_DELETE_CONFIRM_HEADER"),
         m_text             = GameStrings.Get("GLUE_COLLECTION_DELETE_CONFIRM_DESC"),
         m_showAlertIcon    = false,
         m_responseDisplay  = AlertPopup.ResponseDisplay.CONFIRM_CANCEL,
         m_responseCallback = new AlertPopup.ResponseCallback(this.OnDeleteButtonConfirmationResponse)
     };
     DialogManager.Get().ShowPopup(info);
 }
예제 #13
0
    private void ShowFriendChallengeWaitingForOpponentDialog(string dialogText, AlertPopup.ResponseCallback callback)
    {
        BnetPlayer myOpponent = FriendChallengeMgr.Get().GetMyOpponent();

        AlertPopup.PopupInfo info = new AlertPopup.PopupInfo();
        object[]             args = new object[] { FriendUtils.GetUniqueName(myOpponent) };
        info.m_text             = GameStrings.Format(dialogText, args);
        info.m_showAlertIcon    = false;
        info.m_responseDisplay  = AlertPopup.ResponseDisplay.CANCEL;
        info.m_responseCallback = callback;
        DialogManager.Get().ShowPopup(info, new DialogManager.DialogProcessCallback(this.OnFriendChallengeWaitingForOpponentDialogProcessed));
    }
예제 #14
0
 private void ShowISentChallengeDialog(BnetPlayer challengee)
 {
     AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
         m_headerText = GameStrings.Get("GLOBAL_FRIEND_CHALLENGE_HEADER")
     };
     object[] args = new object[] { FriendUtils.GetUniqueName(challengee) };
     info.m_text             = GameStrings.Format("GLOBAL_FRIEND_CHALLENGE_OPPONENT_WAITING_RESPONSE", args);
     info.m_showAlertIcon    = false;
     info.m_responseDisplay  = AlertPopup.ResponseDisplay.NONE;
     info.m_responseCallback = new AlertPopup.ResponseCallback(this.OnChallengeSentDialogResponse);
     DialogManager.Get().ShowPopup(info, new DialogManager.DialogProcessCallback(this.OnChallengeSentDialogProcessed));
 }
 private static void ShowWarningDialog(ErrorParams parms)
 {
     parms.m_type = ErrorType.WARNING;
     AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
         m_id               = parms.m_header + parms.m_message,
         m_headerText       = parms.m_header,
         m_text             = parms.m_message,
         m_responseCallback = new AlertPopup.ResponseCallback(Error.OnWarningPopupResponse),
         m_responseUserData = parms,
         m_showAlertIcon    = true
     };
     DialogManager.Get().ShowPopup(info);
 }
예제 #16
0
 private void UpdateChallengeSentDialog()
 {
     if ((this.m_partyId != null) && (this.m_challengeDialog != null))
     {
         AlertPopup           challengeDialog = (AlertPopup)this.m_challengeDialog;
         AlertPopup.PopupInfo info            = challengeDialog.GetInfo();
         if (info != null)
         {
             info.m_responseDisplay = AlertPopup.ResponseDisplay.CANCEL;
             challengeDialog.UpdateInfo(info);
         }
     }
 }
    private void RefreshTavernBrawlInfo(float animDelay)
    {
        this.UpdateEditOrCreate();
        TavernBrawlMission mission = TavernBrawlManager.Get().CurrentMission();

        if ((mission == null) || (mission.missionId < 0))
        {
            AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
                m_headerText       = GameStrings.Get("GLUE_TAVERN_BRAWL_HAS_ENDED_HEADER"),
                m_text             = GameStrings.Get("GLUE_TAVERN_BRAWL_HAS_ENDED_TEXT"),
                m_responseDisplay  = AlertPopup.ResponseDisplay.OK,
                m_responseCallback = new AlertPopup.ResponseCallback(this.RefreshTavernBrawlInfo_ConfirmEnded),
                m_offset           = new Vector3(0f, 104f, 0f)
            };
            DialogManager.Get().ShowPopup(info);
        }
        else
        {
            DbfRecord record = GameDbf.Scenario.GetRecord(mission.missionId);
            this.m_chalkboardHeader.Text = record.GetLocString("NAME");
            this.m_chalkboardInfo.Text   = record.GetLocString("DESCRIPTION");
            base.CancelInvoke("UpdateTimeText");
            base.InvokeRepeating("UpdateTimeText", 0.1f, 0.1f);
            this.UpdateTimeText();
            if (((this.m_chalkboard != null) && (this.m_chalkboard.GetComponent <MeshRenderer>() != null)) && (this.m_chalkboard.GetComponent <MeshRenderer>().material != null))
            {
                Material            material = this.m_chalkboard.GetComponent <MeshRenderer>().material;
                string              name     = record.GetString("TB_TEXTURE");
                UnityEngine.Vector2 zero     = UnityEngine.Vector2.zero;
                if (PlatformSettings.Screen == ScreenCategory.Phone)
                {
                    name   = record.GetString("TB_TEXTURE_PHONE");
                    zero.y = record.GetFloat("TB_TEXTURE_PHONE_OFFSET_Y");
                }
                Texture texture = (name != null) ? AssetLoader.Get().LoadTexture(name, false) : null;
                if (texture == null)
                {
                    bool canCreateDeck = TavernBrawlManager.Get().CurrentMission().canCreateDeck;
                    name    = !canCreateDeck ? ((string)DEFAULT_CHALKBOARD_TEXTURE_NAME_NO_DECK) : ((string)DEFAULT_CHALKBOARD_TEXTURE_NAME_WITH_DECK);
                    zero    = !canCreateDeck ? ((UnityEngine.Vector2)DEFAULT_CHALKBOARD_TEXTURE_OFFSET_NO_DECK) : ((UnityEngine.Vector2)DEFAULT_CHALKBOARD_TEXTURE_OFFSET_WITH_DECK);
                    texture = AssetLoader.Get().LoadTexture(name, false);
                }
                if (texture != null)
                {
                    material.SetTexture("_TopTex", texture);
                    material.SetTextureOffset("_MainTex", zero);
                }
                base.StartCoroutine(this.WaitThenPlayWipeAnim(!this.m_doWipeAnimation ? 0f : animDelay));
            }
        }
    }
예제 #18
0
 private void ChangeDialogToTimeout()
 {
     if (this.m_dialog != null)
     {
         AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
             m_headerText       = GameStrings.Get("GLOBAL_RECONNECT_TIMEOUT_HEADER"),
             m_text             = GameStrings.Get("GLOBAL_RECONNECT_TIMEOUT"),
             m_responseDisplay  = AlertPopup.ResponseDisplay.OK,
             m_showAlertIcon    = true,
             m_responseCallback = new AlertPopup.ResponseCallback(this.OnTimeoutDialogResponse)
         };
         this.m_dialog.UpdateInfo(info);
     }
 }
예제 #19
0
 private void ShowOpponentRemovedFromFriendsDialog(BnetPlayer otherPlayer)
 {
     if (this.m_challengeDialog != null)
     {
         this.m_challengeDialog.Hide();
         this.m_challengeDialog = null;
     }
     AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
         m_headerText = GameStrings.Get("GLOBAL_FRIEND_CHALLENGE_HEADER")
     };
     object[] args = new object[] { FriendUtils.GetUniqueName(otherPlayer) };
     info.m_text            = GameStrings.Format("GLOBAL_FRIEND_CHALLENGE_OPPONENT_FRIEND_REMOVED", args);
     info.m_showAlertIcon   = false;
     info.m_responseDisplay = AlertPopup.ResponseDisplay.OK;
     DialogManager.Get().ShowPopup(info);
 }
    private void OnReadyToStartDisenchant()
    {
        List <string> postDisenchantInvalidDeckNames = this.GetPostDisenchantInvalidDeckNames();

        if (postDisenchantInvalidDeckNames.Count == 0)
        {
            EntityDef entityDef = CraftingManager.Get().GetShownActor().GetEntityDef();
            string    cardId    = entityDef.GetCardId();
            int       num       = CraftingManager.Get().GetNumOwnedCopies(cardId, TAG_PREMIUM.GOLDEN, false);
            int       num2      = CraftingManager.Get().GetNumOwnedCopies(cardId, TAG_PREMIUM.NORMAL, true);
            int       num3      = num + num2;
            if (((CraftingManager.Get().GetNumTransactions() <= 0) && (this.m_lastwarnedCard != cardId)) && ((!entityDef.IsElite() && (num3 <= 2)) || (entityDef.IsElite() && (num3 <= 1))))
            {
                AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
                    m_headerText       = GameStrings.Get("GLUE_CRAFTING_DISENCHANT_CONFIRM_HEADER"),
                    m_text             = GameStrings.Get("GLUE_CRAFTING_DISENCHANT_CONFIRM2_DESC"),
                    m_showAlertIcon    = true,
                    m_responseDisplay  = AlertPopup.ResponseDisplay.CONFIRM_CANCEL,
                    m_responseCallback = new AlertPopup.ResponseCallback(this.OnConfirmDisenchantResponse)
                };
                this.m_lastwarnedCard = cardId;
                DialogManager.Get().ShowPopup(info);
            }
            else
            {
                this.DoDisenchant();
            }
        }
        else
        {
            string str2 = GameStrings.Get("GLUE_CRAFTING_DISENCHANT_CONFIRM_DESC");
            foreach (string str3 in postDisenchantInvalidDeckNames)
            {
                str2 = str2 + "\n" + str3;
            }
            AlertPopup.PopupInfo info2 = new AlertPopup.PopupInfo {
                m_headerText       = GameStrings.Get("GLUE_CRAFTING_DISENCHANT_CONFIRM_HEADER"),
                m_text             = str2,
                m_showAlertIcon    = false,
                m_responseDisplay  = AlertPopup.ResponseDisplay.CONFIRM_CANCEL,
                m_responseCallback = new AlertPopup.ResponseCallback(this.OnConfirmDisenchantResponse)
            };
            DialogManager.Get().ShowPopup(info2);
        }
    }
예제 #21
0
 public override void SpecificHandle(IGameState previous, IGameState next)
 {
     var cardDef = DefLoader.Get().GetCardDef("EX1_383");
     var entDef = DefLoader.Get().GetEntityDef("EX1_383");
     var sourcePos = new Vector3(0, 0, 0);
     if (cardDef == null || entDef == null)
     {
         AlertPopup.PopupInfo popupInfo = new AlertPopup.PopupInfo();
         popupInfo.m_headerText = GameStrings.Get("Error");
         popupInfo.m_text = "Tirion CardDef or EntityDef havent been loaded yet";
         popupInfo.m_responseDisplay = AlertPopup.ResponseDisplay.CONFIRM;
         DialogManager.Get().ShowPopup(popupInfo, null, null);
     }
     else
     {
         CollectionDeckTray.Get().GetDeckBigCard().Show(entDef, TAG_PREMIUM.GOLDEN, cardDef, sourcePos, GhostCard.Type.NONE);
     }
 }
예제 #22
0
 private void ShowOpponentDeclinedChallengeDialog(BnetPlayer challengee)
 {
     if (this.m_challengeDialog != null)
     {
         this.m_challengeDialog.Hide();
         this.m_challengeDialog = null;
     }
     if (!this.m_hasSeenDeclinedReason)
     {
         AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
             m_headerText = GameStrings.Get("GLOBAL_FRIEND_CHALLENGE_HEADER")
         };
         object[] args = new object[] { FriendUtils.GetUniqueName(challengee) };
         info.m_text            = GameStrings.Format("GLOBAL_FRIEND_CHALLENGE_OPPONENT_DECLINED", args);
         info.m_showAlertIcon   = false;
         info.m_responseDisplay = AlertPopup.ResponseDisplay.OK;
         DialogManager.Get().ShowPopup(info);
     }
 }
예제 #23
0
        public override void SpecificHandle(IGameState previous, IGameState next)
        {
            var cardDef   = DefLoader.Get().GetCardDef("EX1_383");
            var entDef    = DefLoader.Get().GetEntityDef("EX1_383");
            var sourcePos = new Vector3(0, 0, 0);

            if (cardDef == null || entDef == null)
            {
                AlertPopup.PopupInfo popupInfo = new AlertPopup.PopupInfo();
                popupInfo.m_headerText      = GameStrings.Get("Error");
                popupInfo.m_text            = "Tirion CardDef or EntityDef havent been loaded yet";
                popupInfo.m_responseDisplay = AlertPopup.ResponseDisplay.CONFIRM;
                DialogManager.Get().ShowPopup(popupInfo, null, null);
            }
            else
            {
                CollectionDeckTray.Get().GetDeckBigCard().Show(entDef, TAG_PREMIUM.GOLDEN, cardDef, sourcePos, GhostCard.Type.NONE);
            }
        }
예제 #24
0
 private void ShowOpponentCanceledChallengeDialog(BnetPlayer otherPlayer)
 {
     if (this.m_challengeDialog != null)
     {
         this.m_challengeDialog.Hide();
         this.m_challengeDialog = null;
     }
     if ((((SceneMgr.Get() == null) || !SceneMgr.Get().IsInGame()) || ((GameState.Get() == null) || GameState.Get().IsGameOverNowOrPending())) || (((GameState.Get().GetOpposingSidePlayer() == null) || (GameState.Get().GetOpposingSidePlayer().GetBnetPlayer() == null)) || ((otherPlayer == null) || (otherPlayer.GetHearthstoneGameAccountId() != GameState.Get().GetOpposingSidePlayer().GetBnetPlayer().GetHearthstoneGameAccountId()))))
     {
         AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
             m_headerText = GameStrings.Get("GLOBAL_FRIEND_CHALLENGE_HEADER")
         };
         object[] args = new object[] { FriendUtils.GetUniqueName(otherPlayer) };
         info.m_text            = GameStrings.Format("GLOBAL_FRIEND_CHALLENGE_OPPONENT_CANCELED", args);
         info.m_showAlertIcon   = false;
         info.m_responseDisplay = AlertPopup.ResponseDisplay.OK;
         DialogManager.Get().ShowPopup(info);
     }
 }
예제 #25
0
    private void TavernBrawl_ReceivedChallenge_OnEnsureServerDataReady_OnDeckContentsReady(long deckId)
    {
        CollectionManager.Get().RemoveDeckContentsListener(new CollectionManager.DelOnDeckContents(this.TavernBrawl_ReceivedChallenge_OnEnsureServerDataReady_OnDeckContentsReady));
        TavernBrawlMission mission  = TavernBrawlManager.Get().CurrentMission();
        string             key      = null;
        DeclineReason?     nullable = null;

        if (mission == null)
        {
            nullable = 0;
        }
        if (((mission != null) && mission.canCreateDeck) && !TavernBrawlManager.Get().HasValidDeck())
        {
            nullable = 2;
            key      = "GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_RECIPIENT_NO_VALID_DECK_RECIPIENT";
        }
        if (key != null)
        {
            AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
                m_headerText = GameStrings.Get("GLOBAL_FRIEND_CHALLENGE_TAVERN_BRAWL_HEADER")
            };
            object[] args = new object[] { FriendUtils.GetUniqueName(this.m_challenger) };
            info.m_text            = GameStrings.Format(key, args);
            info.m_responseDisplay = AlertPopup.ResponseDisplay.OK;
            DialogManager.Get().ShowPopup(info);
        }
        if (nullable.HasValue)
        {
            BnetParty.SetPartyAttributeLong(this.m_partyId, "WTCG.Friendly.DeclineReason", (long)nullable.Value);
            this.DeclineChallenge();
        }
        else
        {
            if (this.IsChallengeTavernBrawl())
            {
                Enum[] enumArray1 = new Enum[] { PresenceStatus.TAVERN_BRAWL_FRIENDLY_WAITING };
                PresenceMgr.Get().SetStatus(enumArray1);
            }
            this.ShowIReceivedChallengeDialog(this.m_challenger);
        }
    }
예제 #26
0
 private void ChangeDialogToReconnected()
 {
     if (this.m_dialog != null)
     {
         AlertPopup.PopupInfo info = new AlertPopup.PopupInfo {
             m_headerText = GameStrings.Get("GLOBAL_RECONNECT_RECONNECTED_HEADER")
         };
         if (this.m_reconnectType == ReconnectType.LOGIN)
         {
             info.m_text = GameStrings.Get("GLOBAL_RECONNECT_RECONNECTED_LOGIN");
         }
         else
         {
             info.m_text = GameStrings.Get("GLOBAL_RECONNECT_RECONNECTED");
         }
         info.m_responseDisplay = AlertPopup.ResponseDisplay.NONE;
         info.m_showAlertIcon   = true;
         this.m_dialog.UpdateInfo(info);
         LoadingScreen.Get().RegisterPreviousSceneDestroyedListener(new LoadingScreen.PreviousSceneDestroyedCallback(this.OnPreviousSceneDestroyed));
     }
 }