Beispiel #1
0
    // Token: 0x06001446 RID: 5190 RVA: 0x00238DB0 File Offset: 0x00236FB0
    public bool CheckReSetFB_CDTime()
    {
        bool    result  = false;
        long    num     = 0L;
        long    num2    = 0L;
        CString cstring = StringManager.Instance.StaticString1024();

        cstring.ClearString();
        cstring.IntToFormat(NetworkManager.UserID, 1, false);
        cstring.AppendFormat("{0}_FB_CDTime_UseID");
        long.TryParse(PlayerPrefs.GetString(cstring.ToString()), out num);
        if (num == 0L)
        {
            PlayerPrefs.SetString(cstring.ToString(), NetworkManager.UserID.ToString());
            num = NetworkManager.UserID;
        }
        cstring.ClearString();
        cstring.IntToFormat(num, 1, false);
        cstring.AppendFormat("{0}_FB_CDTime_Time");
        long.TryParse(PlayerPrefs.GetString(cstring.ToString()), out num2);
        if ((num2 > 0L && num2 - ActivityManager.Instance.ServerEventTime <= 0L) || num2 == 0L)
        {
            result = true;
        }
        return(result);
    }
Beispiel #2
0
 // Token: 0x06000160 RID: 352 RVA: 0x00016254 File Offset: 0x00014454
 public static AssetBundle GetAssetBundle(CString Name, out int Key)
 {
     Key = Name.GetHashCode(true);
     AssetManager.AssRef value;
     if (!AssetManager.AssetMap.TryGetValue(Key, out value) || !value.Asset || value.RefCount == 0)
     {
         CString cstring = StringManager.Instance.StaticString1024();
         if (!value.Internal)
         {
             cstring.StringToFormat(Application.dataPath);
             cstring.StringToFormat(Name);
             cstring.AppendFormat("{0}!assets/{1}.unity3d");
         }
         else
         {
             cstring.StringToFormat(AssetManager.persistentDataPath);
             cstring.StringToFormat(Name);
             cstring.AppendFormat("{0}/{1}.unity3d");
         }
         value.Set(AssetBundle.CreateFromFile(cstring.ToString()));
     }
     value.RefCount++;
     AssetManager.AssetMap[Key] = value;
     return(value.Asset);
 }
Beispiel #3
0
    // Token: 0x06001447 RID: 5191 RVA: 0x00238E78 File Offset: 0x00237078
    public bool IsCanSetFB_CDTime(CString tmpName = null, long m_UseID = 0L)
    {
        bool result = false;

        if (tmpName == null)
        {
            tmpName = StringManager.Instance.StaticString1024();
        }
        long num = 0L;

        if (m_UseID == 0L)
        {
            tmpName.ClearString();
            tmpName.IntToFormat(NetworkManager.UserID, 1, false);
            tmpName.AppendFormat("{0}_FB_CDTime_UseID");
            long.TryParse(PlayerPrefs.GetString(tmpName.ToString()), out m_UseID);
        }
        tmpName.ClearString();
        tmpName.IntToFormat(m_UseID, 1, false);
        tmpName.AppendFormat("{0}_FB_CDTime_Time_Check");
        long.TryParse(PlayerPrefs.GetString(tmpName.ToString()), out num);
        if (num == 0L || (num <= ActivityManager.Instance.ServerEventTime && GameConstants.GetDateTime(num + 86400L).Day <= GameConstants.GetDateTime(ActivityManager.Instance.ServerEventTime).Day) || GameConstants.GetDateTime(num + 86400L).Month < GameConstants.GetDateTime(ActivityManager.Instance.ServerEventTime).Month || GameConstants.GetDateTime(num + 86400L).Year < GameConstants.GetDateTime(ActivityManager.Instance.ServerEventTime).Year)
        {
            result = true;
            PlayerPrefs.SetString(tmpName.ToString(), ActivityManager.Instance.ServerEventTime.ToString());
        }
        return(result);
    }
Beispiel #4
0
    // Token: 0x06001F04 RID: 7940 RVA: 0x003B79B0 File Offset: 0x003B5BB0
    public void OnButtonClick(UIButton sender)
    {
        switch (sender.m_BtnID1)
        {
        case 0:
            this.GUIM.CloseMenu(EGUIWindow.UI_Rating);
            this.GUIM.UIQueueLockRelease(EGUIQueueLock.UIQL_UI_notAllowPopUps);
            break;

        case 1:
        {
            bool    flag    = true;
            CString cstring = StringManager.Instance.StaticString1024();
            cstring.ClearString();
            cstring.IntToFormat(NetworkManager.UserID, 1, false);
            cstring.AppendFormat("{0}_Score_bScoreEnd");
            PlayerPrefs.SetString(cstring.ToString(), flag.ToString());
            this.UpdateUI(1, 0);
            break;
        }

        case 2:
            this.UpdateUI(2, 0);
            break;

        case 3:
        {
            MessagePacket messagePacket = new MessagePacket(1024);
            messagePacket.Protocol = Protocol._MSG_REQUEST_GOOGLESTAR_PRIZE;
            messagePacket.AddSeqId();
            messagePacket.Send(false);
            bool    flag    = true;
            long    num     = 0L;
            CString cstring = StringManager.Instance.StaticString1024();
            cstring.ClearString();
            cstring.IntToFormat(NetworkManager.UserID, 1, false);
            cstring.AppendFormat("{0}");
            long.TryParse(PlayerPrefs.GetString(cstring.ToString()), out num);
            if (num != 0L)
            {
                cstring.ClearString();
                cstring.IntToFormat(num, 1, false);
                cstring.AppendFormat("{0}_Score_bScoreEnd");
                PlayerPrefs.SetString(cstring.ToString(), flag.ToString());
            }
            IGGSDKPlugin.RateGooglePlayApplication(GameConstants.GlobalEditionClassNames);
            this.GUIM.CloseMenu(EGUIWindow.UI_Rating);
            this.GUIM.UIQueueLockRelease(EGUIQueueLock.UIQL_UI_notAllowPopUps);
            break;
        }

        case 4:
            this.GUIM.CloseMenu(EGUIWindow.UI_Rating);
            this.GUIM.UIQueueLockRelease(EGUIQueueLock.UIQL_UI_notAllowPopUps);
            IGGGameSDK.OpenSuggestUrl();
            break;
        }
    }
Beispiel #5
0
    // Token: 0x06000195 RID: 405 RVA: 0x00019120 File Offset: 0x00017320
    public void PlayMP3SFX(ushort NameID, float delay = 0f)
    {
        if (this.MuteSFXVol || NameID == 0)
        {
            return;
        }
        if (this.MP3Key != 0)
        {
            if (NameID == this.MP3ABName)
            {
                return;
            }
            this.MP3Source.Stop();
            AssetManager.UnloadAssetBundle(this.MP3Key, true);
            this.MP3Key = 0;
        }
        this.MP3ABName = NameID;
        int     num     = (int)(NameID / 100);
        CString cstring = StringManager.Instance.StaticString1024();

        cstring.StringToFormat(this.Path);
        cstring.IntToFormat((long)num, 3, true);
        cstring.AppendFormat("{0}{1}");
        AssetBundle assetBundle = AssetManager.GetAssetBundle(cstring, out this.MP3Key);

        if (assetBundle)
        {
            cstring.ClearString();
            cstring.IntToFormat((long)NameID, 1, false);
            cstring.AppendFormat("{0}");
            this.SFXClip.clip = (assetBundle.Load(cstring.ToString(), typeof(AudioClip)) as AudioClip);
            if (this.SFXClip.clip == null)
            {
                AssetManager.UnloadAssetBundle(this.MP3Key, true);
                this.MP3Key    = 0;
                this.MP3ABName = 0;
                return;
            }
            this.SFXClip.DelaySecond = new float?(delay);
            this.SFXClip.Pitch       = 1f;
            this.SFXClip.PanLevel    = 0f;
            this.SFXClip.Volume      = 1f;
            this.SFXClip.Loop        = false;
            this.PlayAudio(this.MP3Source, this.SFXClip);
            this.ChangeDuckingState(AudioManager.DuckingState.Start);
            if (this.poolIndex >= 20)
            {
                this.poolIndex = 0;
            }
        }
        else
        {
            AssetManager.UnloadAssetBundle(this.MP3Key, true);
            this.MP3Key    = 0;
            this.MP3ABName = 0;
        }
    }
Beispiel #6
0
    // Token: 0x0600018D RID: 397 RVA: 0x00018CEC File Offset: 0x00016EEC
    private bool PlaySFXLoopHighPass(ushort NameID, out byte Key, Transform PlayObj = null)
    {
        Key = 0;
        if (this.FireKey != 0)
        {
            return(false);
        }
        int     num     = (int)(NameID / 100);
        CString cstring = StringManager.Instance.StaticString1024();

        cstring.StringToFormat(this.Path);
        cstring.IntToFormat((long)num, 3, true);
        cstring.AppendFormat("{0}{1}");
        AssetBundle assetBundle = AssetManager.GetAssetBundle(cstring, out this.FireKey);

        if (!assetBundle)
        {
            AssetManager.UnloadAssetBundle(this.FireKey, true);
            this.FireKey = 0;
            return(false);
        }
        if (this.FireSFXSource.clip != null)
        {
            this.FireSFXSource.Stop();
        }
        cstring.ClearString();
        cstring.IntToFormat((long)NameID, 1, false);
        cstring.AppendFormat("{0}");
        this.SFXClip.clip = (assetBundle.Load(cstring.ToString(), typeof(AudioClip)) as AudioClip);
        if (this.SFXClip.clip == null)
        {
            AssetManager.UnloadAssetBundle(this.FireKey, true);
            this.FireKey = 0;
            return(false);
        }
        if (PlayObj != null)
        {
            this.FireSFXSource.transform.position = PlayObj.position;
            this.SFXClip.PanLevel = 1f;
        }
        else
        {
            this.SFXClip.PanLevel = 0f;
        }
        this.SFXClip.Loop   = true;
        this.SFXClip.Volume = 1f;
        this.SFXClip.Pitch  = 1f;
        Key = 20;
        this.PlayAudio(this.FireSFXSource, this.SFXClip);
        this.ChangeDuckingState(AudioManager.DuckingState.Start);
        return(true);
    }
Beispiel #7
0
    // Token: 0x06001BC4 RID: 7108 RVA: 0x00315998 File Offset: 0x00313B98
    public void GetLegionHintStr(byte heroEnhance, ref Skill skill, ref CString Content, byte RankStr = 0)
    {
        CString cstring  = StringManager.Instance.StaticString1024();
        CString cstring2 = StringManager.Instance.StaticString1024();

        cstring.Append(Content);
        float num = (float)skill.HurtValue + (float)((ushort)this.LegionRankMagnifation[(int)(heroEnhance - 1)] * skill.HurtIncreaseValue) / 1000f;

        if (skill.HurtKind == 1)
        {
            GameConstants.GetEffectValue(Content, skill.HurtAddition, 0u, 7, 0f);
            Content.IntToFormat((long)((ushort)this.LegionRankMagnifation[(int)(heroEnhance - 1)] * skill.HurtIncreaseValue), 1, true);
            Content.AppendFormat("{0}");
        }
        else if (skill.SkillType == 10)
        {
            GameConstants.GetEffectValue(Content, skill.HurtAddition, (uint)num, 1, 0f);
        }
        else
        {
            GameConstants.GetEffectValue(Content, skill.HurtAddition, 0u, 6, num * 100f);
        }
        if (RankStr > 0)
        {
            cstring2.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(15u));
            cstring2.IntToFormat((long)RankStr, 1, false);
            cstring2.StringToFormat(Content);
            if (skill.SkillType == 10)
            {
                cstring2.AppendFormat("<color=#ffff00ff>{0}{1} : {2}</color>");
            }
            else
            {
                cstring2.AppendFormat("<color=#33eb67ff>{0}{1} : {2}</color>");
            }
        }
        else
        {
            cstring2.StringToFormat(Content);
            if (skill.SkillType == 10)
            {
                cstring2.AppendFormat("<color=#ffff00ff>{0}</color>");
            }
            else
            {
                cstring2.AppendFormat("<color=#33eb67ff>{0}</color>");
            }
        }
        cstring2.Insert(0, cstring, -1);
        Content.ClearString();
        Content.Append(cstring2);
    }
Beispiel #8
0
    // Token: 0x06000DDB RID: 3547 RVA: 0x00162A68 File Offset: 0x00160C68
    public void Recv_MSG_RESP_REDPOCKET_LEADEREND(MessagePacket MP)
    {
        GUIManager.Instance.HideUILock(EUILock.ActGift);
        byte b = MP.ReadByte(-1);

        if (b == 0)
        {
            DataManager dataManager = DataManager.Instance;
            int         tableCount  = dataManager.FastivalSpecialDataTable.TableCount;
            for (int i = 0; i < tableCount; i++)
            {
                FastivalSpecialData recordByIndex = dataManager.FastivalSpecialDataTable.GetRecordByIndex(i);
                if (recordByIndex.StoreID == 0u && recordByIndex.GroupID == this.GroupID)
                {
                    CString cstring = StringManager.Instance.StaticString1024();
                    cstring.StringToFormat(dataManager.mStringTable.GetStringByID((uint)recordByIndex.ItemName));
                    cstring.AppendFormat(dataManager.mStringTable.GetStringByID(11205u));
                    GUIManager.Instance.AddHUDMessage(cstring.ToString(), 255, true);
                    break;
                }
            }
        }
        else if (b == 5)
        {
            CString cstring2 = StringManager.Instance.StaticString1024();
            cstring2.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(11215u));
            GUIManager.Instance.AddHUDMessage(cstring2.ToString(), 255, true);
        }
    }
Beispiel #9
0
    // Token: 0x060024E2 RID: 9442 RVA: 0x00424684 File Offset: 0x00422884
    public void InitialAB()
    {
        CString cstring = StringManager.Instance.StaticString1024();

        if (this.PicPackageID1 != 0)
        {
            cstring.IntToFormat((long)this.PicPackageID1, 1, false);
            cstring.AppendFormat("Store/Mallback_{0}");
        }
        else
        {
            cstring.Append("UI/Mall_0");
        }
        this.m_AssetBundle = AssetManager.GetAssetBundle(cstring, out this.m_AssetBundleKey);
        if (this.m_AssetBundle != null)
        {
            this.m_Material = (this.m_AssetBundle.Load("Mall_m", typeof(Material)) as Material);
            UnityEngine.Object[] array = this.m_AssetBundle.LoadAll(typeof(Sprite));
            for (int i = 0; i < array.Length; i++)
            {
                ushort num = ushort.Parse(array[i].name);
                if (num == 100)
                {
                    this.m_BackImage1 = (Sprite)array[i];
                }
                else if (num == 200)
                {
                    this.m_BackImage2 = (Sprite)array[i];
                }
            }
        }
    }
Beispiel #10
0
    // Token: 0x060016A8 RID: 5800 RVA: 0x002718FC File Offset: 0x0026FAFC
    public void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
    {
        if (dataIdx < 0 || dataIdx >= PetBuff.PetSkills.Count || panelObjectIdx >= this.m_panel.Length)
        {
            return;
        }
        if (!this.m_panel[panelObjectIdx].Init)
        {
            this.m_panel[panelObjectIdx].Init = true;
            this.m_panel[panelObjectIdx].Item = item;
            item.transform.GetChild(9).GetChild(2).gameObject.GetComponent <UIButton>().m_Handler = this;
            if (UIPetSkill.nowSkillId == 0)
            {
            }
        }
        this.m_panel[panelObjectIdx].ID = dataIdx;
        item.transform.GetChild(8).gameObject.SetActive(false);
        item.transform.GetChild(9).gameObject.SetActive(true);
        item.transform.GetChild(9).GetChild(2).gameObject.GetComponent <UIButton>().m_BtnID2 = dataIdx + 1;
        item.transform.GetChild(9).GetChild(2).GetChild(2).gameObject.SetActive(this.currentBtnID > 0 && this.currentBtnID <= PetBuff.PetSkills.Count && this.currentBtnID == dataIdx);
        this.SetPanelItem(panelObjectIdx, true);
        this.m_CrownBack = item.transform.GetChild(9).GetChild(2).gameObject.GetComponent <Image>();
        PetSkillTbl recordByKey = PetManager.Instance.PetSkillTable.GetRecordByKey((ushort)PetBuff.PetSkills[dataIdx].ID);
        CString     cstring     = StringManager.Instance.StaticString1024();

        cstring.IntToFormat((long)recordByKey.Icon, 5, false);
        cstring.AppendFormat("s{0}");
        this.m_Defeater           = this.m_CrownBack.transform.GetChild(0).GetComponent <Image>();
        this.m_Defeater.sprite    = this.GM.LoadFrameSprite("sk");
        this.m_Defeater.material  = this.GM.GetFrameMaterial();
        this.m_CrownBack.sprite   = this.GM.LoadSkillSprite(cstring);
        this.m_CrownBack.material = this.GM.GetSkillMaterial();
    }
Beispiel #11
0
    // Token: 0x06001187 RID: 4487 RVA: 0x001EB878 File Offset: 0x001E9A78
    public void InitLock()
    {
        StageManager stageDataController = DataManager.StageDataController;
        CString      cstring             = StringManager.Instance.StaticString1024();
        Vector3      localScale          = Vector3.one * 12.5f;
        Vector3      eulerAngles         = new Vector3(45f, 185f, 3f);

        for (int i = 0; i < this.StageLock.Length; i++)
        {
            if (i > (int)stageDataController.StageRecord[2])
            {
                cstring.ClearString();
                cstring.IntToFormat((long)(i + 1), 1, false);
                cstring.AppendFormat("Lock_{0}");
                CorpsStage recordByKey = DataManager.StageDataController.CorpsStageTable.GetRecordByKey((ushort)(1 + i));
                this.StageLock[i]         = new GameObject(cstring.ToString());
                this.StageLockNameCode[i] = this.StageLock[i].name.GetHashCode();
                SpriteRenderer spriteRenderer = this.StageLock[i].AddComponent <SpriteRenderer>();
                spriteRenderer.sprite       = this.mapspriteManager.GetSpriteByName("lock");
                spriteRenderer.material     = GUIManager.Instance.MapSpriteMaterial;
                spriteRenderer.sortingOrder = -1;
                Transform transform = this.StageLock[i].transform;
                transform.position   = GameConstants.WordToVector3(recordByKey.StagePos.X, recordByKey.StagePos.Y, recordByKey.StagePos.Z, -100, 0.01f);
                transform.localScale = localScale;
                spriteRenderer.color = Color.black;
                Quaternion rotation = transform.rotation;
                rotation.eulerAngles = eulerAngles;
                transform.rotation   = rotation;
                transform.SetParent(this.MapSpriteRoot.transform);
            }
        }
    }
Beispiel #12
0
    // Token: 0x06001D36 RID: 7478 RVA: 0x003464D8 File Offset: 0x003446D8
    private void Create3DObjects()
    {
        if (this.NowHeroID == this.LastHeroID)
        {
            return;
        }
        if (this.LoadingStep > UIJailRoom.eModelLoadingStep.WaitforHero)
        {
            this.Destory3DObject(false);
        }
        if (this.LoadingStep == UIJailRoom.eModelLoadingStep.Start)
        {
            CString cstring = StringManager.Instance.StaticString1024();
            cstring.Append("Role/cage");
            this.bundle        = AssetManager.GetAssetBundle(cstring, out this.AssetKey1);
            this.bundleRequest = this.bundle.LoadAsync("m", typeof(GameObject));
            this.LoadingStep   = UIJailRoom.eModelLoadingStep.WaitforCage;
            return;
        }
        this.LastHeroID = this.NowHeroID;
        this.heroData   = DataManager.Instance.HeroTable.GetRecordByKey(this.NowHeroID);
        CString cstring2 = StringManager.Instance.StaticString1024();

        cstring2.IntToFormat((long)this.heroData.Modle, 5, false);
        cstring2.AppendFormat("Role/hero_{0}");
        this.bundle = AssetManager.GetAssetBundle(cstring2, out this.AssetKey2);
        if (this.bundle == null)
        {
            this.LoadingStep = UIJailRoom.eModelLoadingStep.Done;
            return;
        }
        this.bundleRequest = this.bundle.LoadAsync("m", typeof(GameObject));
        this.LoadingStep   = UIJailRoom.eModelLoadingStep.WaitforHero;
    }
Beispiel #13
0
    // Token: 0x0600143C RID: 5180 RVA: 0x002389C4 File Offset: 0x00236BC4
    public void CheckHUDMsg(byte kind)
    {
        CString    cstring  = StringManager.Instance.StaticString1024();
        GUIManager instance = GUIManager.Instance;
        int        num      = 0;

        this.HudArray.Find(kind, ref num, cstring);
        while (num != -1)
        {
            instance.AddHUDQueue(cstring.ToString(), 255, true);
            cstring = StringManager.Instance.StaticString1024();
            this.HudArray.Find(kind, ref num, cstring);
        }
        byte b = 0;

        FBMissionManager.FBMissionState fbmissionState = default(FBMissionManager.FBMissionState);
        for (int i = 0; i < 2; i++)
        {
            this.GetMissionState(ref fbmissionState, this.Goals[i].MissionId, i);
            if (fbmissionState.GoalNum == fbmissionState.CurNum && fbmissionState.CurNum > 0u)
            {
                b += 1;
            }
        }
        if (b == 2 && this.CurMissionProcess.bShowHUD == 0)
        {
            this.CurMissionProcess.bShowHUD = 1;
            FBMissionTbl recordByKey = this.FBMissionTable.GetRecordByKey((ushort)this.CurMissionProcess.NodeIndex);
            cstring = StringManager.Instance.StaticString1024();
            cstring.StringToFormat(DataManager.Instance.mStringTable.GetStringByID((uint)recordByKey.Name));
            cstring.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(12184u));
            GUIManager.Instance.AddHUDQueue(cstring.ToString(), 255, true);
        }
    }
Beispiel #14
0
    public static CString ToCString(this System.UInt16 number, string format)
    {
        CString str = CString.Alloc(16);

        str.AppendFormat(format, number);
        return(str);
    }
Beispiel #15
0
    // Token: 0x06001BC6 RID: 7110 RVA: 0x00315E68 File Offset: 0x00314068
    public void PraseString(CString NewStr, string str)
    {
        int i = 0;

        while (i < str.Length)
        {
            char c = str[i++];
            if (c == '%')
            {
                char c2 = str[i];
                if (c2 != 'x' && c2 != 'y')
                {
                    if (c2 != 'b')
                    {
                        NewStr.Append(c);
                    }
                    else
                    {
                        NewStr.Append(this.GetCharString(str[i++]));
                    }
                }
                else
                {
                    NewStr.IntToFormat((long)this.GetCharVal(str[i++]), 1, true);
                    NewStr.AppendFormat("{0}");
                }
            }
            else
            {
                NewStr.Append(c);
            }
        }
    }
Beispiel #16
0
 // Token: 0x060017C0 RID: 6080 RVA: 0x00287368 File Offset: 0x00285568
 public void Start(CString str, uint exp, ushort skillID)
 {
     this.m_State         = LvUpAnimation.EAnimState.eStart;
     this.m_AnimationTime = 0f;
     this.m_SetChage[0]   = true;
     this.m_SetChage[1]   = true;
     this.m_SetChage[2]   = true;
     if (this.m_ExpImg != null && !this.m_ExpImg.gameObject.activeInHierarchy)
     {
         this.m_ExpImg.gameObject.SetActive(true);
         this.m_ExpText.enabled = false;
     }
     if (this.m_ExpText != null && !this.m_ExpText.gameObject.activeInHierarchy)
     {
         this.m_ExpText.gameObject.SetActive(true);
     }
     if (this.m_ExpText != null && this.m_ExpText != null)
     {
         str.ClearString();
         str.IntToFormat((long)((ulong)exp), 1, true);
         str.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(55u));
         this.m_ExpText.text = str.ToString();
     }
     this.m_SkillID = skillID;
     AudioManager.Instance.PlayUISFX(UIKind.PetAddExp);
 }
Beispiel #17
0
    // Token: 0x060008EA RID: 2282 RVA: 0x000B6914 File Offset: 0x000B4B14
    public void saveGambleMode()
    {
        CString cstring = StringManager.Instance.StaticString1024();

        cstring.ClearString();
        cstring.uLongToFormat((ulong)DataManager.Instance.RoleAttr.UserId, 1, false);
        cstring.AppendFormat("{0}_GambleMode");
        PlayerPrefs.SetInt(cstring.ToString(), (int)(this.GambleMode + 1));
    }
Beispiel #18
0
    // Token: 0x0600010C RID: 268 RVA: 0x00011EF8 File Offset: 0x000100F8
    public void FormatRank(int index, ref CString Str)
    {
        Str.ClearString();
        int num = 0;

        AllianceWarManager._RegisterData[] data = this.GetData(index, ref num);
        if (this.RegisterData == data)
        {
            Str.IntToFormat((long)(num + 1), 1, false);
            Str.AppendFormat("{0}");
        }
        else
        {
            Str.StringToFormat("~");
            Str.IntToFormat((long)(num + 1), 1, false);
            Str.AppendFormat("{0}{1}");
        }
    }
Beispiel #19
0
    // Token: 0x06001283 RID: 4739 RVA: 0x00209A40 File Offset: 0x00207C40
    public void SaveTriggerTime()
    {
        CString cstring = StringManager.Instance.StaticString1024();

        cstring.ClearString();
        cstring.uLongToFormat((ulong)DataManager.Instance.RoleAttr.UserId, 1, false);
        cstring.AppendFormat(Indemnify.INDEMNIFY_TIME_SAVE_NAME);
        PlayerPrefs.SetString(cstring.ToString(), this.TriggerTime.ToString());
    }
Beispiel #20
0
    // Token: 0x06001BF9 RID: 7161 RVA: 0x003192F4 File Offset: 0x003174F4
    string SimpleHintKind.SetContent(CString Content, int Parm1, int Parm2)
    {
        Content.ClearString();
        TitleData recordByKey = DataManager.Instance.TitleDataN.GetRecordByKey((ushort)Parm2);

        Content.StringToFormat(DataManager.Instance.mStringTable.GetStringByID((uint)recordByKey.StringID));
        Content.AppendFormat(DataManager.Instance.mStringTable.GetStringByID((uint)Parm1));
        return(Content.ToString());
    }
Beispiel #21
0
 // Token: 0x06000DA9 RID: 3497 RVA: 0x0015F6E4 File Offset: 0x0015D8E4
 public void OnButtonDown(UIButtonHint sender)
 {
     if (this.ActivityIndex == 210 && this.AM.AW_PrizeGroupID > 0)
     {
         CString cstring = StringManager.Instance.SpawnString(300);
         cstring.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(17029u));
         cstring.AppendFormat(this.DM.mStringTable.GetStringByID(1003u));
         GUIManager.Instance.m_Hint.Show(sender, UIHintStyle.eHintSimple, 0, 300f, 20, cstring, Vector2.zero);
     }
 }
Beispiel #22
0
    // Token: 0x06000B99 RID: 2969 RVA: 0x0010CF98 File Offset: 0x0010B198
    public NPC(Vector2 inipos, float iniscale, sbyte iniDir, byte npcID, NPCState npcState, Transform parent, ref int ABKey)
    {
        this.NPCControl              = null;
        this.NPCGameObject           = new GameObject("npc");
        this.NPCTransform            = this.NPCGameObject.transform;
        this.NPCTransform.localScale = Vector3.one * iniscale;
        this.NPCSpriteRenderer       = this.NPCGameObject.AddComponent <SpriteRenderer>();
        MapMonster recordByKey = DataManager.MapDataController.MapMonsterTable.GetRecordByKey((ushort)npcID);
        CString    cstring     = StringManager.Instance.SpawnString(30);

        cstring.ClearString();
        cstring.IntToFormat((long)recordByKey.MapNPCNO, 3, false);
        cstring.AppendFormat("UI/NPC_{0}");
        AssetBundle assetBundle = AssetManager.GetAssetBundle(cstring, out ABKey);

        StringManager.Instance.DeSpawnString(cstring);
        GameObject gameObject = UnityEngine.Object.Instantiate(assetBundle.mainAsset) as GameObject;

        gameObject.SetActive(false);
        Transform      transform  = gameObject.transform;
        UISpritesArray component  = transform.GetChild(0).GetComponent <UISpritesArray>();
        UISpritesArray component2 = transform.GetChild(1).GetComponent <UISpritesArray>();
        UISpritesArray component3 = transform.GetChild(2).GetComponent <UISpritesArray>();

        transform.SetParent(parent, false);
        this.NPCTransform.SetParent(parent, false);
        this.NPCSpriteRenderer.material             = component.m_Image.material;
        this.NPCSpriteRenderer.material.renderQueue = 3001;
        this.NPCAnimation    = new Sprite[3][];
        this.NPCAnimation[0] = component.m_Sprites;
        this.NPCAnimation[1] = component2.m_Sprites;
        this.NPCAnimation[2] = component3.m_Sprites;
        this.HitFrame        = recordByKey.HitFrame;
        this.NPCKindID       = npcID;
        this.CurNPCState     = ((npcState < NPCState.NPC_Hit) ? npcState : NPCState.NPC_Attack);
        this.NPCDir          = iniDir;
        if ((int)this.NPCDir == 0)
        {
            this.NPCDir = -1;
            this.NPCTransform.localRotation = Quaternion.Euler(0f, 180f, 0f);
        }
        else
        {
            this.NPCTransform.localRotation = Quaternion.Euler(0f, 0f, 0f);
        }
        this.NPCSheetID     = (byte)UnityEngine.Random.Range(0, this.NPCAnimation[(int)this.CurNPCState].Length);
        this.AnimationSpeed = 15f;
        this.AnimationTimer = 1f;
        this.posxoffset     = (this.posyoffset = (this.HurtTimer = (this.HitTimer = (this.DieTimer = 0f))));
        this.damage         = new List <Damage>(3);
        this.fighters       = new List <LineNode>(16);
        this.hurt           = new List <float>(16);
        this.updateNPC(inipos.x, inipos.y);
        this.SetActive(false);
    }
Beispiel #23
0
    // Token: 0x060008DC RID: 2268 RVA: 0x000B5C4C File Offset: 0x000B3E4C
    public void Recv_MSG_GAMBLE_JACKPOT(MessagePacket MP)
    {
        GamblingManager.GamebleJackpot gamebleJackpot = new GamblingManager.GamebleJackpot();
        gamebleJackpot.KingdomID = MP.ReadUShort(-1);
        MP.ReadStringPlus(3, gamebleJackpot.Tag, -1);
        MP.ReadStringPlus(13, gamebleJackpot.Name, -1);
        uint num = MP.ReadUInt(-1);

        gamebleJackpot.PrizeWins = MP.ReadUInt(-1);
        gamebleJackpot.GameType  = (UIBattle_Gambling.eMode)MP.ReadByte(-1);
        gamebleJackpot.WonTime   = MP.ReadLong(-1);
        bool flag = DataManager.CompareStr(gamebleJackpot.Name, DataManager.Instance.RoleAttr.Name) == 0;

        this.AddJackpotData(gamebleJackpot);
        if (GUIManager.Instance.FindMenu(EGUIWindow.UI_Battle_Gambling) || gamebleJackpot.KingdomID == DataManager.MapDataController.kingdomData.kingdomID)
        {
            DataManager dataManager = DataManager.Instance;
            CString     cstring     = StringManager.Instance.StaticString1024();
            cstring.Append("<color=#FFFF00>");
            cstring.IntToFormat((long)((ulong)gamebleJackpot.PrizeWins), 1, true);
            cstring.AppendFormat(dataManager.mStringTable.GetStringByID(8473u));
            cstring.Append("</color>");
            MapMonster recordByKey  = DataManager.MapDataController.MapMonsterTable.GetRecordByKey(this.m_GambleEventSave.MonsterID);
            HeroTeam   recordByKey2 = dataManager.TeamTable.GetRecordByKey(recordByKey.MapTeamInfo[0].TeamID);
            Hero       recordByKey3 = dataManager.HeroTable.GetRecordByKey(recordByKey2.Arrays[10].Hero);
            CString    cstring2     = StringManager.Instance.StaticString1024();
            GameConstants.FormatRoleName(cstring2, gamebleJackpot.Name, gamebleJackpot.Tag, null, 0, (gamebleJackpot.KingdomID != DataManager.MapDataController.kingdomData.kingdomID) ? gamebleJackpot.KingdomID : 0, null, null, null, null);
            CString cstring3 = StringManager.Instance.StaticString1024();
            cstring3.Append("<color=#FFFF00>");
            cstring3.Append(cstring2);
            cstring3.Append("</color>");
            CString cstring4 = StringManager.Instance.SpawnString(1024);
            cstring4.StringToFormat(cstring3);
            if (gamebleJackpot.GameType == UIBattle_Gambling.eMode.Normal)
            {
                cstring4.StringToFormat(dataManager.mStringTable.GetStringByID(9171u));
            }
            else
            {
                cstring4.StringToFormat(dataManager.mStringTable.GetStringByID(9179u));
            }
            cstring4.StringToFormat(dataManager.mStringTable.GetStringByID((uint)recordByKey3.HeroName));
            cstring4.StringToFormat(cstring);
            cstring4.AppendFormat(dataManager.mStringTable.GetStringByID(9180u));
            this.GambleCountStr.Add(cstring4);
            GUIManager.Instance.SetRunningText(cstring4);
        }
        GUIManager.Instance.UpdateUI(EGUIWindow.UI_Battle_Gambling, 0, 0);
        GUIManager.Instance.UpdateUI(EGUIWindow.UI_Battle_Gambling, 2, 0);
        if (flag)
        {
            GUIManager.Instance.UpdateUI(EGUIWindow.UI_Battle_Gambling, 9, 0);
        }
        GUIManager.Instance.UpdateUI(EGUIWindow.UI_MonsterCrypt, 0, 0);
    }
Beispiel #24
0
    // Token: 0x06001284 RID: 4740 RVA: 0x00209A98 File Offset: 0x00207C98
    public bool CheckTriggered(long time)
    {
        CString cstring = StringManager.Instance.StaticString1024();

        cstring.ClearString();
        cstring.uLongToFormat((ulong)DataManager.Instance.RoleAttr.UserId, 1, false);
        cstring.AppendFormat(Indemnify.INDEMNIFY_TIME_SAVE_NAME);
        long num = 0L;

        long.TryParse(PlayerPrefs.GetString(cstring.ToString(), "0"), out num);
        return(num >= time);
    }
Beispiel #25
0
    // Token: 0x06001F01 RID: 7937 RVA: 0x003B77C0 File Offset: 0x003B59C0
    public void SetScore()
    {
        bool    flag    = false;
        long    num     = 0L;
        CString cstring = StringManager.Instance.StaticString1024();

        cstring.ClearString();
        cstring.IntToFormat(NetworkManager.UserID, 1, false);
        cstring.AppendFormat("{0}_Score_UseID");
        long.TryParse(PlayerPrefs.GetString(cstring.ToString()), out num);
        if (num != 0L)
        {
            cstring.ClearString();
            cstring.IntToFormat(num, 1, false);
            cstring.AppendFormat("{0}_Score_bScoreFirst");
            bool.TryParse(PlayerPrefs.GetString(cstring.ToString()), out flag);
            if (flag)
            {
                byte b = 0;
                cstring.ClearString();
                cstring.IntToFormat(num, 1, false);
                cstring.AppendFormat("{0}_Score_Count");
                byte.TryParse(PlayerPrefs.GetString(cstring.ToString()), out b);
                b += 1;
                PlayerPrefs.SetString(cstring.ToString(), b.ToString());
            }
            else
            {
                flag = true;
                cstring.ClearString();
                cstring.IntToFormat(num, 1, false);
                cstring.AppendFormat("{0}_Score_bScoreFirst");
                PlayerPrefs.SetString(cstring.ToString(), flag.ToString());
            }
            cstring.ClearString();
            cstring.IntToFormat(num, 1, false);
            cstring.AppendFormat("{0}_Score_CD");
            PlayerPrefs.SetString(cstring.ToString(), this.DM.ServerTime.ToString());
        }
        else
        {
            PlayerPrefs.SetString(cstring.ToString(), NetworkManager.UserID.ToString());
            long.TryParse(PlayerPrefs.GetString(cstring.ToString()), out num);
            flag = true;
            cstring.ClearString();
            cstring.IntToFormat(num, 1, false);
            cstring.AppendFormat("{0}_Score_bScoreFirst");
            PlayerPrefs.SetString(cstring.ToString(), flag.ToString());
            bool.TryParse(PlayerPrefs.GetString(cstring.ToString()), out flag);
            cstring.ClearString();
            cstring.IntToFormat(num, 1, false);
            cstring.AppendFormat("{0}_Score_CD");
            PlayerPrefs.SetString(cstring.ToString(), this.DM.ServerTime.ToString());
        }
    }
Beispiel #26
0
    // Token: 0x0600140F RID: 5135 RVA: 0x002343CC File Offset: 0x002325CC
    public void LoadChallegeFrame()
    {
        if (DataManager.StageDataController._stageMode != StageMode.Dare)
        {
            return;
        }
        CString cstring = StringManager.Instance.StaticString1024();

        cstring.StringToFormat("ChallegeFrame");
        cstring.AppendFormat("UI/{0}");
        AssetBundle assetBundle = AssetManager.GetAssetBundle(cstring, out this.ChallegeAssKey);

        UnityEngine.Object[] array = assetBundle.LoadAll();
        if (assetBundle == null)
        {
            return;
        }
        UnityEngine.Object[] array2 = assetBundle.LoadAll(typeof(Sprite));
        cstring.ClearString();
        cstring.StringToFormat("ChallegeFrame");
        cstring.AppendFormat("{0}_m");
        this._ChallegeMaterial = (assetBundle.Load(cstring.ToString(), typeof(Material)) as Material);
        for (int i = 0; i < array2.Length; i++)
        {
            Sprite sprite = array2[i] as Sprite;
            if (!(sprite == null))
            {
                cstring.ClearString();
                int startIndex = sprite.name.Length - 3;
                Debug.Log(sprite.name.Substring(startIndex));
                int num;
                if (int.TryParse(sprite.name.Substring(startIndex), out num) && num < this.ChallegeFrame.Length)
                {
                    this.ChallegeFrame[num] = sprite;
                }
            }
        }
    }
Beispiel #27
0
    // Token: 0x060005DE RID: 1502 RVA: 0x00081F14 File Offset: 0x00080114
    public void InitialAsset(string AssetName)
    {
        CString cstring = StringManager.Instance.StaticString1024();

        cstring.StringToFormat(AssetName);
        cstring.AppendFormat("UI/{0}");
        this.m_AssetBundle = AssetManager.GetAssetBundle(cstring, out this.m_AssetBundleKey);
        if (this.m_AssetBundle == null)
        {
            return;
        }
        UnityEngine.Object[] array = this.m_AssetBundle.LoadAll(typeof(Sprite));
        cstring.ClearString();
        cstring.StringToFormat(AssetName);
        cstring.AppendFormat("{0}_m");
        this.m_Material = (this.m_AssetBundle.Load(cstring.ToString(), typeof(Material)) as Material);
        this.m_RefCount = 1;
        this.m_Dict     = new Dictionary <int, Sprite>();
        for (int i = 0; i < array.Length; i++)
        {
            this.m_Dict.Add(array[i].name.GetHashCode(), (Sprite)array[i]);
        }
    }
Beispiel #28
0
    // Token: 0x06001831 RID: 6193 RVA: 0x0028C544 File Offset: 0x0028A744
    private void GetTimeString(CString CStr, uint sec)
    {
        if (sec > 86400u)
        {
            CStr.IntToFormat((long)(sec / 86400u), 1, false);
            CStr.AppendFormat("{0}d");
            return;
        }
        uint num = sec % 86400u;

        if (num >= 3600u)
        {
            CStr.IntToFormat((long)(num / 3600u), 1, false);
            CStr.AppendFormat("{0}h");
            return;
        }
        num %= 3600u;
        CStr.IntToFormat((long)(num / 60u), 2, false);
        CStr.AppendFormat("{0}:");
        num %= 60u;
        CStr.IntToFormat((long)((ulong)num), 2, false);
        CStr.AppendFormat("{0}");
    }
Beispiel #29
0
 // Token: 0x06002878 RID: 10360 RVA: 0x00447000 File Offset: 0x00445200
 public bool PostShare(SocialType Kind)
 {
     if (this.CanShowInvite() && this.ShareAddress != null)
     {
         CString cstring = StringManager.Instance.StaticString1024();
         cstring.ClearString();
         cstring.Append(this.ShareAddress);
         cstring.IntToFormat(DataManager.Instance.RoleAttr.UserId, 1, false);
         cstring.IntToFormat((long)Kind, 1, false);
         cstring.AppendFormat("{0}id={1}&kind={2}");
         return(true);
     }
     return(false);
 }
Beispiel #30
0
 // Token: 0x06001C78 RID: 7288 RVA: 0x003255AC File Offset: 0x003237AC
 private void LoadModel(Hero herodata, out int AssetKey)
 {
     if (herodata.HeroKey == 101)
     {
         this.bundle        = AssetManager.GetAssetBundle("Role/Priest", out AssetKey, false);
         this.bundleRequest = this.bundle.LoadAsync("Priest", typeof(GameObject));
     }
     else
     {
         CString cstring = StringManager.Instance.StaticString1024();
         cstring.IntToFormat((long)herodata.Modle, 5, false);
         cstring.AppendFormat("Role/hero_{0}");
         this.bundle = AssetManager.GetAssetBundle(cstring, out AssetKey);
         if (this.bundle == null)
         {
             cstring.ClearString();
             cstring.IntToFormat(1L, 5, false);
             cstring.AppendFormat("Role/hero_{0}");
             this.bundle = AssetManager.GetAssetBundle(cstring, out AssetKey);
         }
         this.bundleRequest = this.bundle.LoadAsync("m", typeof(GameObject));
     }
 }