//艦船マスタデータの更新 public void UpdateShipInfo(KCB.api_start2.ApiData.ApiMstShip json) { SubItems[(int)ItemOrder.ID] = new LVIntSubItem(this, json.api_id); SubItems[(int)ItemOrder.SortNo] = new LVIntSubItem(this, json.api_sortno); SubItems[(int)ItemOrder.Name] = new LVStringSubItem(this, json.api_name); SubItems[(int)ItemOrder.Yomi] = new LVStringSubItem(this, json.api_yomi); SubItems[(int)ItemOrder.SType] = new LVShipTypeSubItem(this, json.api_stype); SubItems[(int)ItemOrder.AfterLV] = new LVIntSubItem(this, json.api_afterlv); SubItems[(int)ItemOrder.AfterShipID] = new LVStringSubItem(this, json.api_aftershipid); SubItems[(int)ItemOrder.Taik] = new LVNowMaxSubItem(this, json.api_taik); SubItems[(int)ItemOrder.Souk] = new LVNowMaxSubItem(this, json.api_souk); SubItems[(int)ItemOrder.Houg] = new LVNowMaxSubItem(this, json.api_houg); SubItems[(int)ItemOrder.Raig] = new LVNowMaxSubItem(this, json.api_raig); SubItems[(int)ItemOrder.Tyku] = new LVNowMaxSubItem(this, json.api_tyku); SubItems[(int)ItemOrder.Luck] = new LVNowMaxSubItem(this, json.api_luck); SubItems[(int)ItemOrder.Soku] = new LVIntSubItem(this, json.api_soku); SubItems[(int)ItemOrder.Leng] = new LVIntSubItem(this, json.api_leng); SubItems[(int)ItemOrder.SlotNum] = new LVIntSubItem(this, json.api_slot_num); SubItems[(int)ItemOrder.BuildTime] = new LVIntSubItem(this, json.api_buildtime); SubItems[(int)ItemOrder.Broken] = new LVParamArraySubItem(this, json.api_broken); SubItems[(int)ItemOrder.PowUp] = new LVParamArraySubItem(this, json.api_powup); SubItems[(int)ItemOrder.Backs] = new LVIntSubItem(this, json.api_backs); SubItems[(int)ItemOrder.GetMes] = new LVStringSubItem(this, json.api_getmes); SubItems[(int)ItemOrder.AfterFuel] = new LVIntSubItem(this, json.api_afterfuel); SubItems[(int)ItemOrder.AfterBull] = new LVIntSubItem(this, json.api_afterbull); SubItems[(int)ItemOrder.FuelMax] = new LVIntSubItem(this, json.api_fuel_max); SubItems[(int)ItemOrder.BullMax] = new LVIntSubItem(this, json.api_bull_max); }
// public Param(dynamic json) public Param(KCB.api_start2.ApiData.ApiMstShip json, Ship masterShip) { NameID = json.api_id; SortNo = json.api_sortno; Name = json.api_name; Yomi = json.api_yomi; ShipTypeId = json.api_stype; AfterLV = json.api_afterlv; MaxFuel = json.api_fuel_max; MaxBullet = json.api_bull_max; Speed = json.api_soku; SlotNum = json.api_slot_num; var stype = masterShip.LookupShipType(ShipTypeId); ShipTypeName = stype.ShipTypeName; RepairTimeParam = stype.ShipRepairTimeParam; Debug.WriteLine(string.Format("id:{0} name:{1} yomi:{2} type:{3} AfterLV:{4} MaxFuel:{5} MaxBullet:{6}", NameID, Name, Yomi, ShipTypeId, AfterLV, MaxFuel, MaxBullet)); }
public ShipMasterLVItem(KCB.api_start2.ApiData.ApiMstShip json) { InitializeSubItem(); UpdateShipInfo(json); }