public string ToDetailString() { string text = string.Empty; text += string.Format("[{0}]{1}", this.Id, this.Name); text += string.Format("{0}\n", (!this.IsActionEnd()) ? string.Empty : "[行動終了]"); ShipModel[] ships = base.GetShips(); for (int i = 0; i < ships.Length; i++) { ShipModel shipModel = ships[i]; text += string.Format(" {0}(Lv:{1} Mst:{2} Mem:{3}", new object[] { shipModel.Name, shipModel.Level, shipModel.MstId, shipModel.MemId }); text += string.Format(" 速:{0} ", shipModel.Soku); text += string.Format(" 燃/弾:{0}/{1} ", shipModel.Fuel, shipModel.Ammo); for (int j = 0; j < shipModel.SlotCount; j++) { SlotitemModel slotitemModel = shipModel.SlotitemList.get_Item(j); if (slotitemModel == null) { text += string.Format("[-]", new object[0]); } else { text += string.Format("[{0}({1}:{2})]", slotitemModel.Name, slotitemModel.MstId, slotitemModel.MemId); } } text += ")\n"; } return(text); }
public __ShipModel_Attacker__(ShipModel baseModel, int index) : base(null, null, 0, null, null) { _mst_data = Mst_DataManager.Instance.Mst_ship[baseModel.MstId]; _baseModel = baseModel; _base_data = new __ShipModel_Battle_BaseData__(); _base_data.Index = base.Index; _base_data.IsFriend = true; _base_data.IsPractice = false; _slotitems = new List <SlotitemModel_Battle>(); List <SlotitemModel> slotitemList = baseModel.SlotitemList; for (int i = 0; i < slotitemList.Count; i++) { SlotitemModel slotitemModel = slotitemList[i]; if (slotitemModel == null) { _slotitems.Add(null); } else { _slotitems.Add(new SlotitemModel_Battle(slotitemList[i].MstId)); } } if (_baseModel.HasExSlot() && _baseModel.SlotitemEx != null) { int mstId = _baseModel.SlotitemEx.MstId; _slotitemex = new SlotitemModel_Battle(mstId); } }
private void _UpdateSlotitems() { _slotitems = new List <SlotitemModel>(); Api_Result <Dictionary <int, Mem_slotitem> > api_Result = new Api_get_Member().Slotitem(); if (api_Result.state == Api_Result_State.Success && api_Result.data != null) { for (int i = 0; i < SlotCount; i++) { if (_mem_data.Slot[i] == -1) { _slotitems.Add(null); continue; } Mem_slotitem data = api_Result.data[_mem_data.Slot[i]]; _slotitems.Add(new SlotitemModel(data)); } if (_mem_data.Exslot <= 0) { _slotitem_ex = null; } else { Mem_slotitem data2 = api_Result.data[_mem_data.Exslot]; _slotitem_ex = new SlotitemModel(data2); } } while (_slotitems.Count < SlotCount) { _slotitems.Add(null); } }
private void _UpdateSlotitems() { this._slotitems = new List <SlotitemModel>(); Api_Result <Dictionary <int, Mem_slotitem> > api_Result = new Api_get_Member().Slotitem(); if (api_Result.state == Api_Result_State.Success && api_Result.data != null) { for (int i = 0; i < this.SlotCount; i++) { if (this._mem_data.Slot.get_Item(i) == -1) { this._slotitems.Add(null); } else { Mem_slotitem data = api_Result.data.get_Item(this._mem_data.Slot.get_Item(i)); this._slotitems.Add(new SlotitemModel(data)); } } if (this._mem_data.Exslot <= 0) { this._slotitem_ex = null; } else { Mem_slotitem data2 = api_Result.data.get_Item(this._mem_data.Exslot); this._slotitem_ex = new SlotitemModel(data2); } } while (this._slotitems.get_Count() < this.SlotCount) { this._slotitems.Add(null); } }
private string _ToString(SlotitemModel slotitem, int slot_index) { string text = (slotitem != null) ? slotitem.ToString() : "[-]"; if (slot_index >= 0 && slot_index < SlotCount) { text += $"搭載:{base.Tousai[slot_index]}/{base.TousaiMax[slot_index]} "; } return(text); }
public bool HasLocked() { using (List <SlotitemModel> .Enumerator enumerator = this.SlotitemList.GetEnumerator()) { while (enumerator.MoveNext()) { SlotitemModel current = enumerator.get_Current(); if (current != null && current.IsLocked()) { return(true); } } } return(this._slotitem_ex != null && this._slotitem_ex.IsLocked()); }
private string _ToString(SlotitemModel slotitem, int slot_index) { string text; if (slotitem == null) { text = "[-]"; } else { text = slotitem.ToString(); } if (slot_index >= 0 && slot_index < this.SlotCount) { text += string.Format("搭載:{0}/{1} ", base.Tousai[slot_index], base.TousaiMax[slot_index]); } return(text); }
public string ToDetailString() { string empty = string.Empty; empty += $"[{Id}]{Name}"; empty += string.Format("{0}\n", (!IsActionEnd()) ? string.Empty : "[行動終了]"); ShipModel[] ships = GetShips(); foreach (ShipModel shipModel in ships) { empty += $" {shipModel.Name}(Lv:{shipModel.Level} Mst:{shipModel.MstId} Mem:{shipModel.MemId}"; empty += $" 速:{shipModel.Soku} "; empty += $" 燃/弾:{shipModel.Fuel}/{shipModel.Ammo} "; for (int j = 0; j < shipModel.SlotCount; j++) { SlotitemModel slotitemModel = shipModel.SlotitemList[j]; empty = ((slotitemModel != null) ? (empty + $"[{slotitemModel.Name}({slotitemModel.MstId}:{slotitemModel.MemId})]") : (empty + $"[-]")); } empty += ")\n"; } return(empty); }
public bool __HasLocked__(Dictionary <int, Mem_slotitem> slotitems) { if (!this._CheckSlotitemCache()) { this._slotitems = new List <SlotitemModel>(); for (int i = 0; i < this.SlotCount; i++) { Mem_slotitem data; if (this._mem_data.Slot.get_Item(i) == -1) { this._slotitems.Add(null); } else if (!slotitems.TryGetValue(this._mem_data.Slot.get_Item(i), ref data)) { this._slotitems.Add(null); } else { this._slotitems.Add(new SlotitemModel(data)); } } if (this._mem_data.Exslot > 0) { Mem_slotitem data2; if (!slotitems.TryGetValue(this._mem_data.Exslot, ref data2)) { this._slotitem_ex = null; } else { this._slotitem_ex = new SlotitemModel(data2); } } else { this._slotitem_ex = null; } } return(this.HasLocked()); }
public bool __HasLocked__(Dictionary <int, Mem_slotitem> slotitems) { if (!_CheckSlotitemCache()) { _slotitems = new List <SlotitemModel>(); for (int i = 0; i < SlotCount; i++) { Mem_slotitem value; if (_mem_data.Slot[i] == -1) { _slotitems.Add(null); } else if (!slotitems.TryGetValue(_mem_data.Slot[i], out value)) { _slotitems.Add(null); } else { _slotitems.Add(new SlotitemModel(value)); } } if (_mem_data.Exslot > 0) { if (!slotitems.TryGetValue(_mem_data.Exslot, out Mem_slotitem value2)) { _slotitem_ex = null; } else { _slotitem_ex = new SlotitemModel(value2); } } else { _slotitem_ex = null; } } return(HasLocked()); }
public RevampRecipeDetailModel(Mst_slotitem_remodel mst, Mst_slotitem_remodel_detail mst_detail, SlotitemModel slotitem) : base(mst) { this._mst_detail = mst_detail; this._slotitem = slotitem; }