Ejemplo n.º 1
0
        public override string ToString()
        {
            string str = $"[海域{Id}:{Name}]";

            Comm_UserDatas.Instance.User_rebellion_point.TryGetValue(Id, out Mem_rebellion_point value);
            str += $" RP:{RState}({value?.Point ?? 0})";
            if (!IsOpen())
            {
                str += $" [未開放] ";
            }
            AreaTankerModel tankerCount = GetTankerCount();

            str += $" 輸送船:{tankerCount.GetCountNoMove()}/{tankerCount.GetMaxCount()}(移動中:{tankerCount.GetCountMove()},遠征中:{tankerCount.GetCountInMission()}) ";
            str += $"入渠ドック: {ToString(GetNDockStateList())} ";
            DeckModel[] decks = GetDecks();
            if (decks.Length == 0)
            {
                str += $"海域に艦隊無し";
            }
            else
            {
                foreach (DeckModel arg in decks)
                {
                    str += $"{arg}";
                }
            }
            EscortDeckModel escortDeck = GetEscortDeck();

            if (escortDeck == null)
            {
                return(str + $" 護衛艦隊無し");
            }
            return(str + $" {escortDeck}");
        }
Ejemplo n.º 2
0
        public List <int> __GetShipMemIdInEscortDecks__()
        {
            List <int> list = new List <int>();

            using (Dictionary <int, __EscortDeckModel__> .ValueCollection.Enumerator enumerator = this._escort_decks.get_Values().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    EscortDeckModel current = enumerator.get_Current();
                    list.AddRange(current.__GetShipMemIds__());
                }
            }
            return(list);
        }
        public override string ToString()
        {
            string text = string.Format("[海域{0}:{1}]", this.Id, this.Name);
            Mem_rebellion_point mem_rebellion_point;

            Comm_UserDatas.Instance.User_rebellion_point.TryGetValue(this.Id, ref mem_rebellion_point);
            text += string.Format(" RP:{0}({1})", this.RState, (mem_rebellion_point != null) ? mem_rebellion_point.Point : 0);
            if (!this.IsOpen())
            {
                text += string.Format(" [未開放] ", new object[0]);
            }
            AreaTankerModel tankerCount = this.GetTankerCount();

            text += string.Format(" 輸送船:{0}/{1}(移動中:{2},遠征中:{3}) ", new object[]
            {
                tankerCount.GetCountNoMove(),
                tankerCount.GetMaxCount(),
                tankerCount.GetCountMove(),
                tankerCount.GetCountInMission()
            });
            text += string.Format("入渠ドック: {0} ", this.ToString(this.GetNDockStateList()));
            DeckModel[] decks = this.GetDecks();
            if (decks.Length == 0)
            {
                text += string.Format("海域に艦隊無し", new object[0]);
            }
            else
            {
                for (int i = 0; i < decks.Length; i++)
                {
                    DeckModel deckModel = decks[i];
                    text += string.Format("{0}", deckModel);
                }
            }
            EscortDeckModel escortDeck = this.GetEscortDeck();

            if (escortDeck == null)
            {
                text += string.Format(" 護衛艦隊無し", new object[0]);
            }
            else
            {
                text += string.Format(" {0}", escortDeck);
            }
            return(text);
        }
Ejemplo n.º 4
0
        public HashSet <int> __GetShipMemIdHashInBothDeck__()
        {
            HashSet <int> hashSet = new HashSet <int>();

            using (Dictionary <int, DeckModel> .ValueCollection.Enumerator enumerator = this._decks.get_Values().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    DeckModel   current = enumerator.get_Current();
                    ShipModel[] ships   = current.GetShips();
                    for (int i = 0; i < ships.Length; i++)
                    {
                        if (ships[i] != null)
                        {
                            hashSet.Add(ships[i].MemId);
                        }
                    }
                }
            }
            using (Dictionary <int, __EscortDeckModel__> .ValueCollection.Enumerator enumerator2 = this._escort_decks.get_Values().GetEnumerator())
            {
                while (enumerator2.MoveNext())
                {
                    EscortDeckModel current2 = enumerator2.get_Current();
                    ShipModel[]     ships    = current2.GetShips();
                    for (int j = 0; j < ships.Length; j++)
                    {
                        if (ships[j] != null)
                        {
                            hashSet.Add(ships[j].MemId);
                        }
                    }
                }
            }
            return(hashSet);
        }
Ejemplo n.º 5
0
 public UserPreActionPhaseResultModel(TurnWorkResult data, ManagerBase manager) : base(data)
 {
     this._bling_end_ships        = new List <ShipModel>();
     this._bling_end_escort_decks = new List <EscortDeckModel>();
     this._bling_end_tanker       = new Dictionary <int, int>();
     if (this._data.BlingEndShip != null)
     {
         Api_Result <Dictionary <int, Mem_ship> > api_Result = new Api_get_Member().Ship(this._data.BlingEndShip);
         if (api_Result.state == Api_Result_State.Success)
         {
             for (int i = 0; i < this._data.BlingEndShip.get_Count(); i++)
             {
                 int num = this._data.BlingEndShip.get_Item(i);
                 this._bling_end_ships.Add(new ShipModel(api_Result.data.get_Item(num)));
             }
         }
     }
     if (this._data.BlingEndEscortDeck != null)
     {
         for (int j = 0; j < this._data.BlingEndEscortDeck.get_Count(); j++)
         {
             int             num2       = this._data.BlingEndEscortDeck.get_Item(j);
             int             area_id    = num2;
             EscortDeckModel escortDeck = manager.UserInfo.GetEscortDeck(area_id);
             this._bling_end_escort_decks.Add(escortDeck);
         }
     }
     if (this._data.BlingEndTanker != null)
     {
         using (Dictionary <int, List <Mem_tanker> > .KeyCollection.Enumerator enumerator = this._data.BlingEndTanker.get_Keys().GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 int current = enumerator.get_Current();
                 this._bling_end_tanker.set_Item(current, this._data.BlingEndTanker.get_Item(current).get_Count());
             }
         }
     }
     this._mission_results = new List <MissionResultModel>();
     if (data.MissionEndDecks != null && data.MissionEndDecks.get_Count() > 0)
     {
         for (int k = 0; k < data.MissionEndDecks.get_Count(); k++)
         {
             int                   rid        = data.MissionEndDecks.get_Item(k).Rid;
             DeckModel             deck       = manager.UserInfo.GetDeck(rid);
             ShipModel[]           ships      = deck.GetShips();
             Dictionary <int, int> dictionary = new Dictionary <int, int>();
             for (int l = 0; l < ships.Length; l++)
             {
                 ShipModel shipModel = ships[l];
                 dictionary.set_Item(shipModel.MemId, shipModel.Exp_Percentage);
             }
             Api_Result <MissionResultFmt> api_Result2 = new Api_req_Mission().Result(rid);
             if (api_Result2.state == Api_Result_State.Success)
             {
                 MissionResultFmt data2 = api_Result2.data;
                 this._mission_results.Add(new MissionResultModel(data2, manager.UserInfo, dictionary));
             }
         }
     }
     this._resources = new MaterialInfo(this._data.TransportMaterial);
     this._resources_monthly_bonus = new MaterialInfo(this._data.BonusMaterialMonthly);
     this._resources_weekly_bonus  = new MaterialInfo(this._data.BonusMaterialWeekly);
     this._rewards = new List <IReward>();
     if (this._data.SpecialItem != null && this._data.SpecialItem.get_Count() > 0)
     {
         for (int m = 0; m < this._data.SpecialItem.get_Count(); m++)
         {
             ItemGetFmt itemGetFmt = this._data.SpecialItem.get_Item(m);
             if (itemGetFmt.Category == ItemGetKinds.Ship)
             {
                 this._rewards.Add(new Reward_Ship(itemGetFmt.Id));
             }
             else if (itemGetFmt.Category == ItemGetKinds.SlotItem)
             {
                 this._rewards.Add(new Reward_Slotitem(itemGetFmt.Id, itemGetFmt.Count));
             }
             else if (itemGetFmt.Category == ItemGetKinds.UseItem)
             {
                 this._rewards.Add(new Reward_Useitem(itemGetFmt.Id, itemGetFmt.Count));
             }
         }
     }
 }
Ejemplo n.º 6
0
        public override string ToString()
        {
            string       text         = string.Format("[ユーザー事前行動フェーズ]:\n", new object[0]);
            MaterialInfo materialInfo = this.Resources;

            text += string.Format(" 資源回収:燃/弾/鋼/ボ:{0}/{1}/{2}/{3} 高速建造/高速修復/開発資材/改修資材:{4}/{5}/{6}/{7}\n", new object[]
            {
                materialInfo.Fuel,
                materialInfo.Ammo,
                materialInfo.Steel,
                materialInfo.Baux,
                materialInfo.BuildKit,
                materialInfo.RepairKit,
                materialInfo.Devkit,
                materialInfo.Revkit
            });
            materialInfo = this.GetMonthlyBonus();
            if (materialInfo.HasPositive())
            {
                text += string.Format(" 月頭ボーナス:燃/弾/鋼/ボ:{0}/{1}/{2}/{3} 高速建造/高速修復/開発資材/改修資材:{4}/{5}/{6}/{7}\n", new object[]
                {
                    materialInfo.Fuel,
                    materialInfo.Ammo,
                    materialInfo.Steel,
                    materialInfo.Baux,
                    materialInfo.BuildKit,
                    materialInfo.RepairKit,
                    materialInfo.Devkit,
                    materialInfo.Revkit
                });
            }
            materialInfo = this.GetWeeklyBonus();
            if (materialInfo.HasPositive())
            {
                text += string.Format(" 週頭ボーナス:燃/弾/鋼/ボ:{0}/{1}/{2}/{3} 高速建造/高速修復/開発資材/改修資材:{4}/{5}/{6}/{7}\n", new object[]
                {
                    materialInfo.Fuel,
                    materialInfo.Ammo,
                    materialInfo.Steel,
                    materialInfo.Baux,
                    materialInfo.BuildKit,
                    materialInfo.RepairKit,
                    materialInfo.Devkit,
                    materialInfo.Revkit
                });
            }
            if (this.Rewards != null && this.Rewards.get_Count() > 0)
            {
                text += string.Format("[特別ボーナス] ", new object[0]);
                for (int i = 0; i < this.Rewards.get_Count(); i++)
                {
                    text += string.Format("{0} ", this.Rewards.get_Item(i));
                }
            }
            text += string.Format(" -- 移動完了した艦[", new object[0]);
            for (int j = 0; j < this._bling_end_ships.get_Count(); j++)
            {
                ShipModel shipModel = this._bling_end_ships.get_Item(j);
                text += string.Format("{0}(mst:{1},mem:{2})", shipModel.Name, shipModel.MstId, shipModel.MemId);
                if (j < this._bling_end_ships.get_Count() - 1)
                {
                    text += ", ";
                }
            }
            text += "]\n";
            text += string.Format(" -- 移動完了した護衛艦隊[", new object[0]);
            for (int k = 0; k < this._bling_end_escort_decks.get_Count(); k++)
            {
                EscortDeckModel escortDeckModel = this._bling_end_escort_decks.get_Item(k);
                text += string.Format("海域{0}の護衛艦隊", escortDeckModel.AreaId);
                if (k < this._bling_end_escort_decks.get_Count() - 1)
                {
                    text += ", ";
                }
            }
            text += "]\n";
            text += string.Format(" -- 移動完了した輸送船[", new object[0]);
            using (Dictionary <int, int> .KeyCollection.Enumerator enumerator = this._bling_end_tanker.get_Keys().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    int current = enumerator.get_Current();
                    text += string.Format("海域{0}に{1}隻", current, this._bling_end_tanker.get_Item(current));
                    text += ", ";
                }
            }
            text += "]\n";
            if (this.MissionResults.Length > 0)
            {
                text += "\n";
                for (int l = 0; l < this.MissionResults.Length; l++)
                {
                    text += string.Format("[遠征終了]:{0}\n", this.MissionResults[l]);
                }
            }
            return(text);
        }
Ejemplo n.º 7
0
        public int GetEscortDeckId(int ship_mem_id)
        {
            EscortDeckModel escortDeckByShipMemId = this.GetEscortDeckByShipMemId(ship_mem_id);

            return((escortDeckByShipMemId != null) ? escortDeckByShipMemId.Id : -1);
        }
Ejemplo n.º 8
0
 public UserPreActionPhaseResultModel(TurnWorkResult data, ManagerBase manager)
     : base(data)
 {
     _bling_end_ships        = new List <ShipModel>();
     _bling_end_escort_decks = new List <EscortDeckModel>();
     _bling_end_tanker       = new Dictionary <int, int>();
     if (_data.BlingEndShip != null)
     {
         Api_Result <Dictionary <int, Mem_ship> > api_Result = new Api_get_Member().Ship(_data.BlingEndShip);
         if (api_Result.state == Api_Result_State.Success)
         {
             for (int i = 0; i < _data.BlingEndShip.Count; i++)
             {
                 int key = _data.BlingEndShip[i];
                 _bling_end_ships.Add(new ShipModel(api_Result.data[key]));
             }
         }
     }
     if (_data.BlingEndEscortDeck != null)
     {
         for (int j = 0; j < _data.BlingEndEscortDeck.Count; j++)
         {
             int             num        = _data.BlingEndEscortDeck[j];
             int             area_id    = num;
             EscortDeckModel escortDeck = manager.UserInfo.GetEscortDeck(area_id);
             _bling_end_escort_decks.Add(escortDeck);
         }
     }
     if (_data.BlingEndTanker != null)
     {
         foreach (int key2 in _data.BlingEndTanker.Keys)
         {
             _bling_end_tanker[key2] = _data.BlingEndTanker[key2].Count;
         }
     }
     _mission_results = new List <MissionResultModel>();
     if (data.MissionEndDecks != null && data.MissionEndDecks.Count > 0)
     {
         for (int k = 0; k < data.MissionEndDecks.Count; k++)
         {
             int                   rid        = data.MissionEndDecks[k].Rid;
             DeckModel             deck       = manager.UserInfo.GetDeck(rid);
             ShipModel[]           ships      = deck.GetShips();
             Dictionary <int, int> dictionary = new Dictionary <int, int>();
             foreach (ShipModel shipModel in ships)
             {
                 dictionary[shipModel.MemId] = shipModel.Exp_Percentage;
             }
             Api_Result <MissionResultFmt> api_Result2 = new Api_req_Mission().Result(rid);
             if (api_Result2.state == Api_Result_State.Success)
             {
                 MissionResultFmt data2 = api_Result2.data;
                 _mission_results.Add(new MissionResultModel(data2, manager.UserInfo, dictionary));
             }
         }
     }
     _resources = new MaterialInfo(_data.TransportMaterial);
     _resources_monthly_bonus = new MaterialInfo(_data.BonusMaterialMonthly);
     _resources_weekly_bonus  = new MaterialInfo(_data.BonusMaterialWeekly);
     _rewards = new List <IReward>();
     if (_data.SpecialItem == null || _data.SpecialItem.Count <= 0)
     {
         return;
     }
     for (int m = 0; m < _data.SpecialItem.Count; m++)
     {
         ItemGetFmt itemGetFmt = _data.SpecialItem[m];
         if (itemGetFmt.Category == ItemGetKinds.Ship)
         {
             _rewards.Add(new Reward_Ship(itemGetFmt.Id));
         }
         else if (itemGetFmt.Category == ItemGetKinds.SlotItem)
         {
             _rewards.Add(new Reward_Slotitem(itemGetFmt.Id, itemGetFmt.Count));
         }
         else if (itemGetFmt.Category == ItemGetKinds.UseItem)
         {
             _rewards.Add(new Reward_Useitem(itemGetFmt.Id, itemGetFmt.Count));
         }
     }
 }
Ejemplo n.º 9
0
        public override string ToString()
        {
            string       str       = $"[ユ\u30fcザ\u30fc事前行動フェ\u30fcズ]:\n";
            MaterialInfo resources = Resources;

            str      += $" 資源回収:燃/弾/鋼/ボ:{resources.Fuel}/{resources.Ammo}/{resources.Steel}/{resources.Baux} 高速建造/高速修復/開発資材/改修資材:{resources.BuildKit}/{resources.RepairKit}/{resources.Devkit}/{resources.Revkit}\n";
            resources = GetMonthlyBonus();
            if (resources.HasPositive())
            {
                str += $" 月頭ボ\u30fcナス:燃/弾/鋼/ボ:{resources.Fuel}/{resources.Ammo}/{resources.Steel}/{resources.Baux} 高速建造/高速修復/開発資材/改修資材:{resources.BuildKit}/{resources.RepairKit}/{resources.Devkit}/{resources.Revkit}\n";
            }
            resources = GetWeeklyBonus();
            if (resources.HasPositive())
            {
                str += $" 週頭ボ\u30fcナス:燃/弾/鋼/ボ:{resources.Fuel}/{resources.Ammo}/{resources.Steel}/{resources.Baux} 高速建造/高速修復/開発資材/改修資材:{resources.BuildKit}/{resources.RepairKit}/{resources.Devkit}/{resources.Revkit}\n";
            }
            if (Rewards != null && Rewards.Count > 0)
            {
                str += $"[特別ボ\u30fcナス] ";
                for (int i = 0; i < Rewards.Count; i++)
                {
                    str += $"{Rewards[i]} ";
                }
            }
            str += $" -- 移動完了した艦[";
            for (int j = 0; j < _bling_end_ships.Count; j++)
            {
                ShipModel shipModel = _bling_end_ships[j];
                str += $"{shipModel.Name}(mst:{shipModel.MstId},mem:{shipModel.MemId})";
                if (j < _bling_end_ships.Count - 1)
                {
                    str += ", ";
                }
            }
            str += "]\n";
            str += $" -- 移動完了した護衛艦隊[";
            for (int k = 0; k < _bling_end_escort_decks.Count; k++)
            {
                EscortDeckModel escortDeckModel = _bling_end_escort_decks[k];
                str += $"海域{escortDeckModel.AreaId}の護衛艦隊";
                if (k < _bling_end_escort_decks.Count - 1)
                {
                    str += ", ";
                }
            }
            str += "]\n";
            str += $" -- 移動完了した輸送船[";
            foreach (int key in _bling_end_tanker.Keys)
            {
                str += $"海域{key}に{_bling_end_tanker[key]}隻";
                str += ", ";
            }
            str += "]\n";
            if (MissionResults.Length > 0)
            {
                str += "\n";
                for (int l = 0; l < MissionResults.Length; l++)
                {
                    str += $"[遠征終了]:{MissionResults[l]}\n";
                }
            }
            return(str);
        }