Beispiel #1
0
    // Token: 0x06002BC8 RID: 11208 RVA: 0x004827F4 File Offset: 0x004809F4
    public MissionVIPSpeedup(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr       = mStringTable.GetStringByID(294u);
        this.CompleteImmContStr = mStringTable.GetStringByID(207u);
        this.CompleteImmBntStr  = mStringTable.GetStringByID(218u);
        this.bFreeSpeedup       = false;
        this.bImmediate         = true;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = _UseItemTarget.VIPMission;
        this.FilterType         = 1;
    }
Beispiel #2
0
    // Token: 0x06002BDB RID: 11227 RVA: 0x00483030 File Offset: 0x00481230
    public FixTrapSpeedup(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr       = mStringTable.GetStringByID(224u);
        this.CompleteImmContStr = mStringTable.GetStringByID(211u);
        this.CompleteImmBntStr  = mStringTable.GetStringByID(216u);
        this.bFreeSpeedup       = false;
        this.bImmediate         = true;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = _UseItemTarget.RepaireTrap;
        this.FilterType         = 1;
    }
Beispiel #3
0
    // Token: 0x06002BE4 RID: 11236 RVA: 0x004831D8 File Offset: 0x004813D8
    public HeroLeavePrison(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr       = mStringTable.GetStringByID(298u);
        this.CompleteImmContStr = mStringTable.GetStringByID(212u);
        this.CompleteImmBntStr  = mStringTable.GetStringByID(222u);
        this.bFreeSpeedup       = false;
        this.bImmediate         = false;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = (_UseItemTarget)DataManager.Instance.MarchEventData.Length;
        this.FilterType         = 11;
    }
Beispiel #4
0
    // Token: 0x06002BCB RID: 11211 RVA: 0x0048287C File Offset: 0x00480A7C
    public ForgingSpeedup(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr       = mStringTable.GetStringByID(7501u);
        this.CompleteImmContStr = mStringTable.GetStringByID(7503u);
        this.CompleteImmBntStr  = mStringTable.GetStringByID(7502u);
        this.bFreeSpeedup       = false;
        this.bImmediate         = true;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = _UseItemTarget.SunLordequip;
        this.FilterType         = 1;
    }
Beispiel #5
0
    // Token: 0x06002BEA RID: 11242 RVA: 0x00483328 File Offset: 0x00481528
    public PetEvolutionSpeed(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr       = mStringTable.GetStringByID(16059u);
        this.CompleteImmContStr = mStringTable.GetStringByID(16081u);
        this.CompleteImmBntStr  = mStringTable.GetStringByID(223u);
        this.bFreeSpeedup       = true;
        this.bImmediate         = true;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = _UseItemTarget.PET_STARUP;
        this.FilterType         = 1;
    }
Beispiel #6
0
    // Token: 0x06002BE1 RID: 11233 RVA: 0x00483148 File Offset: 0x00481348
    public HeroStarupSpeedup(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr       = mStringTable.GetStringByID(226u);
        this.CompleteImmContStr = mStringTable.GetStringByID(213u);
        this.CompleteImmBntStr  = mStringTable.GetStringByID(223u);
        this.bFreeSpeedup       = true;
        this.bImmediate         = true;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = _UseItemTarget.HeroStarup;
        this.FilterType         = 1;
    }
Beispiel #7
0
    // Token: 0x06002BE7 RID: 11239 RVA: 0x00483264 File Offset: 0x00481464
    public PetItemCraftSpeed(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr       = mStringTable.GetStringByID(14667u);
        this.CompleteImmContStr = mStringTable.GetStringByID(14668u);
        this.CompleteImmBntStr  = mStringTable.GetStringByID(14658u);
        this.bFreeSpeedup       = false;
        this.bImmediate         = true;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = _UseItemTarget.ItemCraft;
        this.FilterType         = 22;
    }
Beispiel #8
0
    // Token: 0x06002BD4 RID: 11220 RVA: 0x00482E1C File Offset: 0x0048101C
    public TrainingSpeedup(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr       = mStringTable.GetStringByID(296u);
        this.CompleteImmContStr = mStringTable.GetStringByID(209u);
        this.CompleteImmBntStr  = mStringTable.GetStringByID(220u);
        this.bFreeSpeedup       = false;
        this.bImmediate         = true;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = _UseItemTarget.Trainging;
        this.FilterType         = 1;
        this.FilterType2        = 21;
    }
Beispiel #9
0
    // Token: 0x06002BB6 RID: 11190 RVA: 0x0048211C File Offset: 0x0048031C
    public ResearchSpeedup(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr       = mStringTable.GetStringByID(289u);
        this.CompleteImmContStr = mStringTable.GetStringByID(202u);
        this.CompleteImmBntStr  = mStringTable.GetStringByID(215u);
        this.bFreeSpeedup       = true;
        this.bImmediate         = true;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = _UseItemTarget.Research;
        this.FilterType         = 1;
        this.FilterType2        = 12;
    }
Beispiel #10
0
    // Token: 0x06002BB3 RID: 11187 RVA: 0x0048200C File Offset: 0x0048020C
    public BuildSpeedup(EQueueBarIndex QueueBar)
    {
        StringTable mStringTable = DataManager.Instance.mStringTable;

        this.MainTitleStr = mStringTable.GetStringByID(288u);
        if (GUIManager.Instance.BuildingData.QueueBuildType == 1)
        {
            this.CompleteImmBntStr = mStringTable.GetStringByID(214u);
            this.bFreeSpeedup      = true;
        }
        else
        {
            this.CompleteImmBntStr = mStringTable.GetStringByID(218u);
            this.bFreeSpeedup      = false;
        }
        this.CompleteImmContStr = mStringTable.GetStringByID(201u);
        this.bImmediate         = true;
        this.QueueBar           = (byte)QueueBar;
        this.UseTarget          = _UseItemTarget.Building;
        this.FilterType         = 1;
        this.FilterType2        = byte.MaxValue;
    }
Beispiel #11
0
    // Token: 0x06002BEE RID: 11246 RVA: 0x004833D0 File Offset: 0x004815D0
    public unsafe override void OnOpen(int arg1, int arg2)
    {
        DataManager instance  = DataManager.Instance;
        GUIManager  instance2 = GUIManager.Instance;

        this.QueueBar = (EQueueBarIndex)arg2;
        this.TimeStr  = StringManager.Instance.SpawnString(200);
        this.HelpStr  = StringManager.Instance.SpawnString(30);
        base.OnOpen(arg1, arg2);
        this.ThisTransform = base.SetFunc(this.transform.GetChild(3));
        Font ttffont = GUIManager.Instance.GetTTFFont();

        this.ThisTransform.gameObject.SetActive(true);
        this.MainText.font = ttffont;
        this.HelpObj       = this.ThisTransform.GetChild(1).gameObject;
        this.HelpText      = this.ThisTransform.GetChild(1).GetChild(1).GetComponent <UIText>();
        this.HelpText.font = ttffont;
        base.AddRefreshText(this.HelpText);
        UIButtonHint uibuttonHint = this.ThisTransform.GetChild(1).gameObject.AddComponent <UIButtonHint>();

        uibuttonHint.m_DownUpHandler = this;
        uibuttonHint.Parm1           = 14701;
        uibuttonHint.m_eHint         = EUIButtonHint.DownUpHandler;
        bool           active   = true;
        EQueueBarIndex queueBar = this.QueueBar;

        switch (queueBar)
        {
        case EQueueBarIndex.Training:
            this.Speedup = new TrainingSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.HeroEnhance:
            this.Speedup = new HeroEnhanceSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.HeroEvolution:
            this.Speedup = new HeroStarupSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.Treatmenting:
            this.Speedup = new TreatmentingSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.Manufacturing:
            this.Speedup = new TrapSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.TrapRepair:
            this.Speedup = new FixTrapSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.WallRepair:
            this.Speedup = new FixwallSpeedup(this.QueueBar);
            break;

        default:
            if (queueBar != EQueueBarIndex.Building)
            {
                if (queueBar != EQueueBarIndex.Researching)
                {
                    active        = false;
                    this.Speedup  = new MarchGropSpeedup(arg2);
                    this.QueueBar = (EQueueBarIndex)this.Speedup.QueueBar;
                    if (this.Speedup.QueueBar == 255)
                    {
                        MarchGropSpeedup marchGropSpeedup = this.Speedup as MarchGropSpeedup;
                        if (marchGropSpeedup.mapline != null && marchGropSpeedup.mapline.lineFlag != 12)
                        {
                            this.bException = true;
                        }
                    }
                }
                else
                {
                    this.Speedup = new ResearchSpeedup(this.QueueBar);
                    this.CheckHelpbarShow();
                }
            }
            else
            {
                this.Speedup = new BuildSpeedup(this.QueueBar);
                this.CheckHelpbarShow();
            }
            break;

        case EQueueBarIndex.Forging:
            this.Speedup = new ForgingSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.AffairMission:
            this.Speedup = new MissionAffairSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.AllianceMission:
            this.Speedup = new MissionAllianceSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.VIPMission:
            this.Speedup = new MissionVIPSpeedup(this.QueueBar);
            break;

        case EQueueBarIndex.LordReturn:
            this.Speedup = new HeroLeavePrison(this.QueueBar);
            break;

        case EQueueBarIndex.PetFusion:
            this.Speedup = new PetItemCraftSpeed(this.QueueBar);
            break;

        case EQueueBarIndex.PetEvolution:
            this.Speedup = new PetEvolutionSpeed(this.QueueBar);
            break;
        }
        this.SortObj.SetActive(active);
        this.UseTargetID   = (ushort)this.Speedup.UseTarget;
        this.MainText.text = this.Speedup.MainTitleStr;
        string text  = string.Empty;
        string empty = string.Empty;

        this.timebar = this.ThisTransform.GetChild(0).GetComponent <UITimeBar>();
        instance.GetQueueBarTitle(this.QueueBar, instance2.tmpString, ref text, ref empty);
        instance2.CreateTimerBar(this.timebar, 0L, 0L, 0L, eTimeBarType.SpeedupType, text, empty);
        if (arg2 < 100)
        {
            if (this.QueueBar >= (EQueueBarIndex)instance.queueBarData.Length)
            {
                this.bForceClose = 1;
                this.ThisTransform.gameObject.SetActive(false);
                return;
            }

            fixed(QueueBarData *ptr = &instance.queueBarData[(int)((byte)this.QueueBar)])
            {
                instance2.SetTimerBar(this.timebar, ptr->StartTime, ptr->StartTime + (long)((ulong)ptr->TotalTime), 0L, eTimeBarType.SpeedupType, text, empty);
                this.LeftTime = ptr->StartTime + (long)((ulong)ptr->TotalTime) - instance.ServerTime;
            }
        }
        else
        {
            text = instance.mStringTable.GetStringByID(4914u);
            if (this.Speedup.Name != null)
            {
                this.CheckNameID = this.Speedup.Name.GetHashCode(false);
            }
            instance2.SetTimerBar(this.timebar, this.Speedup.StartTime, this.Speedup.StartTime + (long)((ulong)this.Speedup.TotalTime), 0L, eTimeBarType.SpeedupType, text, text);
            this.LeftTime = this.Speedup.StartTime + (long)((ulong)this.Speedup.TotalTime) - instance.ServerTime;
        }
        if (this.LeftTime < 0L)
        {
            this.bForceClose = 1;
            this.ThisTransform.gameObject.SetActive(false);
        }
        if (this.Speedup.bFreeSpeedup && this.LeftTime <= (long)instance.GetFreeCompleteTime())
        {
            this.bUseImmediateFree = true;
        }
        else
        {
            this.bUseImmediateFree = false;
        }
        if (!this.bUseImmediateFree)
        {
            if (!this.Speedup.bImmediate)
            {
                this.MoneyIdx = -1;
            }
            else
            {
                this.MoneyIdx = 0;
            }
            if (this.Speedup.bFreeSpeedup)
            {
                this.FreeIdx = 1;
            }
            else
            {
                this.FreeIdx = -1;
            }
        }
        else
        {
            this.MoneyIdx = -1;
            this.FreeIdx  = 0;
            instance2.SetTimerSpriteType(this.timebar, eTimerSpriteType.Free);
        }
    }