Exemple #1
0
        /// <summary>
        /// 获取舰娘类型id,若不存在返回-1
        /// </summary>
        /// <param name="ownedShip"></param>
        /// <returns></returns>
        public int GetShipType(KancolleShip ownedShip)
        {
            KancolleShipData shipData;

            if (ShipDataDictionary.TryGetValue(ownedShip.No, out shipData))
            {
                return(shipData.Type);
            }
            return(-1);
        }
Exemple #2
0
        /// <summary>
        /// 获取舰娘名,若不存在返回null
        /// </summary>
        /// <param name="ownedShip"></param>
        /// <returns></returns>
        public string GetShipName(KancolleShip ownedShip)
        {
            KancolleShipData shipData;

            if (ShipDataDictionary.TryGetValue(ownedShip.ShipId, out shipData))
            {
                return(shipData.Name);
            }
            return(null);
        }
Exemple #3
0
        /// <summary>
        /// 从ownedShip获得数据库的shipData,若不存在返回null
        /// </summary>
        /// <param name="ownedShip"></param>
        /// <returns></returns>
        public KancolleShipData GetShip(KancolleShip ownedShip)
        {
            KancolleShipData shipData;

            if (ShipDataDictionary.TryGetValue(ownedShip.No, out shipData))
            {
                return(shipData);
            }
            return(null);
        }
Exemple #4
0
 /// <summary>
 /// 舰娘是否已经入渠
 /// </summary>
 /// <param name="ship"></param>
 /// <returns></returns>
 public bool IsShipRepairing(KancolleShip ship)
 {
     return(IsShipRepairing(ship.No));
 }