Example #1
0
 // Token: 0x060011F3 RID: 4595 RVA: 0x001F225C File Offset: 0x001F045C
 public _FootSkillIcon(RectTransform recttransform, Font font, UISpritesArray IconArray)
 {
     this.recttransform = recttransform;
     this.IconArray     = IconArray;
     this.SkillImg      = recttransform.GetComponent <Image>();
     this.DistText      = recttransform.GetChild(1).GetComponent <UIText>();
     this.DistText.font = font;
     this.DistStr       = StringManager.Instance.SpawnString(30);
 }
Example #2
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);
    }
Example #3
0
 // Token: 0x0600158C RID: 5516 RVA: 0x0024D838 File Offset: 0x0024BA38
 public ReCommandMission(Transform transform, UISpritesArray SpriteArray) : base(transform)
 {
     this.transform           = transform;
     this.SpriteArray         = SpriteArray;
     this.TitleText           = transform.GetChild(0).GetComponent <UIText>();
     this.TitleText.text      = DataManager.Instance.mStringTable.GetStringByID(1531u);
     this.MissionPic          = transform.GetChild(2).GetComponent <Image>();
     this.MissionName         = transform.GetChild(3).GetComponent <UIText>();
     this.NarrativeStr        = StringManager.Instance.SpawnString(100);
     this.SelectTrans         = transform.GetChild(4);
     this.ItemBtn[0]          = transform.GetChild(1).GetComponent <UIButton>();
     this.ItemBtn[0].m_BtnID1 = 11;
 }
Example #4
0
 // Token: 0x0600105E RID: 4190 RVA: 0x001D3F80 File Offset: 0x001D2180
 public void Init(UISpritesArray sp)
 {
     this.Transforms         = new Transform[4];
     this.TitleImage         = null;
     this.LeftFrame          = null;
     this.RightFrame         = null;
     this.GradientBackground = null;
     this.InfoText           = null;
     this.RankingText        = null;
     this.CStr         = StringManager.Instance.SpawnString(100);
     this.bInitFinish  = false;
     this.SpritesArray = sp;
 }
Example #5
0
    // Token: 0x06000C89 RID: 3209 RVA: 0x00125B90 File Offset: 0x00123D90
    public WorldMapYolk(Transform totalityGroup, UISpritesArray tileSprites)
    {
        this.YolkSprite = new Sprite[50];
        for (int i = 0; i < this.YolkSprite.Length; i++)
        {
            this.YolkSprite[i] = tileSprites.GetSprite(10 + i);
        }
        GameObject gameObject = new GameObject("MapTileYolk");

        this.YolkLayout          = gameObject.transform;
        this.YolkLayout.position = Vector3.forward * 1920f;
        this.YolkLayout.SetParent(totalityGroup, false);
        this.poolsCounter   = 0;
        this.sheepTickImage = new WorldMapImage[16];
        this.wolfTickImage  = new WorldMapImage[16];
    }
Example #6
0
 // Token: 0x06001A08 RID: 6664 RVA: 0x002C2700 File Offset: 0x002C0900
 public _CastleItem(Transform transform, UISpritesArray starArray)
 {
     this.gameobject   = transform.gameObject;
     this.StarArray    = starArray;
     this.StarRect     = new RectTransform[5];
     this.StarImg      = new Image[5];
     this.SelectImg    = transform.GetChild(0).GetComponent <Image>();
     this.StarLayerObj = transform.GetChild(2).gameObject;
     for (byte b = 0; b < 5; b += 1)
     {
         this.StarRect[(int)b] = transform.GetChild(2).GetChild((int)b).GetComponent <RectTransform>();
         this.StarImg[(int)b]  = this.StarRect[(int)b].GetComponent <Image>();
     }
     this.MainImg   = transform.GetChild(1).GetComponent <Image>();
     this.AddImg    = transform.GetChild(3).GetComponent <Image>();
     this.NoticeObj = transform.GetChild(4).gameObject;
 }
Example #7
0
        // Token: 0x060011EF RID: 4591 RVA: 0x001F1EC0 File Offset: 0x001F00C0
        public ItemSkill(Transform transform, Font font, UISpritesArray SkillIconArray, GUIWindow win) : base(transform)
        {
            this.SkillIcon = new _FootSkillIcon(base.recttransform.GetChild(0) as RectTransform, font, SkillIconArray);
            for (int i = 0; i < this.Context.Length; i++)
            {
                this.Context[i]      = base.recttransform.GetChild(i + 1).GetComponent <UIText>();
                this.Context[i].font = font;
            }
            this.TimeText      = base.recttransform.GetChild(4).GetChild(1).GetComponent <Text>();
            this.TimeText.font = font;
            UIButtonHint uibuttonHint = base.recttransform.GetChild(5).gameObject.AddComponent <UIButtonHint>();

            uibuttonHint.m_eHint   = EUIButtonHint.DownUpHandler;
            uibuttonHint.m_Handler = win;
            uibuttonHint.Parm1     = 12561;
            this.TimeStr           = StringManager.Instance.SpawnString(30);
            this.ContStr[0]        = StringManager.Instance.SpawnString(30);
            this.ContStr[1]        = StringManager.Instance.SpawnString(128);
        }
Example #8
0
    // Token: 0x06000B49 RID: 2889 RVA: 0x00105728 File Offset: 0x00103928
    public MapTileLevel(Transform realmGroup, UISpritesArray tileSprites)
    {
        this.LevelSprite = new Sprite[25];
        for (int i = 0; i < this.LevelSprite.Length; i++)
        {
            this.LevelSprite[i] = tileSprites.GetSprite(i + 113);
        }
        this.DarkLevelSprite = new Sprite[5];
        for (int j = 0; j < this.DarkLevelSprite.Length; j++)
        {
            this.DarkLevelSprite[j] = tileSprites.GetSprite(j + 256);
        }
        GameObject gameObject = new GameObject("MapTileLevel");

        this.LevelLayout          = gameObject.transform;
        this.LevelLayout.position = Vector3.forward * 3968f;
        this.LevelLayout.SetParent(realmGroup, false);
        this.poolsCounter = 0;
    }
Example #9
0
 // Token: 0x06001575 RID: 5493 RVA: 0x0024C7D8 File Offset: 0x0024A9D8
 public AffairMission(Transform transform, UISpritesArray spriteArray, _MissionTimeBar timebar)
 {
     this.transform           = transform;
     this.TimeBar             = timebar;
     this.SpriteArray         = spriteArray;
     this.NameStr             = StringManager.Instance.SpawnString(200);
     this.BarLink             = transform.GetChild(2);
     this.ItemBtn             = new UIButton[1];
     this.ItemBtn[0]          = transform.GetComponent <UIButton>();
     this.ItemBtn[0].m_BtnID1 = 11;
     this.SelectTrans         = transform.GetChild(4);
     this.Icon                = transform.GetChild(0).GetComponent <Image>();
     this.NameText            = transform.GetChild(1).GetComponent <UIText>();
     this.RewardBtn           = transform.GetChild(3).GetComponent <UIButton>();
     this.RewardBtn.m_BtnID1  = 7;
     this.RewardBtn.m_Handler = this;
     this.RewardAlpha         = transform.GetChild(3).GetChild(0).GetComponent <CanvasGroup>();
     this.NameText            = transform.GetChild(1).GetComponent <UIText>();
     this.RewardText          = transform.GetChild(3).GetChild(1).GetComponent <UIText>();
 }
Example #10
0
    // Token: 0x0600159A RID: 5530 RVA: 0x0024E04C File Offset: 0x0024C24C
    public ManorMissionKind(Transform transform, eUIMissionKind Kind, UISpritesArray SpriteArray) : base(transform)
    {
        this.Kind           = Kind;
        this.transform      = transform;
        this.TitleText      = transform.GetChild(0).GetComponent <UIText>();
        this.TitleText.text = DataManager.Instance.mStringTable.GetStringByID((uint)(1533 + Kind));
        this.MissionSlot    = new _MissionSlot[ManorAimMission.MaxSlot];
        Image component = transform.GetComponent <Image>();

        component.sprite = SpriteArray.GetSprite(1);
        for (int i = 0; i < ManorAimMission.MaxSlot; i++)
        {
            this.MissionSlot[i] = new _MissionSlot();
            this.MissionSlot[i].Init(transform.GetChild(1 + i), this);
            this.MissionSlot[i].Reward.gameObject.SetActive(false);
            this.ItemBtn[i]          = this.MissionSlot[i].ItemBtn;
            this.ItemBtn[i].m_BtnID4 = i;
            component        = this.MissionSlot[i].transform.GetComponent <Image>();
            component.sprite = SpriteArray.GetSprite(3);
        }
        this.MissionData = DataManager.MissionDataManager.UIManorAimKind[(int)((byte)Kind)];
        this.MissionIDs  = new ushort[ManorAimMission.MaxSlot];
    }
Example #11
0
    // Token: 0x06000C74 RID: 3188 RVA: 0x00122A60 File Offset: 0x00120C60
    public WorldMapName(Transform totalityGroup, UISpritesArray tileSprites)
    {
        GameObject gameObject = new GameObject("WorldMapNameName");

        this.BloodNameLayout          = gameObject.transform;
        this.BloodNameLayout.position = Vector3.forward * 1664f;
        this.BloodNameLayout.SetParent(totalityGroup, false);
        Color color = new Color(0f, 0f, 0f, 0.3f);

        this.NameTex = new Texture2D(2, 2);
        for (int i = 0; i < this.NameTex.height; i++)
        {
            for (int j = 0; j < this.NameTex.width; j++)
            {
                this.NameTex.SetPixel(j, i, color);
            }
        }
        this.NameTex.Apply();
        this.NameSprite                = Sprite.Create(this.NameTex, new Rect(0f, 0f, 2f, 2f), new Vector2(0.5f, 0.5f));
        this.PointPoolsCounter         = 0;
        this.myPosSprite               = tileSprites.GetSprite(0);
        this.myPosMaterial             = new Material(tileSprites.m_Image.material);
        this.myPosMaterial.renderQueue = 2800;
    }
Example #12
0
    // Token: 0x06000C6D RID: 3181 RVA: 0x001202FC File Offset: 0x0011E4FC
    public WorldMapGraphic(Transform totalityGroup, UISpritesArray tileSprites)
    {
        this.WorldMapSprites[0] = tileSprites.GetSprite(1);
        this.WorldMapSprites[1] = tileSprites.GetSprite(9);
        this.WorldMapSprites[3] = tileSprites.GetSprite(101);
        int num = 60;

        for (int i = 4; i < this.WorldMapSprites.Length - 2; i++)
        {
            this.WorldMapSprites[i] = tileSprites.GetSprite(num);
            num++;
        }
        this.WorldMapSprites[44]               = tileSprites.GetSprite(102);
        this.WorldMapSprites[45]               = tileSprites.GetSprite(103);
        this.GraphicSpriteMaterial             = new Material(tileSprites.m_Image.material);
        this.GraphicSpriteMaterial.renderQueue = 2750;
        GameObject gameObject = new GameObject("WorldMapGraphic");

        this.GraphicLayout          = gameObject.transform;
        this.GraphicLayout.position = Vector3.forward * 1536f;
        this.GraphicLayout.SetParent(totalityGroup, false);
        gameObject = new GameObject("G1");
        this.G1    = gameObject.transform;
        this.G1.SetParent(this.GraphicLayout, false);
        gameObject = new GameObject("G2");
        this.G2    = gameObject.transform;
        this.G2.SetParent(this.GraphicLayout, false);
        gameObject = new GameObject("G3");
        this.G3    = gameObject.transform;
        this.G3.SetParent(this.GraphicLayout, false);
        this.kindomYolkHeight = new float[tileSprites.m_Sprites.Length - 10];
        for (int j = 0; j < this.kindomYolkHeight.Length; j++)
        {
            this.kindomYolkHeight[j] = tileSprites.GetSprite(j + 10).rect.size.y;
        }
    }
Example #13
0
 // Token: 0x06000B8A RID: 2954 RVA: 0x0010C160 File Offset: 0x0010A360
 public void setNPC(ushort npcNum, uint npcTableID, int row, int col, Vector2 pos)
 {
     if (npcNum < 2)
     {
         if (this.NPCs[col][row] != null)
         {
             this.pushNPC(row, col);
         }
     }
     else
     {
         if (this.NPCs[col][row] != null && ((int)this.NPCs[col][row].NPCKindID >= this.NPCNum.Length || this.NPCNum[(int)this.NPCs[col][row].NPCKindID] != npcNum))
         {
             this.pushNPC(row, col);
         }
         if (this.NPCs[col][row] == null)
         {
             int num = 0;
             int i   = 0;
             while (i < (int)this.NPCKindCount)
             {
                 num %= this.NPCNum.Length;
                 if (this.NPCNum[num] == npcNum)
                 {
                     break;
                 }
                 i++;
                 num++;
             }
             if (i == (int)this.NPCKindCount)
             {
                 num %= this.NPCNum.Length;
                 this.NPCNum[num] = npcNum;
                 MapMonster recordByKey = DataManager.MapDataController.MapMonsterTable.GetRecordByKey(npcNum);
                 CString    cstring     = StringManager.Instance.SpawnString(30);
                 cstring.ClearString();
                 cstring.IntToFormat((long)recordByKey.MapNPCNO, 3, false);
                 cstring.AppendFormat("UI/NPC_{0}");
                 AssetBundle assetBundle = (!AssetManager.GetAssetBundleDownload(cstring, AssetPath.UI, AssetType.NPC, recordByKey.MapNPCNO, true)) ? null : AssetManager.GetAssetBundle(cstring, out this.NPCABKey[num]);
                 StringManager.Instance.DeSpawnString(cstring);
                 if (assetBundle == null)
                 {
                     return;
                 }
                 this.NPCKindCount += 1;
                 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(this.NPCABLayout, false);
                 this.NPCSprite[num][0]            = component.m_Sprites;
                 this.NPCSprite[num][1]            = component2.m_Sprites;
                 this.NPCSprite[num][2]            = component3.m_Sprites;
                 this.HitFrame[num]                = recordByKey.HitFrame;
                 this.NPCMaterial[num]             = component.m_Image.material;
                 this.NPCMaterial[num].renderQueue = 2600;
                 Vector3 vector = GameConstants.WordToVector3(recordByKey.Xoffset, recordByKey.Yoffset, 0, -100, 0.01f);
                 this.npcposxoffset[num] = vector.x * 1.29032f / this.npcscale;
                 this.npcposyoffset[num] = vector.y * 4f * 1.29032f / this.npcscale;
                 if ((int)this.NPCKindCount <= this.NPCNum.Length)
                 {
                     this.poolsCounter[num]   = 1;
                     this.poolCounter[num]    = new int[64];
                     this.poolCounter[num][0] = 4;
                     this.NPCPools[num]       = new NPC[64][];
                     this.NPCPools[num][0]    = new NPC[this.poolCounter[num][0]];
                     for (int j = 0; j < this.poolCounter[num][0]; j++)
                     {
                         this.NPCPools[num][0][j] = new NPC(pos, (byte)num, NPCState.NPC_Idle, this);
                     }
                 }
                 else
                 {
                     for (int k = 0; k < this.poolsCounter[num]; k++)
                     {
                         for (int l = 0; l < this.poolCounter[num][k]; l++)
                         {
                             this.NPCPools[num][k][l].NPCSpriteRenderer.material = this.NPCMaterial[num];
                         }
                     }
                 }
             }
             int m;
             for (m = 0; m < this.poolsCounter[num]; m++)
             {
                 if (this.poolCounter[num][m] > 0)
                 {
                     this.poolCounter[num][m]--;
                     this.NPCs[col][row] = this.NPCPools[num][m][this.poolCounter[num][m]];
                     this.NPCPools[num][m][this.poolCounter[num][m]] = null;
                     break;
                 }
             }
             if (m == this.poolsCounter[num])
             {
                 this.NPCPools[num][m] = new NPC[this.NPCPools[num][0].Length];
                 for (int n = 0; n < this.NPCPools[num][m].Length; n++)
                 {
                     this.NPCPools[num][m][n] = new NPC(pos, (byte)num, NPCState.NPC_Idle, this);
                 }
                 this.poolsCounter[num]++;
                 this.poolCounter[num][m] = this.NPCPools[num][m].Length;
                 this.poolCounter[num][m]--;
                 this.NPCs[col][row] = this.NPCPools[num][m][this.poolCounter[num][m]];
                 this.NPCPools[num][m][this.poolCounter[num][m]] = null;
             }
             this.NPCs[col][row].SetActive(true);
             int num2 = 0;
             int num3 = 0;
             for (m = 0; m < this.npcfighters.Count; m++)
             {
                 this.mapTileController.MapIDtoMapTileRowCol(this.npcfighters[m].mapID, ref num2, ref num3);
                 if (num2 == row && col == num3)
                 {
                     this.setNPC(row, col, this.npcfighters[m].linefighter, this.npcfighters[m].mapID);
                     this.npcfighters.RemoveAt(m);
                     break;
                 }
             }
         }
         this.setNPC(row, col, pos, npcTableID);
     }
 }
Example #14
0
 // Token: 0x06001396 RID: 5014 RVA: 0x0022E154 File Offset: 0x0022C354
 public override void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
 {
     if (dataIdx == 0)
     {
         item.transform.GetChild(0).gameObject.SetActive(true);
         item.transform.GetChild(1).gameObject.SetActive(false);
         UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(4717u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(11011u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
     }
     else
     {
         item.transform.GetChild(0).gameObject.SetActive(false);
         item.transform.GetChild(1).gameObject.SetActive(true);
         item.transform.GetChild(1).GetChild(11).gameObject.SetActive(false);
         item.transform.GetChild(1).GetChild(12).gameObject.SetActive(false);
         this.SortTextArray[0, panelObjectIdx].ClearString();
         this.SortTextArray[0, panelObjectIdx].IntToFormat((long)dataIdx, 1, false);
         this.SortTextArray[0, panelObjectIdx].AppendFormat("{0}");
         UIText component = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
         component.text = this.SortTextArray[0, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[1, panelObjectIdx].ClearString();
         GameConstants.GetNameString(this.SortTextArray[1, panelObjectIdx], LeaderBoardManager.Instance.NobileBoard[dataIdx - 1].HomeKingdomID, LeaderBoardManager.Instance.NobileBoard[dataIdx - 1].Name, LeaderBoardManager.Instance.NobileBoard[dataIdx - 1].AllianceTag, true);
         component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
         component.text = this.SortTextArray[1, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[2, panelObjectIdx].ClearString();
         GameConstants.GetTimeString(this.SortTextArray[2, panelObjectIdx], LeaderBoardManager.Instance.NobileBoard[dataIdx - 1].OccupyTime, false, false, true, false, true);
         component           = item.transform.GetChild(1).GetChild(6).GetComponent <UIText>();
         component.text      = this.SortTextArray[2, panelObjectIdx].ToString();
         component.alignment = TextAnchor.MiddleCenter;
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         if (dataIdx % 2 == 0)
         {
             UISpritesArray component2 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
             component2 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
             component2 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
         }
         else
         {
             UISpritesArray component2 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
             component2 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
             component2 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
         }
         UIButton component3 = item.transform.GetChild(1).GetChild(10).GetComponent <UIButton>();
         component3.m_Handler = this;
         component3.m_BtnID1  = 10;
         component3.m_BtnID2  = dataIdx - 1;
     }
 }
Example #15
0
    // Token: 0x0600133E RID: 4926 RVA: 0x0021B5AC File Offset: 0x002197AC
    public void UpdatRow_Boards(GameObject item, int dataIdx, int panelObjectIdx)
    {
        if (dataIdx == 0)
        {
            byte subBoardID = UIKVKLBoard.SubBoardID;
            switch (subBoardID)
            {
            case 5:
            {
                item.transform.GetChild(0).gameObject.SetActive(true);
                item.transform.GetChild(1).gameObject.SetActive(false);
                UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(9850u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(9851u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;
            }

            case 6:
            {
                item.transform.GetChild(0).gameObject.SetActive(true);
                item.transform.GetChild(1).gameObject.SetActive(false);
                UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7094u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(9857u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;
            }

            case 7:
            {
                item.transform.GetChild(0).gameObject.SetActive(true);
                item.transform.GetChild(1).gameObject.SetActive(false);
                UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7063u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(9858u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;
            }

            default:
                if (subBoardID == 15)
                {
                    item.transform.GetChild(0).gameObject.SetActive(true);
                    item.transform.GetChild(1).gameObject.SetActive(false);
                    UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
                    component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
                    component.SetAllDirty();
                    component.cachedTextGenerator.Invalidate();
                    component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
                    component.text = DataManager.Instance.mStringTable.GetStringByID(7063u);
                    component.SetAllDirty();
                    component.cachedTextGenerator.Invalidate();
                    component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
                    component.text = DataManager.Instance.mStringTable.GetStringByID(9858u);
                    component.SetAllDirty();
                    component.cachedTextGenerator.Invalidate();
                }
                break;
            }
        }
        else
        {
            LeaderBoardManager.Instance.CheckNextPart(UIKVKLBoard.SubBoardID, (byte)dataIdx);
            item.transform.GetChild(0).gameObject.SetActive(false);
            item.transform.GetChild(1).gameObject.SetActive(true);
            this.SortTextArray[0, panelObjectIdx].ClearString();
            this.SortTextArray[0, panelObjectIdx].IntToFormat((long)dataIdx, 1, false);
            this.SortTextArray[0, panelObjectIdx].AppendFormat("{0}");
            UIText component = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
            component.text = this.SortTextArray[0, panelObjectIdx].ToString();
            component.SetAllDirty();
            component.cachedTextGenerator.Invalidate();
            byte subBoardID = UIKVKLBoard.SubBoardID;
            switch (subBoardID)
            {
            case 5:
            {
                CString cstring = StringManager.Instance.StaticString1024();
                cstring.ClearString();
                DataManager.MapDataController.GetKingdomName(((BoardUnitKingdom)LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1]).KingdomID, ref cstring);
                this.SortTextArray[1, panelObjectIdx].ClearString();
                this.SortTextArray[1, panelObjectIdx].IntToFormat((long)((BoardUnitKingdom)LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1]).KingdomID, 1, false);
                this.SortTextArray[1, panelObjectIdx].StringToFormat(cstring);
                this.SortTextArray[1, panelObjectIdx].AppendFormat("#{0} {1}");
                component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
                component.text = this.SortTextArray[1, panelObjectIdx].ToString();
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;
            }

            case 6:
                this.SortTextArray[1, panelObjectIdx].ClearString();
                GameConstants.GetNameString(this.SortTextArray[1, panelObjectIdx], ((BoardUnitKingdomWarAlliance)LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1]).KingdomID, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].Name, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].AlliaceTag, false);
                component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
                component.text = this.SortTextArray[1, panelObjectIdx].ToString();
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;

            case 7:
                this.SortTextArray[1, panelObjectIdx].ClearString();
                GameConstants.GetNameString(this.SortTextArray[1, panelObjectIdx], 0, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].Name, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].AlliaceTag, false);
                component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
                component.text = this.SortTextArray[1, panelObjectIdx].ToString();
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;

            default:
                if (subBoardID == 15)
                {
                    this.SortTextArray[1, panelObjectIdx].ClearString();
                    GameConstants.GetNameString(this.SortTextArray[1, panelObjectIdx], ((WorldRankingBoardUnit)LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1]).KingdomID, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].Name, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].AlliaceTag, false);
                    component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
                    component.text = this.SortTextArray[1, panelObjectIdx].ToString();
                    component.SetAllDirty();
                    component.cachedTextGenerator.Invalidate();
                }
                break;
            }
            this.SortTextArray[2, panelObjectIdx].ClearString();
            if (UIKVKLBoard.SubBoardID == 5)
            {
                item.transform.GetChild(1).GetChild(11).gameObject.SetActive(false);
                item.transform.GetChild(1).GetChild(12).gameObject.SetActive(false);
                item.transform.GetChild(1).GetChild(1).gameObject.SetActive(true);
                if (((BoardUnitKingdom)LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1]).KingKingdomID != 0)
                {
                    if (((BoardUnitKingdom)LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1]).KingKingdomID == ((BoardUnitKingdom)LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1]).KingdomID)
                    {
                        GameConstants.GetNameString(this.SortTextArray[2, panelObjectIdx], ((BoardUnitKingdom)LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1]).KingKingdomID, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].Name, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].AlliaceTag, true);
                    }
                    else
                    {
                        GameConstants.GetNameString(this.SortTextArray[2, panelObjectIdx], ((BoardUnitKingdom)LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1]).KingKingdomID, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].Name, LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].AlliaceTag, true);
                        this.SortTextArray[2, panelObjectIdx].Insert(0, "<color=#FFD74CFF>", -1);
                        this.SortTextArray[2, panelObjectIdx].Append("</color>");
                    }
                }
            }
            else
            {
                item.transform.GetChild(1).GetChild(11).gameObject.SetActive(false);
                item.transform.GetChild(1).GetChild(12).gameObject.SetActive(false);
                item.transform.GetChild(1).GetChild(1).gameObject.SetActive(true);
                this.SortTextArray[2, panelObjectIdx].uLongToFormat(LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].Value, 1, true);
                this.SortTextArray[2, panelObjectIdx].AppendFormat("{0}");
            }
            component      = item.transform.GetChild(1).GetChild(6).GetComponent <UIText>();
            component.text = this.SortTextArray[2, panelObjectIdx].ToString();
            component.SetAllDirty();
            component.cachedTextGenerator.Invalidate();
            UIButton component2 = item.transform.GetChild(1).GetChild(10).GetComponent <UIButton>();
            component2.m_Handler = this;
            component2.m_BtnID1  = 4;
            component2.m_BtnID2  = dataIdx - 1;
            if (UIKVKLBoard.SubBoardID == 5 && LeaderBoardManager.Instance.Boards[(int)UIKVKLBoard.SubBoardID][dataIdx - 1].Name.Length == 0)
            {
                component2.gameObject.SetActive(false);
            }
            else
            {
                component2.gameObject.SetActive(true);
            }
            if (dataIdx == (int)LeaderBoardManager.Instance.MyRank[(int)UIKVKLBoard.SubBoardID])
            {
                UISpritesArray component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(2);
                component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(2);
                component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(2);
            }
            else if (dataIdx % 2 == 0)
            {
                UISpritesArray component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(1);
                component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(1);
                component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(1);
            }
            else
            {
                UISpritesArray component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(0);
                component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(0);
                component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(0);
            }
        }
    }
Example #16
0
 // Token: 0x060012FF RID: 4863 RVA: 0x00210EBC File Offset: 0x0020F0BC
 public override void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
 {
     if (dataIdx == 0)
     {
         item.transform.GetChild(0).gameObject.SetActive(true);
         item.transform.GetChild(1).gameObject.SetActive(false);
         UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(1364u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(4612u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component = item.transform.GetChild(0).GetChild(7).GetComponent <UIText>();
         component.gameObject.SetActive(true);
         component.text = DataManager.Instance.mStringTable.GetStringByID(9857u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
     }
     else
     {
         item.transform.GetChild(0).gameObject.SetActive(false);
         item.transform.GetChild(1).gameObject.SetActive(true);
         item.transform.GetChild(1).GetChild(11).gameObject.SetActive(false);
         this.SortTextArray[0, panelObjectIdx].ClearString();
         this.SortTextArray[0, panelObjectIdx].IntToFormat((long)dataIdx, 1, false);
         this.SortTextArray[0, panelObjectIdx].AppendFormat("{0}");
         UIText component = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
         component.text = this.SortTextArray[0, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[1, panelObjectIdx].ClearString();
         GameConstants.GetNameString(this.SortTextArray[1, panelObjectIdx], LeaderBoardManager.Instance.MobilizationAlliWorldBoard[dataIdx - 1].KingdomID, LeaderBoardManager.Instance.MobilizationAlliWorldBoard[dataIdx - 1].Name, LeaderBoardManager.Instance.MobilizationAlliWorldBoard[dataIdx - 1].AllianceTag, false);
         component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
         component.text = this.SortTextArray[1, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[2, panelObjectIdx].ClearString();
         this.SortTextArray[2, panelObjectIdx].uLongToFormat((ulong)LeaderBoardManager.Instance.MobilizationAlliWorldBoard[dataIdx - 1].Score, 1, true);
         this.SortTextArray[2, panelObjectIdx].AppendFormat("{0}");
         component      = item.transform.GetChild(1).GetChild(6).GetComponent <UIText>();
         component.text = this.SortTextArray[2, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         UIButton component2 = item.transform.GetChild(1).GetChild(10).GetComponent <UIButton>();
         component2.m_Handler = this;
         component2.m_BtnID1  = 1;
         component2.m_BtnID2  = dataIdx - 1;
         this.SortTextArray[3, panelObjectIdx].ClearString();
         component = item.transform.GetChild(1).GetChild(9).GetComponent <UIText>();
         UISpritesArray component3 = item.transform.GetChild(1).GetChild(8).GetComponent <UISpritesArray>();
         if (LeaderBoardManager.Instance.MobilizationAlliWorldBoard[dataIdx - 1].State == 1)
         {
             this.SortTextArray[3, panelObjectIdx].IntToFormat((long)LeaderBoardManager.Instance.MobilizationAlliWorldBoard[dataIdx - 1].ChangeRank, 1, true);
             this.SortTextArray[3, panelObjectIdx].AppendFormat("{0}");
             component3.SetSpriteIndex(0);
             component3.gameObject.SetActive(true);
             component.gameObject.SetActive(true);
             component.color = Color.white;
             component.rectTransform.anchoredPosition = new Vector2(component.rectTransform.anchoredPosition.x, -19.5f);
         }
         else if (LeaderBoardManager.Instance.MobilizationAlliWorldBoard[dataIdx - 1].State == 2)
         {
             this.SortTextArray[3, panelObjectIdx].IntToFormat((long)LeaderBoardManager.Instance.MobilizationAlliWorldBoard[dataIdx - 1].ChangeRank, 1, true);
             this.SortTextArray[3, panelObjectIdx].AppendFormat("{0}");
             component3.SetSpriteIndex(1);
             component3.gameObject.SetActive(true);
             component.gameObject.SetActive(true);
             component.color = Color.white;
             component.rectTransform.anchoredPosition = new Vector2(component.rectTransform.anchoredPosition.x, -19.5f);
         }
         else if (LeaderBoardManager.Instance.MobilizationAlliWorldBoard[dataIdx - 1].State == 3)
         {
             this.SortTextArray[3, panelObjectIdx].Append(DataManager.Instance.mStringTable.GetStringByID(17250u));
             component3.gameObject.SetActive(false);
             component.gameObject.SetActive(true);
             component.color = new Color32(byte.MaxValue, byte.MaxValue, 0, byte.MaxValue);
             component.rectTransform.anchoredPosition = new Vector2(component.rectTransform.anchoredPosition.x, -10f);
         }
         else
         {
             component3.gameObject.SetActive(false);
             component.gameObject.SetActive(false);
         }
         component.text = this.SortTextArray[3, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         if (dataIdx == LeaderBoardManager.Instance.MobilizationAlliWorldRank)
         {
             component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(2);
             component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(2);
             component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(2);
             component3 = item.transform.GetChild(1).GetChild(3).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(2);
         }
         else if (dataIdx % 2 == 0)
         {
             component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(1);
             component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(1);
             component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(1);
             component3 = item.transform.GetChild(1).GetChild(3).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(1);
         }
         else
         {
             component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(0);
             component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(0);
             component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(0);
             component3 = item.transform.GetChild(1).GetChild(3).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(0);
         }
     }
 }
Example #17
0
    // Token: 0x06001322 RID: 4898 RVA: 0x0021589C File Offset: 0x00213A9C
    public void UpdatRow_Boards(GameObject item, int dataIdx, int panelObjectIdx)
    {
        if (dataIdx == 0)
        {
            switch (UIFootBallBoard.SubBoardID)
            {
            case 16:
            {
                item.transform.GetChild(0).gameObject.SetActive(true);
                item.transform.GetChild(1).gameObject.SetActive(false);
                UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7094u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(9857u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;
            }

            case 17:
            {
                item.transform.GetChild(0).gameObject.SetActive(true);
                item.transform.GetChild(1).gameObject.SetActive(false);
                UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7063u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(9858u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;
            }

            case 18:
            {
                item.transform.GetChild(0).gameObject.SetActive(true);
                item.transform.GetChild(1).gameObject.SetActive(false);
                UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(7063u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
                component.text = DataManager.Instance.mStringTable.GetStringByID(9858u);
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;
            }
            }
        }
        else
        {
            LeaderBoardManager.Instance.CheckNextPart(UIFootBallBoard.SubBoardID, (byte)dataIdx);
            item.transform.GetChild(0).gameObject.SetActive(false);
            item.transform.GetChild(1).gameObject.SetActive(true);
            this.SortTextArray[0, panelObjectIdx].ClearString();
            this.SortTextArray[0, panelObjectIdx].IntToFormat((long)dataIdx, 1, false);
            this.SortTextArray[0, panelObjectIdx].AppendFormat("{0}");
            UIText component = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
            component.text = this.SortTextArray[0, panelObjectIdx].ToString();
            component.SetAllDirty();
            component.cachedTextGenerator.Invalidate();
            switch (UIFootBallBoard.SubBoardID)
            {
            case 16:
                this.SortTextArray[1, panelObjectIdx].ClearString();
                GameConstants.GetNameString(this.SortTextArray[1, panelObjectIdx], ((WorldRankingBoardUnitAlliance)LeaderBoardManager.Instance.Boards[(int)UIFootBallBoard.SubBoardID][dataIdx - 1]).KingdomID, LeaderBoardManager.Instance.Boards[(int)UIFootBallBoard.SubBoardID][dataIdx - 1].Name, LeaderBoardManager.Instance.Boards[(int)UIFootBallBoard.SubBoardID][dataIdx - 1].AlliaceTag, false);
                component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
                component.text = this.SortTextArray[1, panelObjectIdx].ToString();
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;

            case 17:
                this.SortTextArray[1, panelObjectIdx].ClearString();
                GameConstants.GetNameString(this.SortTextArray[1, panelObjectIdx], ((WorldRankingBoardUnit)LeaderBoardManager.Instance.Boards[(int)UIFootBallBoard.SubBoardID][dataIdx - 1]).KingdomID, LeaderBoardManager.Instance.Boards[(int)UIFootBallBoard.SubBoardID][dataIdx - 1].Name, LeaderBoardManager.Instance.Boards[(int)UIFootBallBoard.SubBoardID][dataIdx - 1].AlliaceTag, false);
                component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
                component.text = this.SortTextArray[1, panelObjectIdx].ToString();
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;

            case 18:
                this.SortTextArray[1, panelObjectIdx].ClearString();
                GameConstants.GetNameString(this.SortTextArray[1, panelObjectIdx], 0, LeaderBoardManager.Instance.Boards[(int)UIFootBallBoard.SubBoardID][dataIdx - 1].Name, LeaderBoardManager.Instance.Boards[(int)UIFootBallBoard.SubBoardID][dataIdx - 1].AlliaceTag, false);
                component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
                component.text = this.SortTextArray[1, panelObjectIdx].ToString();
                component.SetAllDirty();
                component.cachedTextGenerator.Invalidate();
                break;
            }
            this.SortTextArray[2, panelObjectIdx].ClearString();
            item.transform.GetChild(1).GetChild(11).gameObject.SetActive(false);
            item.transform.GetChild(1).GetChild(12).gameObject.SetActive(false);
            item.transform.GetChild(1).GetChild(1).gameObject.SetActive(true);
            this.SortTextArray[2, panelObjectIdx].uLongToFormat(LeaderBoardManager.Instance.Boards[(int)UIFootBallBoard.SubBoardID][dataIdx - 1].Value, 1, true);
            this.SortTextArray[2, panelObjectIdx].AppendFormat("{0}");
            component      = item.transform.GetChild(1).GetChild(6).GetComponent <UIText>();
            component.text = this.SortTextArray[2, panelObjectIdx].ToString();
            component.SetAllDirty();
            component.cachedTextGenerator.Invalidate();
            UIButton component2 = item.transform.GetChild(1).GetChild(10).GetComponent <UIButton>();
            component2.m_Handler = this;
            component2.m_BtnID1  = 4;
            component2.m_BtnID2  = dataIdx - 1;
            if (dataIdx == (int)LeaderBoardManager.Instance.MyRank[(int)UIFootBallBoard.SubBoardID])
            {
                UISpritesArray component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(2);
                component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(2);
                component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(2);
            }
            else if (dataIdx % 2 == 0)
            {
                UISpritesArray component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(1);
                component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(1);
                component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(1);
            }
            else
            {
                UISpritesArray component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(0);
                component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(0);
                component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(0);
            }
        }
    }
Example #18
0
    // Token: 0x060000F5 RID: 245 RVA: 0x00010FE8 File Offset: 0x0000F1E8
    public void SpawnNPC(Vector2 inipos, float iniscale, sbyte iniDir, byte npcID, UINPCState npcState, Transform parent, ref int ABKey)
    {
        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 = null;

        if (AssetManager.GetAssetBundleDownload(cstring, AssetPath.UI, AssetType.NPC, recordByKey.MapNPCNO, false))
        {
            assetBundle = AssetManager.GetAssetBundle(cstring, out ABKey);
        }
        StringManager.Instance.DeSpawnString(cstring);
        if (assetBundle == null)
        {
            this.bNeedReload = true;
            return;
        }
        this.bNeedReload   = false;
        this.NPCGameObject = new GameObject("npc");
        RectTransform rectTransform = this.NPCGameObject.AddComponent <RectTransform>();

        rectTransform.localScale = Vector3.one * iniscale;
        this.NPCGameObject.AddComponent <IgnoreRaycast>();
        this.NPCImage        = this.NPCGameObject.AddComponent <Image>();
        this.NPCSpriteObject = (UnityEngine.Object.Instantiate(assetBundle.mainAsset) as GameObject);
        this.NPCSpriteObject.SetActive(false);
        Transform      transform  = this.NPCSpriteObject.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);
        rectTransform.SetParent(parent, false);
        this.NPCImage.material = component.m_Image.material;
        Shader shader = null;

        for (int i = 0; i < AssetManager.Instance.Shaders.Length; i++)
        {
            if (AssetManager.Instance.Shaders[i].name == "zTWRD2 Shaders/UI/Sprites Stencil Alpha R")
            {
                shader = (Shader)AssetManager.Instance.Shaders[i];
                break;
            }
        }
        if (shader != null)
        {
            this.NPCImage.material.shader = shader;
        }
        this.NPCAnimation    = new Sprite[4][];
        this.NPCAnimation[0] = component.m_Sprites;
        this.NPCAnimation[1] = component2.m_Sprites;
        this.NPCAnimation[2] = component3.m_Sprites;
        this.NPCDir          = iniDir;
        if ((int)this.NPCDir == 0)
        {
            this.NPCDir = -1;
            rectTransform.localRotation = Quaternion.Euler(0f, 180f, 0f);
        }
        else
        {
            rectTransform.localRotation = Quaternion.Euler(0f, 0f, 0f);
        }
        this.CurNPCState = ((npcState < UINPCState.UINPC_Max) ? npcState : UINPCState.UINPC_Attack);
        this.SetActive(true, this.CurNPCState);
    }
Example #19
0
 // Token: 0x06001315 RID: 4885 RVA: 0x00213278 File Offset: 0x00211478
 public override void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
 {
     if (dataIdx == 0)
     {
         item.transform.GetChild(0).gameObject.SetActive(true);
         item.transform.GetChild(1).gameObject.SetActive(false);
         UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(17034u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(7094u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(7).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(17039u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
     }
     else
     {
         item.transform.GetChild(0).gameObject.SetActive(false);
         item.transform.GetChild(1).gameObject.SetActive(true);
         item.transform.GetChild(1).GetChild(10).gameObject.SetActive(true);
         item.transform.GetChild(1).GetChild(12).gameObject.SetActive(true);
         this.SortTextArray[0, panelObjectIdx].ClearString();
         this.SortTextArray[0, panelObjectIdx].IntToFormat((long)dataIdx, 1, false);
         this.SortTextArray[0, panelObjectIdx].AppendFormat("{0}");
         UIText component = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
         component.text = this.SortTextArray[0, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[1, panelObjectIdx].ClearString();
         GameConstants.GetNameString(this.SortTextArray[1, panelObjectIdx], 0, LeaderBoardManager.Instance.AllianceWarGroupBoard[dataIdx - 1].Name, LeaderBoardManager.Instance.AllianceWarGroupBoard[dataIdx - 1].AllianceTag, false);
         component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
         component.text = this.SortTextArray[1, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[2, panelObjectIdx].ClearString();
         this.SortTextArray[2, panelObjectIdx].uLongToFormat(LeaderBoardManager.Instance.AllianceWarGroupBoard[dataIdx - 1].Power, 1, true);
         this.SortTextArray[2, panelObjectIdx].AppendFormat("{0}");
         component      = item.transform.GetChild(1).GetChild(6).GetComponent <UIText>();
         component.text = this.SortTextArray[2, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[3, panelObjectIdx].ClearString();
         this.SortTextArray[3, panelObjectIdx].IntToFormat((long)LeaderBoardManager.Instance.AllianceWarGroupBoard[dataIdx - 1].Score, 1, true);
         this.SortTextArray[3, panelObjectIdx].AppendFormat("{0}");
         component      = item.transform.GetChild(1).GetChild(7).GetComponent <UIText>();
         component.text = this.SortTextArray[3, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         if (dataIdx == LeaderBoardManager.Instance.AllianceWarGroupRank)
         {
             UISpritesArray component2 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(2);
             component2 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(2);
             component2 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(2);
             component2 = item.transform.GetChild(1).GetChild(3).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(2);
         }
         else if (dataIdx % 2 == 0)
         {
             UISpritesArray component2 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
             component2 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
             component2 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
             component2 = item.transform.GetChild(1).GetChild(3).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
         }
         else
         {
             UISpritesArray component2 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
             component2 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
             component2 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
             component2 = item.transform.GetChild(1).GetChild(3).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
         }
         UIButton component3 = item.transform.GetChild(1).GetChild(10).GetComponent <UIButton>();
         component3.m_Handler = this;
         component3.m_BtnID1  = 6;
         component3.m_BtnID2  = dataIdx - 1;
         component3           = item.transform.GetChild(1).GetChild(12).GetComponent <UIButton>();
         component3.m_Handler = this;
         component3.m_BtnID1  = 11;
         component3.m_BtnID2  = dataIdx;
         component            = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
         if (dataIdx <= (int)LeaderBoardManager.Instance.AllianceWarGroupRankUpNum)
         {
             component3.m_BtnID3 = 1;
             component.color     = new Color32(byte.MaxValue, byte.MaxValue, 0, byte.MaxValue);
         }
         else if (dataIdx >= (int)LeaderBoardManager.Instance.AllianceWarGroupRankDownNum)
         {
             component3.m_BtnID3 = 2;
             component.color     = new Color32(0, byte.MaxValue, byte.MaxValue, byte.MaxValue);
         }
         else
         {
             component3.m_BtnID3 = 3;
             component.color     = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
         }
         UIButtonHint component4 = item.transform.GetChild(1).GetChild(12).GetComponent <UIButtonHint>();
         component4.Parm1          = (ushort)dataIdx;
         component4.m_eHint        = EUIButtonHint.DownUpHandler;
         component4.m_Handler      = this;
         component4.ControlFadeOut = GUIManager.Instance.m_Arena_Hint.m_RectTransform.gameObject;
     }
 }
Example #20
0
    // Token: 0x06001DF7 RID: 7671 RVA: 0x00387760 File Offset: 0x00385960
    public void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
    {
        Effect recordByKey = this.DM.EffectData.GetRecordByKey(this.effectCompareList[dataIdx].EffectID);

        if (this.effectCompareList[dataIdx].isTitel)
        {
            UIText component = item.transform.GetChild(0).GetComponent <UIText>();
            item.transform.GetChild(0).gameObject.SetActive(true);
            item.transform.GetChild(1).gameObject.SetActive(false);
            item.transform.GetChild(2).gameObject.SetActive(false);
            item.transform.GetChild(3).gameObject.SetActive(false);
            if (this.effectCompareList[dataIdx].group == 255)
            {
                component.text = this.DM.mStringTable.GetStringByID(16141u);
            }
            else
            {
                component.text = this.DM.mStringTable.GetStringByID((uint)((ushort)(8484 + (int)this.effectCompareList[dataIdx].group)));
            }
            component.SetAllDirty();
            component.cachedTextGenerator.Invalidate();
        }
        else if (this.effectCompareList[dataIdx].isNewGemEffect == 0)
        {
            UIText component = item.transform.GetChild(1).GetComponent <UIText>();
            item.transform.GetChild(0).gameObject.SetActive(false);
            item.transform.GetChild(1).gameObject.SetActive(true);
            item.transform.GetChild(2).gameObject.SetActive(false);
            item.transform.GetChild(3).gameObject.SetActive(false);
            this.EffDescText[panelObjectIdx].ClearString();
            this.EffDescText[panelObjectIdx].StringToFormat(this.DM.mStringTable.GetStringByID((uint)recordByKey.InfoID));
            if (this.effectCompareList[dataIdx].isEven)
            {
                this.EffDescText[panelObjectIdx].StringToFormat("<color=#FFFFFF>");
            }
            else if (this.effectCompareList[dataIdx].EffectValue < 0)
            {
                this.EffDescText[panelObjectIdx].StringToFormat("<color=#FF656EFF>");
            }
            else
            {
                this.EffDescText[panelObjectIdx].StringToFormat("<color=#35F76CFF>+");
            }
            if (recordByKey.ValueID == 0)
            {
                this.EffDescText[panelObjectIdx].IntToFormat((long)this.effectCompareList[dataIdx].EffectValue, 1, false);
                this.EffDescText[panelObjectIdx].AppendFormat("<color=#FFEC87FF>{0}</color> {1}{2}</color>");
            }
            else
            {
                float f = (float)this.effectCompareList[dataIdx].EffectValue / 100f;
                this.EffDescText[panelObjectIdx].FloatToFormat(f, 2, false);
                this.EffDescText[panelObjectIdx].AppendFormat("<color=#FFEC87FF>{0}</color> {1}{2}%</color>");
            }
            component.text = this.EffDescText[panelObjectIdx].ToString();
            component.SetAllDirty();
            component.cachedTextGenerator.Invalidate();
        }
        else
        {
            UIText component = item.transform.GetChild(2).GetComponent <UIText>();
            item.transform.GetChild(0).gameObject.SetActive(false);
            item.transform.GetChild(1).gameObject.SetActive(false);
            item.transform.GetChild(2).gameObject.SetActive(true);
            item.transform.GetChild(3).gameObject.SetActive(true);
            this.EffDescText[panelObjectIdx].ClearString();
            LordEquipData.GetNewGemEffectString(this.EffDescText[panelObjectIdx], (byte)this.effectCompareList[dataIdx].EffectID, this.effectCompareList[dataIdx].EffectValue, this.effectCompareList[dataIdx].isEven, this.effectCompareList[dataIdx].useForceColor);
            component.rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, this.GetTextHeight(245f, this.EffDescText[panelObjectIdx], 18));
            component.text     = this.EffDescText[panelObjectIdx].ToString();
            component.fontSize = 17;
            component.SetAllDirty();
            component.cachedTextGenerator.Invalidate();
            UIButtonHint component2 = item.transform.GetChild(3).GetComponent <UIButtonHint>();
            component2.Parm1     = (ushort)(7431 + (int)this.effectCompareList[dataIdx].fromPart);
            component2.m_Handler = this;
            UISpritesArray component3 = item.transform.GetChild(3).GetComponent <UISpritesArray>();
            component3.SetSpriteIndex((int)this.effectCompareList[dataIdx].fromPart);
        }
    }
Example #21
0
    // Token: 0x06001D35 RID: 7477 RVA: 0x00345C84 File Offset: 0x00343E84
    private void SetPrisoner(byte idx)
    {
        this.nowSortedIdx = idx;
        this.DMIdx        = this.DM.sortedPrisonerList[(int)this.nowSortedIdx];
        this.LBtn.gameObject.SetActive(true);
        this.RBtn.gameObject.SetActive(true);
        if (this.nowSortedIdx == 0)
        {
            this.LBtn.gameObject.SetActive(false);
        }
        if ((int)(this.nowSortedIdx + 1) == this.DM.PrisonerList.Length || this.DM.PrisonerList[(int)this.DM.sortedPrisonerList[(int)(this.nowSortedIdx + 1)]].nowStat == PrisonerState.None)
        {
            this.RBtn.gameObject.SetActive(false);
        }
        UIText         component  = this.AGS_Form.GetChild(12).GetComponent <UIText>();
        UISpritesArray component2 = this.AGS_Form.GetChild(11).GetComponent <UISpritesArray>();

        this.tmpString[0].ClearString();
        long num = this.DM.PrisonerList[(int)this.DMIdx].StartActionTime + (long)((ulong)this.DM.PrisonerList[(int)this.DMIdx].TotalTime) - this.DM.ServerTime;

        if (num < 0L)
        {
            num = 0L;
        }
        RectTransform component3 = this.AGS_Form.GetChild(11).GetComponent <RectTransform>();

        switch (this.DM.PrisonerList[(int)this.DMIdx].nowStat)
        {
        case PrisonerState.WaitForRelease:
        {
            this.tmpString[0].Append(this.DM.mStringTable.GetStringByID(7768u));
            component2.SetSpriteIndex(2);
            this.AGS_Form.GetChild(10).gameObject.SetActive(false);
            this.AGS_Form.GetChild(21).gameObject.SetActive(false);
            this.AGS_Form.GetChild(22).gameObject.SetActive(false);
            this.AGS_Form.GetChild(19).gameObject.SetActive(true);
            float num2 = (float)num / this.DM.PrisonerList[(int)this.DMIdx].TotalTime;
            num2 = Mathf.Clamp01(1f - num2);
            component3.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 305f);
            break;
        }

        case PrisonerState.WaitForExecute:
            if (num > 21600L)
            {
                num -= 21600L;
                this.tmpString[0].Append(this.DM.mStringTable.GetStringByID(7759u));
                component2.SetSpriteIndex(1);
                this.AGS_Form.GetChild(10).gameObject.SetActive(false);
                this.AGS_Form.GetChild(21).gameObject.SetActive(false);
                this.AGS_Form.GetChild(22).gameObject.SetActive(true);
                this.AGS_Form.GetChild(19).gameObject.SetActive(true);
                float num2 = (float)num / (this.DM.PrisonerList[(int)this.DMIdx].TotalTime - 21600u);
                num2 = Mathf.Clamp01(1f - num2);
                component3.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 305f);
            }
            else
            {
                this.tmpString[0].Append(this.DM.mStringTable.GetStringByID(7758u));
                component2.SetSpriteIndex(0);
                this.AGS_Form.GetChild(10).gameObject.SetActive(true);
                this.AGS_Form.GetChild(21).gameObject.SetActive(true);
                this.AGS_Form.GetChild(22).gameObject.SetActive(false);
                this.AGS_Form.GetChild(19).gameObject.SetActive(true);
                component2 = this.AGS_Form.GetChild(10).GetComponent <UISpritesArray>();
                component2.SetSpriteIndex(0);
                float num2 = (float)num / 21600f;
                num2 = Mathf.Clamp01(1f - num2);
                component3.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 305f);
            }
            break;

        case PrisonerState.Poisoned:
        {
            this.tmpString[0].Append(this.DM.mStringTable.GetStringByID(15008u));
            component2.SetSpriteIndex(3);
            this.AGS_Form.GetChild(10).gameObject.SetActive(true);
            this.AGS_Form.GetChild(21).gameObject.SetActive(false);
            this.AGS_Form.GetChild(22).gameObject.SetActive(true);
            this.AGS_Form.GetChild(19).gameObject.SetActive(true);
            component2 = this.AGS_Form.GetChild(10).GetComponent <UISpritesArray>();
            component2.SetSpriteIndex(1);
            float num2 = (float)num / this.DM.PrisonerList[(int)this.DMIdx].TotalTime;
            num2 = Mathf.Clamp01(1f - num2);
            component3.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 305f);
            break;
        }
        }
        component.text = this.tmpString[0].ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component = this.AGS_Form.GetChild(13).GetComponent <UIText>();
        this.tmpString[1].ClearString();
        GameConstants.GetTimeString(this.tmpString[1], (uint)num, true, true, true, false, true);
        component.text = this.tmpString[1].ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component = this.AGS_Form.GetChild(14).GetComponent <UIText>();
        this.tmpString[2].ClearString();
        this.tmpString[2].IntToFormat((long)this.DM.PrisonerList[(int)this.DMIdx].LordLevel, 1, false);
        this.tmpString[2].AppendFormat(this.DM.mStringTable.GetStringByID(7757u));
        component.text = this.tmpString[2].ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component = this.AGS_Form.GetChild(15).GetComponent <UIText>();
        this.tmpString[3].ClearString();
        GameConstants.GetNameString(this.tmpString[3], this.DM.PrisonerList[(int)this.DMIdx].KingdomID, this.DM.PrisonerList[(int)this.DMIdx].name, this.DM.PrisonerList[(int)this.DMIdx].AlliTag, false);
        component.text = this.tmpString[3].ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component = this.AGS_Form.GetChild(18).GetComponent <UIText>();
        component.gameObject.SetActive(true);
        this.AGS_Form.GetChild(16).gameObject.SetActive(true);
        this.AGS_Form.GetChild(17).gameObject.SetActive(true);
        this.tmpString[4].ClearString();
        if (this.DM.PrisonerList[(int)this.DMIdx].Ransom > 0u)
        {
            this.tmpString[4].IntToFormat((long)((ulong)this.DM.PrisonerList[(int)this.DMIdx].Ransom), 1, true);
            this.tmpString[4].AppendFormat("{0:N}");
        }
        else
        {
            this.tmpString[4].Append(this.DM.mStringTable.GetStringByID(7786u));
        }
        component.text = this.tmpString[4].ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component = this.AGS_Form.GetChild(19).GetChild(0).GetComponent <UIText>();
        if (this.DM.PrisonerList[(int)this.DMIdx].Ransom > 0u)
        {
            component.text = this.DM.mStringTable.GetStringByID(7767u);
        }
        else
        {
            component.text = this.DM.mStringTable.GetStringByID(7765u);
        }
        this.NowHeroID = this.DM.PrisonerList[(int)this.DMIdx].head;
        this.Create3DObjects();
    }
Example #22
0
    // Token: 0x06001D1A RID: 7450 RVA: 0x00342EB8 File Offset: 0x003410B8
    public void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
    {
        byte b = this.DM.sortedPrisonerList[(int)this.SPdispIdx[dataIdx]];

        this.SPnowIdx[panelObjectIdx] = b;
        this.SPItem[panelObjectIdx]   = item.transform;
        UIHIBtn component = item.transform.GetChild(1).GetComponent <UIHIBtn>();

        GUIManager.Instance.InitianHeroItemImg(component.transform, eHeroOrItem.Hero, this.DM.PrisonerList[(int)b].head, 11, 0, 0, false, false, true, false);
        UIText component2 = item.transform.GetChild(2).GetComponent <UIText>();

        this.SPLv[panelObjectIdx].ClearString();
        this.SPLv[panelObjectIdx].IntToFormat((long)this.DM.PrisonerList[(int)b].LordLevel, 1, false);
        this.SPLv[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7757u));
        component2.text = this.SPLv[panelObjectIdx].ToString();
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = item.transform.GetChild(3).GetComponent <UIText>();
        this.SPName[panelObjectIdx].ClearString();
        GameConstants.GetNameString(this.SPName[panelObjectIdx], this.DM.PrisonerList[(int)b].KingdomID, this.DM.PrisonerList[(int)b].name, this.DM.PrisonerList[(int)b].AlliTag, false);
        component2.text = this.SPName[panelObjectIdx].ToString();
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = item.transform.GetChild(8).GetComponent <UIText>();
        UISpritesArray component3 = item.transform.GetChild(6).GetComponent <UISpritesArray>();
        long           num        = this.DM.PrisonerList[(int)b].StartActionTime + (long)((ulong)this.DM.PrisonerList[(int)b].TotalTime) - this.DM.ServerTime;

        if (num < 0L)
        {
            num = 0L;
        }
        RectTransform component4 = item.transform.GetChild(6).GetComponent <RectTransform>();

        this.SPStat[panelObjectIdx].ClearString();
        switch (this.DM.PrisonerList[(int)b].nowStat)
        {
        case PrisonerState.WaitForRelease:
        {
            this.SPStat[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID(7768u));
            component3.SetSpriteIndex(2);
            item.transform.GetChild(4).gameObject.SetActive(false);
            float num2 = (float)num / this.DM.PrisonerList[(int)b].TotalTime;
            num2 = Mathf.Clamp01(1f - num2);
            component4.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 255f);
            break;
        }

        case PrisonerState.WaitForExecute:
            if (num > 21600L)
            {
                num -= 21600L;
                this.SPStat[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID(7759u));
                component3.SetSpriteIndex(1);
                item.transform.GetChild(4).gameObject.SetActive(false);
                float num2 = (float)num / (this.DM.PrisonerList[(int)b].TotalTime - 21600u);
                num2 = Mathf.Clamp01(1f - num2);
                component4.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 255f);
            }
            else
            {
                this.SPStat[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID(7758u));
                component3.SetSpriteIndex(0);
                item.transform.GetChild(4).gameObject.SetActive(true);
                component3 = item.transform.GetChild(4).GetComponent <UISpritesArray>();
                component3.SetSpriteIndex(0);
                float num2 = (float)num / 21600f;
                num2 = Mathf.Clamp01(1f - num2);
                component4.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 255f);
            }
            break;

        case PrisonerState.Poisoned:
        {
            this.SPStat[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID(15008u));
            component3.SetSpriteIndex(3);
            item.transform.GetChild(4).gameObject.SetActive(true);
            component3 = item.transform.GetChild(4).GetComponent <UISpritesArray>();
            component3.SetSpriteIndex(1);
            float num2 = (float)num / this.DM.PrisonerList[(int)b].TotalTime;
            num2 = Mathf.Clamp01(1f - num2);
            component4.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 255f);
            break;
        }
        }
        component2.text = this.SPStat[panelObjectIdx].ToString();
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        component2 = item.transform.GetChild(9).GetComponent <UIText>();
        this.SPTime[panelObjectIdx].ClearString();
        GameConstants.GetTimeString(this.SPTime[panelObjectIdx], (uint)num, true, true, true, false, true);
        component2.text = this.SPTime[panelObjectIdx].ToString();
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        UIButton component5 = item.transform.GetChild(0).GetComponent <UIButton>();

        component5.m_BtnID1  = (int)this.SPdispIdx[dataIdx];
        component5.m_Handler = this;
    }
Example #23
0
    // Token: 0x06000BB3 RID: 2995 RVA: 0x0010E70C File Offset: 0x0010C90C
    public MapTileSelect(Transform realmGroup, UISpritesArray tileSprites)
    {
        if (this.FBSABKey == 0)
        {
            this.FBSAB     = AssetManager.GetAssetBundle("UI/FootBallSprites", out this.FBSABKey, false);
            this.mFBS      = (UnityEngine.Object.Instantiate(this.FBSAB.mainAsset) as GameObject);
            this.FBSprites = this.mFBS.GetComponent <UISpritesArray>();
            Image component = this.mFBS.GetComponent <Image>();
            this.mFootBall[0]       = new Vector2(0f, 128f);
            this.mFootBall[1]       = new Vector2(128f, 64f);
            this.mFootBall[2]       = new Vector2(256f, 0f);
            this.mFootBall[3]       = new Vector2(128f, -64f);
            this.mFootBall[4]       = new Vector2(0f, -128f);
            this.mFootBall[5]       = new Vector2(-128f, -64f);
            this.mFootBall[6]       = new Vector2(-256f, 0f);
            this.mFootBall[7]       = new Vector2(-128f, 64f);
            this.FootBallGameObject = new GameObject("MapFootBall");
            this.FootBallT          = this.FootBallGameObject.AddComponent <RectTransform>();
            this.FootBallT.position = Vector3.forward * 3840f;
            this.FootBallT.SetParent(realmGroup, false);
            this.FootBallT.sizeDelta        = new Vector2(256f, 128f);
            this.FootBallT.anchoredPosition = Vector2.zero;
            this.FootBallGameObject.SetActive(false);
            for (int i = 0; i < 4; i++)
            {
                this.mGO_FBBG[i]          = new GameObject("FBBG");
                this.mRT_FBBG[i]          = this.mGO_FBBG[i].AddComponent <RectTransform>();
                this.mRT_FBBG[i].position = Vector3.zero;
                this.mRT_FBBG[i].SetParent(this.FootBallT, false);
                this.mRT_FBBG[i].sizeDelta = new Vector2(384f, 192f);
                this.mImg_FBBG[i]          = this.mGO_FBBG[i].AddComponent <Image>();
                this.mImg_FBBG[i].sprite   = this.FBSprites.m_Sprites[0];
                this.mImg_FBBG[i].material = component.material;
                this.mGO_FBBG[i].SetActive(false);
            }
            this.mRT_FBBG[0].anchoredPosition = new Vector2(-this.mRT_FBBG[0].sizeDelta.x / 2f, this.mRT_FBBG[0].sizeDelta.y / 2f);
            this.mRT_FBBG[1].anchoredPosition = new Vector2(this.mRT_FBBG[0].sizeDelta.x / 2f, this.mRT_FBBG[0].sizeDelta.y / 2f);
            this.mRT_FBBG[1].localScale       = new Vector3(-1f, 1f, 1f);
            this.mRT_FBBG[2].anchoredPosition = new Vector2(-this.mRT_FBBG[0].sizeDelta.x / 2f, -this.mRT_FBBG[0].sizeDelta.y / 2f);
            this.mRT_FBBG[2].localScale       = new Vector3(1f, -1f, 1f);
            this.mRT_FBBG[3].anchoredPosition = new Vector2(this.mRT_FBBG[0].sizeDelta.x / 2f, -this.mRT_FBBG[0].sizeDelta.y / 2f);
            this.mRT_FBBG[3].localScale       = new Vector3(-1f, -1f, 1f);
            for (int j = 0; j < 8; j++)
            {
                this.mGO_FBBGD[j]          = new GameObject("mGO_FBBGD");
                this.mRT_FBBGD[j]          = this.mGO_FBBGD[j].AddComponent <RectTransform>();
                this.mRT_FBBGD[j].position = Vector3.zero;
                this.mRT_FBBGD[j].SetParent(this.FootBallT, false);
                this.mRT_FBBGD[j].sizeDelta        = new Vector2(256f, 128f);
                this.mRT_FBBGD[j].anchoredPosition = this.mFootBall[j];
                this.mImg_FBBGD[j]          = this.mGO_FBBGD[j].AddComponent <Image>();
                this.mImg_FBBGD[j].material = component.material;
                this.mGO_FBBGD[j].SetActive(false);
            }
            this.mImg_FBBGD[0].sprite    = this.FBSprites.m_Sprites[3];
            this.mImg_FBBGD[1].sprite    = this.FBSprites.m_Sprites[2];
            this.mRT_FBBGD[1].localScale = new Vector3(-1f, 1f, 1f);
            this.mImg_FBBGD[2].sprite    = this.FBSprites.m_Sprites[1];
            this.mRT_FBBGD[2].localScale = new Vector3(-1f, 1f, 1f);
            this.mImg_FBBGD[3].sprite    = this.FBSprites.m_Sprites[2];
            this.mRT_FBBGD[3].localScale = new Vector3(-1f, -1f, 1f);
            this.mImg_FBBGD[4].sprite    = this.FBSprites.m_Sprites[3];
            this.mRT_FBBGD[4].localScale = new Vector3(1f, -1f, 1f);
            this.mImg_FBBGD[5].sprite    = this.FBSprites.m_Sprites[2];
            this.mRT_FBBGD[5].localScale = new Vector3(1f, -1f, 1f);
            this.mImg_FBBGD[6].sprite    = this.FBSprites.m_Sprites[1];
            this.mImg_FBBGD[7].sprite    = this.FBSprites.m_Sprites[2];
            this.FootBallSkillGameObject = new GameObject("MapFootBallSkill");
            this.FootBallSkillT          = this.FootBallSkillGameObject.AddComponent <RectTransform>();
            this.FootBallSkillT.position = Vector3.forward * 3840f;
            this.FootBallSkillT.SetParent(realmGroup, false);
            this.FootBallSkillT.sizeDelta        = new Vector2(256f, 128f);
            this.FootBallSkillT.anchoredPosition = Vector2.zero;
            this.FootBallSkillGameObject.SetActive(false);
            for (int k = 0; k < 15; k++)
            {
                this.mGO_FBSkill[k]          = new GameObject("FBSkill");
                this.mRT_FBSkill[k]          = this.mGO_FBSkill[k].AddComponent <RectTransform>();
                this.mRT_FBSkill[k].position = Vector3.zero;
                this.mRT_FBSkill[k].SetParent(this.FootBallSkillT, false);
                this.mRT_FBSkill[k].sizeDelta        = new Vector2(242f, 121f);
                this.mRT_FBSkill[k].anchoredPosition = Vector2.zero;
                this.mImg_FBSkill[k]          = this.mGO_FBSkill[k].AddComponent <Image>();
                this.mImg_FBSkill[k].sprite   = this.FBSprites.m_Sprites[4];
                this.mImg_FBSkill[k].material = component.material;
                this.mGO_FBSkill[k].SetActive(false);
            }
        }
        GameObject gameObject = new GameObject("MapTileSelect");

        this.TileSelect          = gameObject.AddComponent <RectTransform>();
        this.TileSelect.position = Vector3.forward * 3840f;
        this.TileSelect.SetParent(realmGroup, false);
        this.TileSelect.sizeDelta        = new Vector2(256f, 128f);
        this.TileSelect.anchoredPosition = Vector2.zero;
        this.TileSelectImage             = gameObject.AddComponent <Image>();
        this.TileSelectImage.sprite      = tileSprites.GetSprite(138);
        this.TileSelectImage.material    = tileSprites.m_Image.material;
        gameObject.SetActive(false);
        this.TileMarkGameObject = new GameObject("MapTileMark");
        this.TileMark           = this.TileMarkGameObject.AddComponent <RectTransform>();
        this.TileMark.position  = Vector3.forward * 3712f;
        this.TileMark.SetParent(realmGroup, false);
        this.TileMark.sizeDelta        = new Vector2(256f, 128f);
        this.TileMark.anchoredPosition = Vector2.zero;
        this.TileMarkImage             = this.TileMarkGameObject.AddComponent <Image>();
        this.TileMarkImage.sprite      = tileSprites.GetSprite(150);
        this.TileMarkImage.material    = tileSprites.m_Image.material;
        this.TileMarkImage.color       = Color.white;
        this.TileMarkImage.SetNativeSize();
        this.TileMarkGameObject.SetActive(false);
    }
Example #24
0
    // Token: 0x06001E8E RID: 7822 RVA: 0x003A6260 File Offset: 0x003A4460
    public override void OnOpen(int arg1, int arg2)
    {
        this.DM = DataManager.Instance;
        this.SM = StringManager.Instance;
        this.GM = GUIManager.Instance;
        this.ST = this.DM.mStringTable;
        Font ttffont = this.GM.GetTTFFont();

        this.m_transform = base.transform;
        this.door        = (this.GM.FindMenu(EGUIWindow.Door) as Door);
        byte   b    = 1;
        ushort hiid = 1;

        this.NameStr = this.SM.SpawnString(30);
        if (arg1 == 1)
        {
            MapPoint    mapPoint    = DataManager.MapDataController.LayoutMapInfo[arg2];
            PlayerPoint playerPoint = DataManager.MapDataController.PlayerPointTable[(int)mapPoint.tableID];
            this.NameStr.Append(playerPoint.playerName);
            b    = playerPoint.allianceRank;
            hiid = playerPoint.portraitID;
            GameConstants.MapIDToPointCode(arg2, out this.DesPoint.zoneID, out this.DesPoint.pointID);
        }
        else if (arg1 == 2)
        {
            AllianceMemberClientDataType allianceMemberClientDataType = this.DM.AllianceMember[arg2];
            this.NameStr.Append(allianceMemberClientDataType.Name);
            b             = (byte)allianceMemberClientDataType.Rank;
            hiid          = allianceMemberClientDataType.Head;
            this.DesPoint = this.DM.AllyMemberLoc;
        }
        else if (arg1 == 3)
        {
            this.NameStr.Append(this.DM.mLordProfile.PlayerName);
            b             = this.DM.mLordProfile.AlliRank;
            hiid          = this.DM.mLordProfile.Head;
            this.DesPoint = this.DM.AllyMemberLoc;
        }
        else
        {
            this.NameStr.Append("TestHelpName");
        }
        this.mBD = this.GM.BuildingData.GetBuildData(17, 0);
        this.mBR = this.GM.BuildingData.GetBuildLevelRequestData(17, this.mBD.Level);
        UIButton component = this.m_transform.GetChild(9).GetChild(0).GetComponent <UIButton>();

        component.m_Handler       = this;
        component.m_BtnID1        = 1;
        this.HelpButton           = this.m_transform.GetChild(10).GetComponent <UIButton>();
        this.HelpButton.m_Handler = this;
        this.HelpButton.m_BtnID1  = 2;
        if (this.GM.bOpenOnIPhoneX)
        {
            this.m_transform.GetChild(9).GetComponent <Image>().enabled = false;
        }
        this.RBText[5]           = this.m_transform.GetChild(11).GetComponent <UIText>();
        this.RBText[5].font      = ttffont;
        this.RBText[5].text      = this.DM.mStringTable.GetStringByID(4040u);
        this.HelpButtonText      = this.HelpButton.transform.GetChild(0).GetComponent <UIText>();
        this.HelpButtonText.font = ttffont;
        this.HelpButtonText.text = this.DM.mStringTable.GetStringByID(4039u);
        this.HelpButton.m_Text   = this.HelpButtonText;
        this.HelpButton.ForTextChange(e_BtnType.e_ChangeText);
        this.RBText[6]      = this.m_transform.GetChild(12).GetComponent <UIText>();
        this.RBText[6].font = ttffont;
        this.RBText[6].text = this.NameStr.ToString();
        UISpritesArray component2 = this.m_transform.GetChild(3).GetComponent <UISpritesArray>();

        component2.SetSpriteIndex((int)(b - 1));
        if (this.GM.IsArabic)
        {
            ((RectTransform)this.m_transform.GetChild(3)).localScale = new Vector3(-1f, 1f, 1f);
        }
        GUIManager.Instance.InitianHeroItemImg(this.m_transform.GetChild(4), eHeroOrItem.Hero, hiid, 11, 0, 0, false, false, true, false);
        this.LTaxText       = this.m_transform.GetChild(13).GetComponent <UIText>();
        this.LTaxText.font  = ttffont;
        this.TaxStr         = this.SM.SpawnString(30);
        this.TaxText        = this.m_transform.GetChild(14).GetComponent <UIText>();
        this.TaxText.font   = ttffont;
        this.TaxStr2        = this.SM.SpawnString(30);
        this.TaxStr2.Length = 0;
        StringManager.IntToStr(this.TaxStr2, 0L, 1, false);
        this.TaxText.text     = this.TaxStr2.ToString();
        this.RBText[7]        = this.m_transform.GetChild(15).GetComponent <UIText>();
        this.RBText[7].font   = ttffont;
        this.RBText[7].text   = this.DM.mStringTable.GetStringByID(4038u);
        this.LoadingMax       = this.GetMaxLoading();
        this.LoadingText      = this.m_transform.GetChild(16).GetComponent <UIText>();
        this.LoadingText.font = ttffont;
        this.LoadingStr2      = this.SM.SpawnString(30);
        this.RefreshTax();
        this.AddSpeedText       = this.m_transform.GetChild(18).GetComponent <UIText>();
        this.AddSpeedText.font  = ttffont;
        this.BootsStr           = this.SM.SpawnString(30);
        this.TotalTimeText      = this.m_transform.GetChild(17).GetComponent <UIText>();
        this.TotalTimeText.font = ttffont;
        this.TimeStr            = this.SM.SpawnString(30);
        this.RefreshSpeed();
        this.m_DResourcesT = this.m_transform.GetChild(19);
        this.m_DResources  = this.m_DResourcesT.GetComponent <DemandResources>();
        this.GM.InitDemandResources(this.m_DResourcesT, 489f, 100f, false);
        for (int i = 0; i < 5; i++)
        {
            this.m_DResources.TextResources[i].fontSize = 14;
        }
        this.GM.SetDemandResourcesText(this.m_DResources.GetComponent <Transform>(), this.lSendResource);
        Transform child = this.m_transform.GetChild(20).GetChild(0);

        for (int j = 0; j < 5; j++)
        {
            this.lResource[j]    = (long)((ulong)this.DM.Resource[j].Stock);
            this.ResourcesStr[j] = this.SM.SpawnString(30);
            Transform child2     = child.GetChild(j);
            Transform child3     = child2.GetChild(0);
            Image     component3 = child3.GetChild(0).GetComponent <Image>();
            component3.sprite   = this.GM.m_ItemIconSpriteAsset.LoadSprite((ushort)(1001 + j));
            component3.material = this.GM.m_ItemIconSpriteAsset.GetMaterial();
            component3          = child3.GetChild(1).GetComponent <Image>();
            component3.material = this.GM.GetFrameMaterial();
            component3.sprite   = this.GM.LoadFrameSprite("if001");
            this.RBText[j]      = child2.GetChild(1).GetComponent <UIText>();
            this.RBText[j].font = ttffont;
            this.RBText[j].text = this.DM.mStringTable.GetStringByID((uint)(3952 + j));
            child3 = child2.GetChild(2);
            this.GM.InitUnitResourcesSlider(child3, eUnitSlider.MarketHelp, 0u, (uint)this.lResource[j], 0.7f);
            this.m_Slider[j]           = child3.GetComponent <UnitResourcesSlider>();
            this.m_Slider[j].m_Handler = this;
            this.m_Slider[j].m_ID      = j;
            this.m_Slider[j].BtnInputText.m_Handler = this;
            this.m_Slider[j].BtnInputText.m_BtnID1  = 3;
            this.m_Slider[j].BtnInputText.m_BtnID2  = j;
            this.GM.SetUnitResourcesSliderSize(child3, eUnitSliderSize.Input, 85f, 26f, 110f, 26f, 0f, 0f);
        }
        if (this.GM.m_OpenResourceMenu)
        {
            for (int k = 0; k < 5; k++)
            {
                if (this.GM.m_SaveResource[k] > 0u)
                {
                    this.CheckResource(k, (long)((ulong)this.GM.m_SaveResource[k]));
                    this.SetSlider(k, (long)((ulong)this.GM.m_SaveResource[k]));
                }
            }
        }
        else
        {
            this.GM.m_OpenResourceMenu = true;
        }
        this.RefreshResource(false);
        this.GM.UpdateUI(EGUIWindow.Door, 1, 2);
        this.bOpen = true;
    }
Example #25
0
 // Token: 0x060012F6 RID: 4854 RVA: 0x00210164 File Offset: 0x0020E364
 public override void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
 {
     if (dataIdx == 0)
     {
         item.transform.GetChild(0).gameObject.SetActive(true);
         item.transform.GetChild(1).gameObject.SetActive(false);
         UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(7062u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(4717u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(9858u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
     }
     else
     {
         item.transform.GetChild(0).gameObject.SetActive(false);
         item.transform.GetChild(1).gameObject.SetActive(true);
         item.transform.GetChild(1).GetChild(11).gameObject.SetActive(false);
         this.SortTextArray[0, panelObjectIdx].ClearString();
         this.SortTextArray[0, panelObjectIdx].IntToFormat((long)dataIdx, 1, false);
         this.SortTextArray[0, panelObjectIdx].AppendFormat("{0}");
         UIText component = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
         component.text = this.SortTextArray[0, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[1, panelObjectIdx].ClearString();
         this.SortTextArray[1, panelObjectIdx].Append(LeaderBoardManager.Instance.AlliHuntBoard[dataIdx - 1].Name);
         component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
         component.text = this.SortTextArray[1, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[2, panelObjectIdx].ClearString();
         this.SortTextArray[2, panelObjectIdx].uLongToFormat(LeaderBoardManager.Instance.AlliHuntBoard[dataIdx - 1].Value, 1, true);
         this.SortTextArray[2, panelObjectIdx].AppendFormat("{0}");
         component      = item.transform.GetChild(1).GetChild(6).GetComponent <UIText>();
         component.text = this.SortTextArray[2, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         if (dataIdx == LeaderBoardManager.Instance.AlliHuntRank)
         {
             UISpritesArray component2 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(2);
             component2 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(2);
             component2 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(2);
         }
         else if (dataIdx % 2 == 0)
         {
             UISpritesArray component2 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
             component2 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
             component2 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(1);
         }
         else
         {
             UISpritesArray component2 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
             component2 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
             component2 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component2.SetSpriteIndex(0);
         }
     }
 }
Example #26
0
 // Token: 0x0600130B RID: 4875 RVA: 0x00212420 File Offset: 0x00210620
 public override void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
 {
     if (dataIdx == 0)
     {
         item.transform.GetChild(0).gameObject.SetActive(true);
         item.transform.GetChild(1).gameObject.SetActive(false);
         UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(17013u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(17012u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(1560u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
     }
     else if (this.RankingTable[dataIdx] == UIAlliVSAlliBoard.SPtab)
     {
         item.transform.GetChild(0).gameObject.SetActive(false);
         item.transform.GetChild(1).gameObject.SetActive(true);
         item.transform.GetChild(1).GetChild(11).gameObject.SetActive(false);
         this.SortTextArray[0, panelObjectIdx].ClearString();
         this.SortTextArray[0, panelObjectIdx].IntToFormat((long)dataIdx, 1, false);
         this.SortTextArray[0, panelObjectIdx].AppendFormat("{0}");
         UIText component = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
         component.text = this.SortTextArray[0, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[1, panelObjectIdx].ClearString();
         this.SortTextArray[1, panelObjectIdx].Append(string.Empty);
         component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
         component.text = this.SortTextArray[1, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[2, panelObjectIdx].ClearString();
         this.SortTextArray[2, panelObjectIdx].Append(string.Empty);
         component      = item.transform.GetChild(1).GetChild(6).GetComponent <UIText>();
         component.text = this.SortTextArray[2, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         UISpritesArray component2 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
         component2.SetSpriteIndex(0);
         component2 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
         component2.SetSpriteIndex(0);
         component2 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
         component2.SetSpriteIndex(0);
     }
     else
     {
         AllianceWarManager._RegisterData dataIndex = ActivityManager.Instance.AllianceWarMgr.GetDataIndex(this.RankingTable[dataIdx]);
         item.transform.GetChild(0).gameObject.SetActive(false);
         item.transform.GetChild(1).gameObject.SetActive(true);
         item.transform.GetChild(1).GetChild(11).gameObject.SetActive(false);
         this.SortTextArray[0, panelObjectIdx].ClearString();
         if (dataIdx > (int)ActivityManager.Instance.AW_MemberCount)
         {
             this.SortTextArray[0, panelObjectIdx].IntToFormat((long)(dataIdx - (int)ActivityManager.Instance.AW_MemberCount), 1, false);
             this.SortTextArray[0, panelObjectIdx].AppendFormat("~{0}");
         }
         else
         {
             this.SortTextArray[0, panelObjectIdx].IntToFormat((long)dataIdx, 1, false);
             this.SortTextArray[0, panelObjectIdx].AppendFormat("{0}");
         }
         UIText component = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
         component.text = this.SortTextArray[0, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[1, panelObjectIdx].ClearString();
         this.SortTextArray[1, panelObjectIdx].Append(dataIndex.Name);
         component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
         component.text = this.SortTextArray[1, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         this.SortTextArray[2, panelObjectIdx].ClearString();
         this.SortTextArray[2, panelObjectIdx].uLongToFormat(dataIndex.Power, 1, true);
         this.SortTextArray[2, panelObjectIdx].AppendFormat("{0}");
         component      = item.transform.GetChild(1).GetChild(6).GetComponent <UIText>();
         component.text = this.SortTextArray[2, panelObjectIdx].ToString();
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         UIButton component3 = item.transform.GetChild(1).GetChild(10).GetComponent <UIButton>();
         component3.m_Handler = this;
         component3.m_BtnID1  = 6;
         component3.m_BtnID2  = dataIdx;
         if (ActivityManager.Instance.AllianceWarMgr.getMyRankIndex() == dataIdx)
         {
             UISpritesArray component4 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component4.SetSpriteIndex(2);
             component4 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component4.SetSpriteIndex(2);
             component4 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component4.SetSpriteIndex(2);
         }
         else if (dataIdx % 2 == 0)
         {
             UISpritesArray component4 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component4.SetSpriteIndex(1);
             component4 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component4.SetSpriteIndex(1);
             component4 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component4.SetSpriteIndex(1);
         }
         else
         {
             UISpritesArray component4 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component4.SetSpriteIndex(0);
             component4 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component4.SetSpriteIndex(0);
             component4 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component4.SetSpriteIndex(0);
         }
     }
 }
Example #27
0
 // Token: 0x0600138E RID: 5006 RVA: 0x0022D754 File Offset: 0x0022B954
 public override void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
 {
     if (dataIdx == 0)
     {
         item.transform.GetChild(0).gameObject.SetActive(true);
         item.transform.GetChild(1).gameObject.SetActive(false);
         UIText component = item.transform.GetChild(0).GetChild(4).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(7063u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(5).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(11011u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
         component      = item.transform.GetChild(0).GetChild(6).GetComponent <UIText>();
         component.text = DataManager.Instance.mStringTable.GetStringByID(11012u);
         component.SetAllDirty();
         component.cachedTextGenerator.Invalidate();
     }
     else
     {
         if (dataIdx > 0 && dataIdx <= LeaderBoardManager.Instance.MobiWorldKingBoard.Count)
         {
             item.transform.GetChild(0).gameObject.SetActive(false);
             item.transform.GetChild(1).gameObject.SetActive(true);
             item.transform.GetChild(1).GetChild(11).gameObject.SetActive(false);
             item.transform.GetChild(1).GetChild(12).gameObject.SetActive(false);
             this.SortTextArray[0, panelObjectIdx].ClearString();
             GameConstants.FormatRoleName(this.SortTextArray[0, panelObjectIdx], LeaderBoardManager.Instance.MobiWorldKingBoard[dataIdx - 1].Name, LeaderBoardManager.Instance.MobiWorldKingBoard[dataIdx - 1].AllianceTag, null, 0, LeaderBoardManager.Instance.MobiWorldKingBoard[dataIdx - 1].HomeKingdomID, null, null, null, null);
             UIText component = item.transform.GetChild(1).GetChild(4).GetComponent <UIText>();
             component.text = this.SortTextArray[0, panelObjectIdx].ToString();
             component.SetAllDirty();
             component.cachedTextGenerator.Invalidate();
             this.SortTextArray[1, panelObjectIdx].ClearString();
             GameConstants.GetTimeString(this.SortTextArray[1, panelObjectIdx], LeaderBoardManager.Instance.MobiWorldKingBoard[dataIdx - 1].OccupyTime, false, false, true, false, true);
             component      = item.transform.GetChild(1).GetChild(5).GetComponent <UIText>();
             component.text = this.SortTextArray[1, panelObjectIdx].ToString();
             component.SetAllDirty();
             component.cachedTextGenerator.Invalidate();
             this.SortTextArray[2, panelObjectIdx].ClearString();
             DateTime dateTime = GameConstants.GetDateTime(LeaderBoardManager.Instance.MobiWorldKingBoard[dataIdx - 1].TakeOfficeTime);
             this.SortTextArray[2, panelObjectIdx].StringToFormat(dateTime.ToString("MM/dd/yy"));
             this.SortTextArray[2, panelObjectIdx].AppendFormat("{0}");
             component           = item.transform.GetChild(1).GetChild(6).GetComponent <UIText>();
             component.text      = this.SortTextArray[2, panelObjectIdx].ToString();
             component.alignment = TextAnchor.MiddleCenter;
             component.SetAllDirty();
             component.cachedTextGenerator.Invalidate();
             UIButton component2 = item.transform.GetChild(1).GetChild(10).GetComponent <UIButton>();
             component2.m_Handler = this;
             component2.m_BtnID1  = 8;
             component2.m_BtnID2  = dataIdx - 1;
         }
         if (dataIdx % 2 == 0)
         {
             UISpritesArray component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(1);
             component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(1);
             component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(1);
             component3 = item.transform.GetChild(1).GetChild(3).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(1);
         }
         else
         {
             UISpritesArray component3 = item.transform.GetChild(1).GetChild(0).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(0);
             component3 = item.transform.GetChild(1).GetChild(1).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(0);
             component3 = item.transform.GetChild(1).GetChild(2).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(0);
             component3 = item.transform.GetChild(1).GetChild(3).GetComponent <UISpritesArray>();
             component3.SetSpriteIndex(0);
         }
     }
 }