Ejemplo n.º 1
0
 // END CUT HERE
 // BEGIN CUT HERE
 public static void Main()
 {
     try {
     KingdomMap ___test = new KingdomMap();
     ___test.run_test(-1);
     } catch(Exception e) {
     //Console.WriteLine(e.StackTrace);
     Console.WriteLine(e.ToString());
     }
 }
Ejemplo n.º 2
0
// END CUT HERE
// BEGIN CUT HERE
    public static void Main()
    {
        try {
            KingdomMap ___test = new KingdomMap();
            ___test.run_test(-1);
        } catch (Exception e) {
//Console.WriteLine(e.StackTrace);
            Console.WriteLine(e.ToString());
        }
    }
Ejemplo n.º 3
0
    // Token: 0x06000C2E RID: 3118 RVA: 0x00118C98 File Offset: 0x00116E98
    private void UpdateWorld()
    {
        if (this.totalityController != null)
        {
            this.totalityController.ClearEffect();
            UnityEngine.Object.DestroyObject(this.totalityController.gameObject);
        }
        this.totalityController = null;
        ParticleManager.Instance.Clear();
        ParticleManager.Instance.Setup();
        AudioManager.Instance.LoadAndPlayBGM(BGMType.Legion, 1, false);
        GameObject gameObject = new GameObject("TotalityGroup");

        gameObject.transform.SetParent(GUIManager.Instance.m_UICanvas.transform, false);
        gameObject.transform.SetAsFirstSibling();
        this.totalityController = gameObject.GetComponent <Totality>();
        if (this.totalityController == null)
        {
            this.totalityController = gameObject.AddComponent <Totality>();
        }
        gameObject.transform.localScale = Vector3.one * DataManager.MapDataController.worldZoomSize;
        this.doorController.notifyHomeBtnPos();
        this.doorController.SetCapitalLocation((ushort)this.totalityController.worldMapController.homePos.x, (ushort)this.totalityController.worldMapController.homePos.y);
        this.totalityController.worldMapController.CheckCenterPos();
        if (this.doorController.m_WindowStack.Count != 0)
        {
            this.totalityController.gameObject.SetActive(false);
        }
        byte b = DataManager.MapDataController.WorldKingdomTableIDcounter;

        b &= 31;
        byte b2 = 0;

        while ((int)b2 < DataManager.MapDataController.WorldKingdomTable.Length)
        {
            if (DataManager.MapDataController.WorldKingdomTable[(int)b].kingdomID != 0)
            {
                KingdomMap recordByKey = DataManager.MapDataController.KingdomMapTable.GetRecordByKey(DataManager.MapDataController.WorldKingdomTable[(int)b].kingdomID);
                int        num         = (int)(DataManager.MapDataController.WorldMaxX - DataManager.MapDataController.WorldMinX + 1);
                int        num2        = (int)(recordByKey.worldPosX - DataManager.MapDataController.WorldMinX) + (int)(recordByKey.worldPosY - DataManager.MapDataController.WorldMinY) * num;
                if (DataManager.MapDataController.TileMapKingdomID[num2].tableID == b)
                {
                    this.totalityController.UpdateKingdom(b, 25);
                }
            }
            b  += 1;
            b  &= 31;
            b2 += 1;
        }
        GUIManager.Instance.pDVMgr.NextTransitions(eTrans.END, eTransFunc.Max);
    }
Ejemplo n.º 4
0
 // Token: 0x06000C8C RID: 3212 RVA: 0x0012624C File Offset: 0x0012444C
 public void setYolkImage(int kingdomid, int row, int col, Vector2 pos)
 {
     if (kingdomid < 0)
     {
         if (this.YolkGameObject[col][row] != null)
         {
             if (this.tickYolkImage != null && this.tickYolkImage.col == col && this.tickYolkImage.row == row)
             {
                 this.tickYolkImage = null;
             }
             if (this.sheepTickImageNum > 0 && this.sheepTickImage != null)
             {
                 for (int i = 0; i < this.sheepTickImageNum; i++)
                 {
                     if (this.sheepTickImage[i] != null && this.sheepTickImage[i].col == col && this.sheepTickImage[i].row == row)
                     {
                         this.sheepTickImageNum--;
                         this.sheepTickImage[i].color = Color.black;
                         this.sheepTickImage[i]       = this.sheepTickImage[this.sheepTickImageNum];
                         this.sheepTickImage[this.sheepTickImageNum] = null;
                         break;
                     }
                 }
             }
             if (this.wolfTickImageNum > 0 && this.wolfTickImage != null)
             {
                 for (int j = 0; j < this.wolfTickImageNum; j++)
                 {
                     if (this.wolfTickImage[j] != null && this.wolfTickImage[j].col == col && this.wolfTickImage[j].row == row)
                     {
                         this.wolfTickImageNum--;
                         this.wolfTickImage[j].color = Color.black;
                         this.wolfTickImage[j]       = this.wolfTickImage[this.wolfTickImageNum];
                         this.wolfTickImage[this.wolfTickImageNum] = null;
                         break;
                     }
                 }
             }
             this.YolkGameObject[col][row].SetActive(false);
             for (int k = 0; k < this.poolsCounter; k++)
             {
                 if (this.poolCounter[k] < this.YolkGameObjectPools[k].Length)
                 {
                     this.YolkGameObjectPools[k][this.poolCounter[k]] = this.YolkGameObject[col][row];
                     this.YolkImage[col][row].color = Color.black;
                     this.YolkImagePools[k][this.poolCounter[k]]         = this.YolkImage[col][row];
                     this.YolkRectTransformPools[k][this.poolCounter[k]] = this.YolkRectTransform[col][row];
                     this.YolkGameObject[col][row]    = null;
                     this.YolkImage[col][row]         = null;
                     this.YolkRectTransform[col][row] = null;
                     this.poolCounter[k]++;
                     break;
                 }
             }
         }
     }
     else
     {
         if (this.YolkGameObject[col][row] == null)
         {
             int l;
             for (l = 0; l < this.poolsCounter; l++)
             {
                 if (this.poolCounter[l] > 0)
                 {
                     this.poolCounter[l]--;
                     this.YolkGameObject[col][row]    = this.YolkGameObjectPools[l][this.poolCounter[l]];
                     this.YolkImage[col][row]         = this.YolkImagePools[l][this.poolCounter[l]];
                     this.YolkRectTransform[col][row] = this.YolkRectTransformPools[l][this.poolCounter[l]];
                     this.YolkGameObjectPools[l][this.poolCounter[l]]    = null;
                     this.YolkImagePools[l][this.poolCounter[l]]         = null;
                     this.YolkRectTransformPools[l][this.poolCounter[l]] = null;
                     break;
                 }
             }
             if (l == this.poolsCounter)
             {
                 this.YolkGameObjectPools[l]    = new GameObject[this.YolkGameObjectPools[0].Length];
                 this.YolkImagePools[l]         = new WorldMapImage[this.YolkGameObjectPools[0].Length];
                 this.YolkRectTransformPools[l] = new RectTransform[this.YolkGameObjectPools[0].Length];
                 for (int m = 0; m < this.YolkGameObjectPools[l].Length; m++)
                 {
                     GameObject gameObject = new GameObject("yolk");
                     gameObject.SetActive(false);
                     this.YolkImagePools[l][m]                       = gameObject.AddComponent <WorldMapImage>();
                     this.YolkImagePools[l][m].material              = this.YolkImageMaterial;
                     this.YolkImagePools[l][m].color                 = Color.black;
                     this.YolkRectTransformPools[l][m]               = (gameObject.transform as RectTransform);
                     this.YolkRectTransformPools[l][m].sizeDelta     = this.inisize;
                     this.YolkRectTransformPools[l][m].localPosition = this.inipos;
                     this.YolkRectTransformPools[l][m].localScale    = Vector3.one * this.BaseScale;
                     this.YolkRectTransformPools[l][m].SetParent(this.YolkLayout, false);
                     this.YolkGameObjectPools[l][m] = gameObject;
                 }
                 this.poolsCounter++;
                 this.poolCounter[l] = this.YolkGameObjectPools[l].Length;
                 this.poolCounter[l]--;
                 this.YolkGameObject[col][row]    = this.YolkGameObjectPools[l][this.poolCounter[l]];
                 this.YolkImage[col][row]         = this.YolkImagePools[l][this.poolCounter[l]];
                 this.YolkRectTransform[col][row] = this.YolkRectTransformPools[l][this.poolCounter[l]];
                 this.YolkGameObjectPools[l][this.poolCounter[l]]    = null;
                 this.YolkImagePools[l][this.poolCounter[l]]         = null;
                 this.YolkRectTransformPools[l][this.poolCounter[l]] = null;
             }
             this.YolkGameObject[col][row].SetActive(true);
         }
         byte       b           = 0;
         KingdomMap recordByKey = DataManager.MapDataController.KingdomMapTable.GetRecordByKey((ushort)kingdomid);
         byte       b2          = ((int)recordByKey.mapID < this.YolkSprite.Length) ? recordByKey.mapID : 1;
         if (DataManager.MapDataController.GetWorldKingdomTableID((ushort)kingdomid, out b))
         {
             if (DataManager.MapDataController.OtherKingdomData.kingdomPeriod == KINGDOM_PERIOD.KP_KVK)
             {
                 if (DataManager.MapDataController.WorldKingdomTable[(int)b].kingdomPeriod == KINGDOM_PERIOD.KP_KVK && kingdomid != (int)DataManager.MapDataController.kingdomData.kingdomID && (!ActivityManager.Instance.IsMatchKvk() || ActivityManager.Instance.IsMatchKvk_kingdom((ushort)kingdomid)))
                 {
                     if (this.YolkImage[col][row].sprite != this.YolkSprite[0])
                     {
                         this.YolkImage[col][row].sprite = this.YolkSprite[0];
                     }
                     EKvKKingdomType kvKKingdomType = ActivityManager.Instance.getKvKKingdomType((ushort)kingdomid);
                     int             n = 0;
                     if (kvKKingdomType == EKvKKingdomType.EKKT_Hunter)
                     {
                         while (n < this.sheepTickImageNum)
                         {
                             if (this.sheepTickImage[n] == this.YolkImage[col][row])
                             {
                                 this.sheepTickImageNum--;
                                 this.sheepTickImage[n].color = Color.black;
                                 this.sheepTickImage[n]       = this.sheepTickImage[this.sheepTickImageNum];
                                 this.sheepTickImage[this.sheepTickImageNum] = null;
                                 break;
                             }
                             n++;
                         }
                         for (n = 0; n < this.wolfTickImageNum; n++)
                         {
                             if (this.wolfTickImage[n] == this.YolkImage[col][row])
                             {
                                 break;
                             }
                         }
                         if (n == this.wolfTickImageNum)
                         {
                             this.wolfTickImage[this.wolfTickImageNum]       = this.YolkImage[col][row];
                             this.wolfTickImage[this.wolfTickImageNum].color = this.wolfTickYolkImageColor;
                             this.wolfTickImageNum++;
                         }
                     }
                     else if (kvKKingdomType == EKvKKingdomType.EKKT_Target)
                     {
                         while (n < this.wolfTickImageNum)
                         {
                             if (this.wolfTickImage[n] == this.YolkImage[col][row])
                             {
                                 this.wolfTickImageNum--;
                                 this.wolfTickImage[n].color = Color.black;
                                 this.wolfTickImage[n]       = this.wolfTickImage[this.wolfTickImageNum];
                                 this.wolfTickImage[this.wolfTickImageNum] = null;
                                 break;
                             }
                             n++;
                         }
                         for (n = 0; n < this.sheepTickImageNum; n++)
                         {
                             if (this.sheepTickImage[n] == this.YolkImage[col][row])
                             {
                                 break;
                             }
                         }
                         if (n == this.sheepTickImageNum)
                         {
                             this.sheepTickImage[this.sheepTickImageNum]       = this.YolkImage[col][row];
                             this.sheepTickImage[this.sheepTickImageNum].color = this.sheepTickYolkImageColor;
                             this.sheepTickImageNum++;
                         }
                     }
                     else
                     {
                         while (n < this.sheepTickImageNum)
                         {
                             if (this.sheepTickImage[n] == this.YolkImage[col][row])
                             {
                                 this.sheepTickImageNum--;
                                 this.sheepTickImage[n].color = Color.black;
                                 this.sheepTickImage[n]       = this.sheepTickImage[this.sheepTickImageNum];
                                 this.sheepTickImage[this.sheepTickImageNum] = null;
                                 break;
                             }
                             n++;
                         }
                         if (n >= this.sheepTickImageNum)
                         {
                             for (n = 0; n < this.wolfTickImageNum; n++)
                             {
                                 if (this.wolfTickImage[n] == this.YolkImage[col][row])
                                 {
                                     this.wolfTickImageNum--;
                                     this.wolfTickImage[n].color = Color.black;
                                     this.wolfTickImage[n]       = this.wolfTickImage[this.wolfTickImageNum];
                                     this.wolfTickImage[this.wolfTickImageNum] = null;
                                     break;
                                 }
                             }
                         }
                     }
                 }
                 else if (this.YolkImage[col][row].sprite != this.YolkSprite[(int)b2])
                 {
                     this.YolkImage[col][row].sprite = this.YolkSprite[(int)b2];
                     int num;
                     for (num = 0; num < this.wolfTickImageNum; num++)
                     {
                         if (this.wolfTickImage[num] == this.YolkImage[col][row])
                         {
                             this.wolfTickImageNum--;
                             this.wolfTickImage[num].color             = Color.black;
                             this.wolfTickImage[num]                   = this.wolfTickImage[this.wolfTickImageNum];
                             this.wolfTickImage[this.wolfTickImageNum] = null;
                             break;
                         }
                     }
                     if (num >= this.wolfTickImageNum)
                     {
                         for (num = 0; num < this.sheepTickImageNum; num++)
                         {
                             if (this.sheepTickImage[num] == this.YolkImage[col][row])
                             {
                                 this.sheepTickImageNum--;
                                 this.sheepTickImage[num].color = Color.black;
                                 this.sheepTickImage[num]       = this.sheepTickImage[this.sheepTickImageNum];
                                 this.sheepTickImage[this.sheepTickImageNum] = null;
                                 break;
                             }
                         }
                     }
                 }
             }
             else if (this.YolkImage[col][row].sprite != this.YolkSprite[(int)b2])
             {
                 this.YolkImage[col][row].sprite = this.YolkSprite[(int)b2];
                 int num2;
                 for (num2 = 0; num2 < this.wolfTickImageNum; num2++)
                 {
                     if (this.wolfTickImage[num2] == this.YolkImage[col][row])
                     {
                         this.wolfTickImageNum--;
                         this.wolfTickImage[num2].color            = Color.black;
                         this.wolfTickImage[num2]                  = this.wolfTickImage[this.wolfTickImageNum];
                         this.wolfTickImage[this.wolfTickImageNum] = null;
                         break;
                     }
                 }
                 if (num2 == this.wolfTickImageNum)
                 {
                     for (num2 = 0; num2 < this.sheepTickImageNum; num2++)
                     {
                         if (this.sheepTickImage[num2] == this.YolkImage[col][row])
                         {
                             this.sheepTickImageNum--;
                             this.sheepTickImage[num2].color             = Color.black;
                             this.sheepTickImage[num2]                   = this.sheepTickImage[this.sheepTickImageNum];
                             this.sheepTickImage[this.sheepTickImageNum] = null;
                             break;
                         }
                     }
                 }
             }
             if (DataManager.MapDataController.WorldKingdomTable[(int)b].kingdomPeriod == KINGDOM_PERIOD.KP_WORLD_WAR)
             {
                 if (this.tickYolkImage != null)
                 {
                     Color black = Color.black;
                     this.tickYolkImage.color = black;
                     this.tickYolkImageColor  = black;
                 }
                 this.tickYolkImage = this.YolkImage[col][row];
             }
             else
             {
                 if (this.tickYolkImage == this.YolkImage[col][row])
                 {
                     this.tickYolkImage = null;
                 }
                 this.YolkImage[col][row].color = Color.black;
             }
         }
         else if (this.YolkImage[col][row].sprite != this.YolkSprite[(int)b2])
         {
             this.YolkImage[col][row].sprite = this.YolkSprite[(int)b2];
             this.YolkImage[col][row].color  = Color.black;
         }
         if (this.YolkImage[col][row].sprite == null)
         {
             this.YolkImage[col][row].sprite = this.YolkSprite[1];
         }
         this.YolkImage[col][row].SetNativeSize();
         this.YolkImage[col][row].kingdomID = (ushort)kingdomid;
         this.YolkImage[col][row].col       = col;
         this.YolkImage[col][row].row       = row;
         this.setYolkImage(row, col, pos);
     }
 }
Ejemplo n.º 5
0
    // Token: 0x06000C80 RID: 3200 RVA: 0x001236E8 File Offset: 0x001218E8
    public void updateName(byte SetKingdomTableID, Image NamePos)
    {
        if (!this.NameGameObject.activeSelf)
        {
            this.NameGameObject.SetActive(true);
        }
        if (NamePos == null)
        {
            if (this.NamePosImage != null)
            {
                this.NamePosImage.gameObject.SetActive(false);
                this.NamePosImage.transform.SetParent(this.NameRectTransform.parent, false);
            }
        }
        else if (this.NamePosImage == null)
        {
            NamePos.transform.SetParent(this.NameRectTransform, false);
        }
        this.NamePosImage = NamePos;
        KingdomMap recordByKey = DataManager.MapDataController.KingdomMapTable.GetRecordByKey(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomID);
        int        num         = (int)(DataManager.MapDataController.WorldMaxX - DataManager.MapDataController.WorldMinX + 1);
        int        num2        = (int)(recordByKey.worldPosX - DataManager.MapDataController.WorldMinX) + (int)(recordByKey.worldPosY - DataManager.MapDataController.WorldMinY) * num;

        this.WorldKingdomTableID = (ushort)num2;
        this.TitleString.ClearString();
        if (this.NamePosImage != null)
        {
            this.TitleString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(8246u));
            this.textrtf.sizeDelta        = new Vector2(512f, 215f);
            this.textrtf.anchoredPosition = new Vector2(128f, 0f);
        }
        else
        {
            this.textrtf.sizeDelta        = new Vector2(512f, 178f);
            this.textrtf.anchoredPosition = new Vector2(128f, -20f);
        }
        if (DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomPeriod == KINGDOM_PERIOD.KP_WORLD_WAR)
        {
            this.TitleString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomName);
            if (this.NamePosImage == null)
            {
                this.TitleString.AppendFormat("{0}");
            }
            else
            {
                this.TitleString.AppendFormat("        {0}\n{1}");
            }
        }
        else
        {
            this.TitleString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomID, 1, false);
            if (GUIManager.Instance.IsArabic)
            {
                this.TitleString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(8247u));
                this.TitleString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomName);
            }
            else
            {
                this.TitleString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomName);
                this.TitleString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(8247u));
            }
            if (this.NamePosImage == null)
            {
                this.TitleString.AppendFormat("#{0} {1} {2}");
            }
            else
            {
                this.TitleString.AppendFormat("        {0}\n#{1} {2} {3}");
            }
        }
        this.NameText.text = this.TitleString.ToString();
        this.NameText.SetAllDirty();
        this.NameText.cachedTextGenerator.Invalidate();
        this.InfoString.ClearString();
        if (DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomPeriod == KINGDOM_PERIOD.KP_WORLD_WAR)
        {
            this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(11038u));
            if (ActivityManager.Instance.IsKOWRunning(false) || DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName == null || DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName.Length == 0 || DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName[0] == '\0')
            {
                this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(5334u));
                this.InfoString.AppendFormat("{0}{1}");
            }
            else if (DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceKingdomID == 0)
            {
                if (GUIManager.Instance.IsArabic)
                {
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    this.InfoString.AppendFormat("{0}{1}");
                }
                else
                {
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    this.InfoString.AppendFormat("{0}{1}");
                }
            }
            else if (DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingKingdomID == DataManager.MapDataController.kingdomData.kingdomID)
            {
                if (GUIManager.Instance.IsArabic)
                {
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                    this.InfoString.AppendFormat("{0}{1}[{2}]");
                }
                else
                {
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    this.InfoString.AppendFormat("{0}[{1}]{2}");
                }
            }
            else if (GUIManager.Instance.IsArabic)
            {
                this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingKingdomID, 1, false);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                this.InfoString.AppendFormat("{0}#{1} {2} [{3}]");
            }
            else
            {
                this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingKingdomID, 1, false);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                this.InfoString.AppendFormat("{0}#{1} [{2}]{3}");
            }
        }
        else
        {
            byte b = (byte)(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomFlag >> 3);
            if (b > 0)
            {
                TitleData recordByKey2 = DataManager.Instance.TitleDataN.GetRecordByKey((ushort)b);
                this.InfoString.StringToFormat("<color=#FFFF00>");
                this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID((uint)recordByKey2.StringID));
                this.InfoString.StringToFormat("</color>");
            }
            this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(676u));
            if (DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag == null || DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag.Length == 0 || DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag[0] == '\0')
            {
                this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(5334u));
                this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(677u));
                this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(5334u));
                if (b > 0)
                {
                    this.InfoString.AppendFormat("{0}{1}{2}\n{3}{4}\n{5}{6}");
                }
                else
                {
                    this.InfoString.AppendFormat("{0}{1}\n{2}{3}");
                }
            }
            else if (DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceKingdomID == DataManager.Instance.RoleAlliance.KingdomID && DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingKingdomID == DataManager.MapDataController.kingdomData.kingdomID)
            {
                if (GUIManager.Instance.IsArabic)
                {
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceName);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                    if ((DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomFlag & 1) == 0)
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(677u));
                    }
                    else
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(9372u));
                    }
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    if (b > 0)
                    {
                        this.InfoString.AppendFormat("{0}{1}{2}\n{3}{4}[{5}]\n{6}{7}");
                    }
                    else
                    {
                        this.InfoString.AppendFormat("{0}{1}[{2}]\n{3}{4}");
                    }
                }
                else
                {
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceName);
                    if ((DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomFlag & 1) == 0)
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(677u));
                    }
                    else
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(9372u));
                    }
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    if (b > 0)
                    {
                        this.InfoString.AppendFormat("{0}{1}{2}\n{3}[{4}]{5}\n{6}{7}");
                    }
                    else
                    {
                        this.InfoString.AppendFormat("{0}[{1}]{2}\n{3}{4}");
                    }
                }
            }
            else if (DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceKingdomID == DataManager.Instance.RoleAlliance.KingdomID)
            {
                if (GUIManager.Instance.IsArabic)
                {
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceName);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                    if ((DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomFlag & 1) == 0)
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(677u));
                    }
                    else
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(9372u));
                    }
                    this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingKingdomID, 1, false);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    if (b > 0)
                    {
                        this.InfoString.AppendFormat("{0}{1}{2}\n{3}{4}[{5}]\n{6}#{7} {8}");
                    }
                    else
                    {
                        this.InfoString.AppendFormat("{0}{1}[{2}]\n{3}#{4} {5}");
                    }
                }
                else
                {
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceName);
                    if ((DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomFlag & 1) == 0)
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(677u));
                    }
                    else
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(9372u));
                    }
                    this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingKingdomID, 1, false);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    if (b > 0)
                    {
                        this.InfoString.AppendFormat("{0}{1}{2}\n{3}[{4}]{5}\n{6}#{7} {8}");
                    }
                    else
                    {
                        this.InfoString.AppendFormat("{0}[{1}]{2}\n{3}#{4} {5}");
                    }
                }
            }
            else if (DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingKingdomID == DataManager.MapDataController.kingdomData.kingdomID)
            {
                if (GUIManager.Instance.IsArabic)
                {
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceName);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                    this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceKingdomID, 1, false);
                    if ((DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomFlag & 1) == 0)
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(677u));
                    }
                    else
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(9372u));
                    }
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    if (b > 0)
                    {
                        this.InfoString.AppendFormat("{0}{1}{2}\n{3}#{6} {4}[{5}]\n{7}{8}");
                    }
                    else
                    {
                        this.InfoString.AppendFormat("{0}#{3} {1}[{2}]\n{4}{5}");
                    }
                }
                else
                {
                    this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceKingdomID, 1, false);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceName);
                    if ((DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomFlag & 1) == 0)
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(677u));
                    }
                    else
                    {
                        this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(9372u));
                    }
                    this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                    if (b > 0)
                    {
                        this.InfoString.AppendFormat("{0}{1}{2}\n{3}#{4} [{5}]{6}\n{7}{8}");
                    }
                    else
                    {
                        this.InfoString.AppendFormat("{0}#{1} [{2}]{3}\n{4}{5}");
                    }
                }
            }
            else if (GUIManager.Instance.IsArabic)
            {
                this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceKingdomID, 1, false);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceName);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                if ((DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomFlag & 1) == 0)
                {
                    this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(677u));
                }
                else
                {
                    this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(9372u));
                }
                this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingKingdomID, 1, false);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                if (b > 0)
                {
                    this.InfoString.AppendFormat("{0}{1}{2}\n{3}#{4} {5}[{6}]\n{7}#{8} {9}");
                }
                else
                {
                    this.InfoString.AppendFormat("{0}#{1} {2}[{3}]\n{4}#{5} {6}");
                }
            }
            else
            {
                this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceKingdomID, 1, false);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceTag);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].allianceName);
                if ((DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomFlag & 1) == 0)
                {
                    this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(677u));
                }
                else
                {
                    this.InfoString.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(9372u));
                }
                this.InfoString.IntToFormat((long)DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingKingdomID, 1, false);
                this.InfoString.StringToFormat(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingName);
                if (b > 0)
                {
                    this.InfoString.AppendFormat("{0}{1}{2}\n{3}#{4} [{5}]{6}\n{7}#{8} {9}");
                }
                else
                {
                    this.InfoString.AppendFormat("{0}#{1} [{2}]{3}\n{4}#{5} {6}");
                }
            }
            long num3 = this.WorldKingdomTime = (long)(DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomTime + 7776000UL - (ulong)DataManager.Instance.ServerTime);
            if (num3 > 0L)
            {
                CString cstring  = StringManager.Instance.StaticString1024();
                CString cstring2 = StringManager.Instance.StaticString1024();
                CString cstring3 = StringManager.Instance.StaticString1024();
                cstring.ClearString();
                cstring2.ClearString();
                cstring3.ClearString();
                if (num3 > 86400L)
                {
                    cstring3.IntToFormat(num3 / 86400L, 1, false);
                    cstring3.AppendFormat("{0}d");
                }
                else if (num3 / 3600L > 0L)
                {
                    cstring3.IntToFormat(num3 / 3600L, 1, false);
                    num3 %= 3600L;
                    cstring3.IntToFormat(num3 / 60L, 2, false);
                    num3 %= 60L;
                    cstring3.IntToFormat(num3, 2, false);
                    cstring3.AppendFormat("{0}:{1}:{2}");
                }
                else
                {
                    cstring3.IntToFormat(num3 / 60L, 2, false);
                    num3 %= 60L;
                    cstring3.IntToFormat(num3, 2, false);
                    cstring3.AppendFormat("{0}:{1}");
                }
                cstring2.StringToFormat(cstring3);
                cstring2.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(948u));
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat("\n<color=#B8D9F3>{0}");
                if (DataManager.MapDataController.WorldKingdomTable[(int)SetKingdomTableID].kingdomTime > DataManager.MapDataController.kingdomData.kingdomTime && !DataManager.Instance.IsNewbie())
                {
                    cstring.Append("\n");
                    cstring.Append(DataManager.Instance.mStringTable.GetStringByID(947u));
                }
                cstring.Append("</color>");
                this.InfoString.Append(cstring);
            }
        }
        this.text_Info.text = this.InfoString.ToString();
        this.text_Info.SetAllDirty();
        this.text_Info.cachedTextGenerator.Invalidate();
        this.text_Info.cachedTextGeneratorForLayout.Invalidate();
        if (this.text_Info.preferredHeight > this.text_Info.rectTransform.sizeDelta.y)
        {
            this.text_Info.rectTransform.sizeDelta = new Vector2(this.text_Info.rectTransform.sizeDelta.x, this.text_Info.preferredHeight + 1f);
        }
    }