Ejemplo n.º 1
0
    // Token: 0x06001279 RID: 4729 RVA: 0x002095B4 File Offset: 0x002077B4
    private void ShowHideTroopResultMsg(HideArmyManager.HIDETROOP_RESULT Result)
    {
        switch (Result)
        {
        case HideArmyManager.HIDETROOP_RESULT.HIDETROOP_NOTEMPTY:
        case HideArmyManager.HIDETROOP_RESULT.HIDETROOP_LORDERR:
        case HideArmyManager.HIDETROOP_RESULT.HIDETROOP_TIMEERR:
            GUIManager.Instance.MsgStr.ClearString();
            GUIManager.Instance.MsgStr.IntToFormat((long)Result, 1, false);
            GUIManager.Instance.MsgStr.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(12067u));
            GUIManager.Instance.AddHUDMessage(GUIManager.Instance.MsgStr.ToString(), 255, true);
            break;

        case HideArmyManager.HIDETROOP_RESULT.HIDETROOP_TROOPERR:
            GUIManager.Instance.AddHUDMessage(DataManager.Instance.mStringTable.GetStringByID(9769u), 255, true);
            break;
        }
    }
Ejemplo n.º 2
0
 // Token: 0x06001277 RID: 4727 RVA: 0x002092EC File Offset: 0x002074EC
 public void RecvReleaseShelterTroop(MessagePacket MP)
 {
     HideArmyManager.HIDETROOP_RESULT hidetroop_RESULT = (HideArmyManager.HIDETROOP_RESULT)MP.ReadByte(-1);
     if (hidetroop_RESULT == HideArmyManager.HIDETROOP_RESULT.HIDETROOP_SUCCESS)
     {
         this.ShelterTime.BeginTime   = 0L;
         this.ShelterTime.RequireTime = 0u;
         for (int i = 0; i < 16; i++)
         {
             DataManager.Instance.RoleAttr.m_Soldier[i] += this.TroopData[i];
             DataManager.Instance.SoldierTotal          += (long)((ulong)this.TroopData[i]);
         }
         DataManager.Instance.AttribVal.UpdateSoldierConsume(SoldierConsumeType.Hide, 0);
         DataManager.Instance.AttribVal.UpdateSoldierConsume(SoldierConsumeType.Inner, byte.MaxValue);
         GUIManager.Instance.UpdateUI(EGUIWindow.UI_ArmyInfo, 1, 0);
         GUIManager.Instance.AddHUDMessage(DataManager.Instance.mStringTable.GetStringByID(8592u), 13, true);
         if (this.LordInShelter == 1)
         {
             this.LordInShelter = 0;
             ushort leaderID = DataManager.Instance.GetLeaderID();
             if (leaderID != 0 && (int)leaderID < DataManager.Instance.TempFightHeroID.Length)
             {
                 DataManager.Instance.TempFightHeroID[(int)leaderID] = 0;
             }
             DataManager.Instance.SetFightHeroData();
             GameManager.OnRefresh(NetworkNews.Refresh_Hero, null);
         }
         DataManager.Instance.SetQueueBarData(EQueueBarIndex.HideArmy, false, 0L, 0u);
         Array.Clear(this.TroopData, 0, this.TroopData.Length);
     }
     else
     {
         this.ShowHideTroopResultMsg(hidetroop_RESULT);
     }
     GUIManager.Instance.HideUILock(EUILock.HideArmy);
 }