Exemplo n.º 1
0
        private string GetMaterialName( CompassData compass )
        {
            if ( compass.GetItemID == 4 ) {		//"※" 大方資源専用ID

                return Constants.GetMaterialName( compass.GetItemIDMetadata );

            } else {
                UseItemMaster item =  KCDatabase.Instance.MasterUseItems[compass.GetItemIDMetadata];
                if ( item != null )
                    return item.Name;
                else
                    return "謎のアイテム";
            }
        }
Exemplo n.º 2
0
		private string GetMaterialInfo( CompassData compass ) {

			var strs = new LinkedList<string>();

			foreach ( var item in compass.GetItems ) {

				string itemName;

				if ( item.ItemID == 4 ) {
					itemName = Constants.GetMaterialName( item.Metadata );

				} else {
					var itemMaster = KCDatabase.Instance.MasterUseItems[item.Metadata];
					if ( itemMaster != null )
						itemName = itemMaster.Name;
					else
						itemName = "謎のアイテム";
				}

				strs.AddLast( itemName + " x " + item.Amount );
			}

			if ( !strs.Any() ) {
				return "(なし)";

			} else {
				return string.Join( ", ", strs );
			}
		}
Exemplo n.º 3
0
		/// <summary>
		/// 「次のセル」の表示を置き換える
		/// </summary>
		/// <param name="compass">APIから受信した羅針盤情報</param>
		/// <returns></returns>
		private string GetDestinationText( CompassData compass )
			=> GetDestinationText( compass.MapAreaID, compass.MapInfoID, compass.Destination );