Esempio n. 1
0
 public void ExcuteAfterFunDelegate()
 {
     if (this.m_AfterFunDelegate != null)
     {
         this.m_AfterFunDelegate();
         this.m_AfterFunDelegate      = null;
         this.m_kCurrentGameGuideInfo = null;
     }
 }
Esempio n. 2
0
    public void InitGameGuide()
    {
        if (this.m_kCurrentGameGuideInfo != null)
        {
            this.m_kCurrentGameGuideInfo.InitData();
            this.m_kCurrentGameGuideInfo = null;
        }
        NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.BUBBLEGAMEGUIDE_DLG);

        this.m_bExecuteGuide = false;
    }
Esempio n. 3
0
 public void ExcuteGameGuide()
 {
     if (this.m_kCurrentGameGuideInfo != null && this.m_kCurrentGameGuideInfo.m_eType != GameGuideType.DEFAULT)
     {
         this.m_kCurrentGameGuideInfo.ExcuteGameGuide();
     }
     if (this.m_AfterFunDelegate == null && this.m_kCurrentGameGuideInfo.m_eType != GameGuideType.EQUIP_ITEM)
     {
         this.m_kCurrentGameGuideInfo = null;
     }
     NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.BUBBLEGAMEGUIDE_DLG);
 }
Esempio n. 4
0
    private void RepositionControl()
    {
        base.SetSize(GUICamera.width, base.GetSizeY());
        base.SetLocation(0f, GUICamera.height - base.GetSizeY());
        this.backImage.SetSize(GUICamera.width, this.backImage.height);
        this.close.SetLocation(GUICamera.width - this.close.GetSize().x - 10f, this.close.GetLocationY());
        GameGuideInfo gameGuideInfo = NrTSingleton <GameGuideManager> .Instance.GetGameGuideInfo();

        if (gameGuideInfo != null)
        {
            if (gameGuideInfo.m_eType != GameGuideType.DEFAULT)
            {
                if (NrTSingleton <ContentsLimitManager> .Instance.IsHeroBattle())
                {
                    if (gameGuideInfo.m_eType == GameGuideType.EQUIP_SELL || gameGuideInfo.m_eType == GameGuideType.SUPPORT_GOLD || gameGuideInfo.m_eType == GameGuideType.MINE_ITEMGET || gameGuideInfo.m_eType == GameGuideType.PURCHASE_RESTORE || gameGuideInfo.m_eType == GameGuideType.EXPEDITION_ITEMGET)
                    {
                        this.close.Visible = false;
                    }
                }
                else if (gameGuideInfo.m_eType == GameGuideType.EQUIP_SELL || gameGuideInfo.m_eType == GameGuideType.MINE_ITEMGET || gameGuideInfo.m_eType == GameGuideType.PURCHASE_RESTORE || gameGuideInfo.m_eType == GameGuideType.EXPEDITION_ITEMGET)
                {
                    this.close.Visible = false;
                }
                this.excute.Visible = true;
                this.excute.Text    = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1860");

                this.excute.SetLocation(GUICamera.width - this.excute.GetSize().x - 10f, this.excute.GetLocationY());
            }
            else
            {
                this.excute.Visible = false;
            }
        }
        else
        {
            this.excute.Visible = false;
        }
        float x = (GUICamera.width - this.m_CenterNpcImage.GetSize().x) / 2f;

        this.m_CenterNpcImage.SetLocation(x, this.m_CenterNpcImage.GetLocationY());
        x = (GUICamera.width - this.m_CenterNpcName.GetSize().x) / 2f;
        this.m_CenterNpcName.SetLocation(x, this.m_CenterNpcName.GetLocationY());
        x = (GUICamera.width - this.m_CenterNpcNameBack[0].GetSize().x) / 2f + this.m_CenterNpcNameBack[0].GetSize().x / 2f;
        this.m_CenterNpcNameBack[0].SetLocation(x, this.m_CenterNpcNameBack[0].GetLocationY());
        x = this.m_CenterNpcNameBack[0].GetLocationX();
        this.m_CenterNpcNameBack[1].SetLocation(x, this.m_CenterNpcNameBack[1].GetLocationY());
        x = (GUICamera.width - this.m_CenterNpcNameBack[2].GetSize().x) / 2f + this.m_CenterNpcNameBack[2].GetSize().x / 2f;
        this.m_CenterNpcNameBack[2].SetLocation(x, this.m_CenterNpcNameBack[2].GetLocationY());
        x = this.m_CenterNpcNameBack[2].GetLocationX();
        this.m_CenterNpcNameBack[3].SetLocation(x, this.m_CenterNpcNameBack[3].GetLocationY());
    }
Esempio n. 5
0
 public void Set(GameGuideInfo gameGuideInfo)
 {
     this.m_nUnique          = gameGuideInfo.m_nUnique;
     this.m_eType            = gameGuideInfo.m_eType;
     this.m_eCheck           = gameGuideInfo.m_eCheck;
     this.m_nPriority        = gameGuideInfo.m_nPriority;
     this.m_nMinLevel        = gameGuideInfo.m_nMinLevel;
     this.m_nMaxLevel        = gameGuideInfo.m_nMaxLevel;
     this.m_strBaloonTextKey = gameGuideInfo.m_strBaloonTextKey;
     this.m_strTalkKey       = gameGuideInfo.m_strTalkKey;
     this.m_strButtonKey     = gameGuideInfo.m_strButtonKey;
     this.m_nDelayTime       = gameGuideInfo.m_nDelayTime;
     this.m_objData          = gameGuideInfo.m_objData;
     this.m_nCheckTime       = gameGuideInfo.m_nCheckTime;
 }
Esempio n. 6
0
    public void SetTalkText()
    {
        this.currentGameGuideInfo = NrTSingleton <GameGuideManager> .Instance.GetGameGuideInfo();

        if (this.currentGameGuideInfo != null)
        {
            if (this.currentGameGuideInfo.m_eType == GameGuideType.DEFAULT)
            {
                this.talkText.SetFlashLabel(NrTSingleton <GameGuideManager> .Instance.GetDefaultGuideText());
            }
            else
            {
                this.talkText.SetFlashLabel(NrTSingleton <GameGuideManager> .Instance.GetGameGuideText());
                this.excute.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(this.currentGameGuideInfo.m_strButtonKey);

                if (this.currentGameGuideInfo.m_eType == GameGuideType.EQUIP_ITEM)
                {
                    GameGuideEquip gameGuideEquip = this.currentGameGuideInfo as GameGuideEquip;
                    if (gameGuideEquip != null)
                    {
                        base.SetShowLayer(2, true);
                        if (gameGuideEquip.GetSrcItem() != null && gameGuideEquip.GetDestItem() == null)
                        {
                            this.item1.ClearData();
                            this.item1.SetTexture("Win_T_ItemEmpty");
                            this.item2.SetItemTexture(gameGuideEquip.GetSrcItem());
                        }
                        else if (gameGuideEquip.GetSrcItem() != null && gameGuideEquip.GetDestItem() != null)
                        {
                            this.item1.SetItemTexture(gameGuideEquip.GetDestItem());
                            this.backItem1.SetTexture(gameGuideEquip.GetDestItem().GetRankImage());
                            this.item2.SetItemTexture(gameGuideEquip.GetSrcItem());
                        }
                    }
                }
                else if (this.currentGameGuideInfo.m_eType == GameGuideType.EQUIP_SELL && NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().GetEquipSellMoney() == 0L && NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().EquipMoneyAttackPlunder)
                {
                    NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().EquipMoneyAttackPlunder = false;

                    this.excute.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("10"));
                }
            }
        }
    }
Esempio n. 7
0
    public override void SetData(TsDataReader.Row row)
    {
        this.gameGuideInfo = new GameGuideInfo();
        int num = 0;

        row.GetColumn(num++, out this.gameGuideInfo.m_nUnique);
        string empty = string.Empty;

        row.GetColumn(num++, out empty);
        if (Enum.IsDefined(typeof(GameGuideType), empty))
        {
            this.gameGuideInfo.m_eType = (GameGuideType)((int)Enum.Parse(typeof(GameGuideType), empty));
        }
        empty = string.Empty;
        row.GetColumn(num++, out empty);
        this.gameGuideInfo.m_eCheck = (GameGuideCheck)((int)Enum.Parse(typeof(GameGuideCheck), empty));
        row.GetColumn(num++, out this.gameGuideInfo.m_nPriority);
        row.GetColumn(num++, out this.gameGuideInfo.m_nMinLevel);
        row.GetColumn(num++, out this.gameGuideInfo.m_nMaxLevel);
        row.GetColumn(num++, out this.gameGuideInfo.m_strBaloonTextKey);
        row.GetColumn(num++, out this.gameGuideInfo.m_strTalkKey);
        row.GetColumn(num++, out this.gameGuideInfo.m_nDelayTime);
        row.GetColumn(num++, out this.gameGuideInfo.m_strButtonKey);
    }
Esempio n. 8
0
    public void Update()
    {
        if (Scene.CurScene != Scene.Type.WORLD)
        {
            return;
        }
        if (Time.realtimeSinceStartup - this.checkTime > this.delayTime)
        {
            foreach (GameGuideInfo current in this.m_GameGuide)
            {
                if (current.m_eCheck == GameGuideCheck.CYCLECAL)
                {
                    if (this.m_kCurrentGameGuideInfo == null || this.m_kCurrentGameGuideInfo.m_eType != current.m_eType)
                    {
                        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

                        if (myCharInfo == null)
                        {
                            break;
                        }
                        if (current.GetMinLevel() <= myCharInfo.GetLevel() && current.GetMaxLevel() >= myCharInfo.GetLevel() && current.CheckGameGuide())
                        {
                            bool flag = false;
                            foreach (GameGuideInfo current2 in this.m_kReserveGuide)
                            {
                                if (current2.m_eType == current.m_eType)
                                {
                                    flag = true;
                                    break;
                                }
                            }
                            if (!flag)
                            {
                                this.m_kReserveGuide.Enqueue(current);
                                break;
                            }
                        }
                    }
                }
            }
            this.checkTime = Time.realtimeSinceStartup;
        }
        if (0f < this.totalCheckTime && !PlayerPrefs.HasKey("CheckFps") && Time.realtimeSinceStartup - this.totalCheckTime < 180f && TsQualityManager.Instance.CurrLevel != TsQualityManager.Level.LOWEST && !System_Option_Dlg.m_bSaveMode)
        {
            this.CheckFps();
            if (Time.realtimeSinceStartup - this.fpsCheckTime > 60f)
            {
                this.averageFps /= (float)this.count;
                if (this.averageFps <= 14f)
                {
                    foreach (GameGuideInfo current3 in this.m_GameGuide)
                    {
                        if (current3.m_eType == GameGuideType.CHECK_FPS)
                        {
                            if (this.m_kCurrentGameGuideInfo == null || this.m_kCurrentGameGuideInfo.m_eType != current3.m_eType)
                            {
                                this.m_kReserveGuide.Enqueue(current3);
                                break;
                            }
                        }
                    }
                }
                this.averageFps   = 0f;
                this.count        = 0;
                this.fpsCheckTime = Time.realtimeSinceStartup;
            }
        }
        if (0 < this.m_kReserveGuide.Count && this.m_kCurrentGameGuideInfo == null)
        {
            GameGuideInfo kCurrentGameGuideInfo = this.m_kReserveGuide.Dequeue();
            this.m_kCurrentGameGuideInfo = kCurrentGameGuideInfo;
            if (this.m_kCurrentGameGuideInfo.m_eType != GameGuideType.DEFAULT)
            {
                NoticeIconDlg.SetIcon(ICON_TYPE.GAMEGUIDE, true);
                this.SetBubbleGameGuide();
            }
            else
            {
                this.m_kCurrentGameGuideInfo = null;
            }
        }
    }
Esempio n. 9
0
    public void AddGameGuide(GameGuideInfo gameGuideInfo)
    {
        GameGuideInfo gameGuideInfo2 = null;

        if (gameGuideInfo.m_eType == GameGuideType.EQUIP_ITEM)
        {
            gameGuideInfo2 = new GameGuideEquip();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.FRIEND_RECOMMEND1 || gameGuideInfo.m_eType == GameGuideType.FRIEND_RECOMMEND2 || gameGuideInfo.m_eType == GameGuideType.FRIEND_RECOMMEND3)
        {
            gameGuideInfo2 = new GameGuideAddFriend();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.RECOMMEND_EQUIP)
        {
            gameGuideInfo2 = new GameGuideRecommendEquip();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.EQUIP_SELL)
        {
            gameGuideInfo2 = new GameGuideEquipSell();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.CHECK_FPS)
        {
            gameGuideInfo2 = new GameGuideCheckFPS();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.PLUNDER_INFO)
        {
            gameGuideInfo2 = new GameGuidePlunderInfo();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.SUPPORT_GOLD)
        {
            gameGuideInfo2 = new GameGuideSupportGoldInfo();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.PLUNDER_REQUEST)
        {
            gameGuideInfo2 = new GameGuidePlunderRequest();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.SELL_ITEM)
        {
            gameGuideInfo2 = new GameGuideSellItem();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.ENCHANT_SOL)
        {
            gameGuideInfo2 = new GameGuideEnchantSol();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.RECOMMEND_REFORGE)
        {
            gameGuideInfo2 = new GameGuideRecommendReforge();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.RECOMMEND_HEALER)
        {
            gameGuideInfo2 = new GameGuideRecommendHealer();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.RECOMMEND_SKILL)
        {
            gameGuideInfo2 = new GameGuideRecommendSkill();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.RECOMMEND_MON)
        {
            gameGuideInfo2 = new GameGuideRecommendMon();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.RECOMMEND_SOL)
        {
            gameGuideInfo2 = new GameGuideRecommendSol();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.RECOMMEND_COMPOSE)
        {
            gameGuideInfo2 = new GameGuideRecommendCompose();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.GET_RUNESTONE)
        {
            gameGuideInfo2 = new GameGuideGetRunestone();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.GET_ORIHARCON)
        {
            gameGuideInfo2 = new GameGuideGetOriharcon();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.CERTIFY_EMAIL)
        {
            gameGuideInfo2 = new GameGuideCertifyEMAIL();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.MINE_ITEMGET)
        {
            gameGuideInfo2 = new GameGuideMineNotify();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.MINE_PLUNDER)
        {
            gameGuideInfo2 = new GameGuideMinePlunder();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.REVIEW)
        {
            gameGuideInfo2 = new GameGuideReview();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.COLOSSEUM)
        {
            gameGuideInfo2 = new GameGuideColosseum();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.FRIEND_LIMIT)
        {
            gameGuideInfo2 = new GameGuideFriendLimit();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.PURCHASE_RESTORE)
        {
            gameGuideInfo2 = new GameGuidePurchaseRestore();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.TREASURE_ALARM)
        {
            gameGuideInfo2 = new GameGuideTreasureAlarm();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.EXPEDITION_ITEMGET)
        {
            gameGuideInfo2 = new GameGuideExpeditionNotify();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.CHALLENGE_PREMIUM_ONE)
        {
            gameGuideInfo2 = new GameGuideChallenge();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.CHALLENGE_SOL_EXTRACT)
        {
            gameGuideInfo2 = new GameGuideChallenge();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.CHALLENGE_LEGEND_RECRUIT)
        {
            gameGuideInfo2 = new GameGuideChallenge();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.CHALLENGE_SOL_TRANSCENDENCE)
        {
            gameGuideInfo2 = new GameGuideChallenge();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.CHALLENGE_SOL_COMPOSE)
        {
            gameGuideInfo2 = new GameGuideChallenge();
        }
        else if (gameGuideInfo.m_eType == GameGuideType.CHALLENGE_LEGEND_EVOLUTION)
        {
            gameGuideInfo2 = new GameGuideChallenge();
        }
        if (gameGuideInfo2 == null)
        {
            return;
        }
        gameGuideInfo2.Set(gameGuideInfo);
        this.m_GameGuide.Add(gameGuideInfo2);
        if (1 < this.m_GameGuide.Count)
        {
            this.m_GameGuide.Sort(new Comparison <GameGuideInfo>(GameGuideManager.CompareIndices));
        }
    }
Esempio n. 10
0
 public static int CompareIndices(GameGuideInfo a, GameGuideInfo b)
 {
     return(a.m_nPriority - b.m_nPriority);
 }
Esempio n. 11
0
 public void AddDefaultGuid(GameGuideInfo gameGuideInfo)
 {
     this.m_DefaultGuide.Add(gameGuideInfo);
 }