public TradeItem(TradeItemBuilder builder) { this.ID = builder.Id; this.NAME = builder.Name; this.DESCRIPTION = builder.Description; this.FLAVOR_TEXT = builder.FlavorText; this.ITEM_ATTRIBUTE = builder.ItemAttribute; this.ITEM_VALUE = builder.ItemValue; this.MASS = builder.Mass; this.LEVEL = builder.Level; }
public TradeItemBuilder(string[] datas) { id = int.Parse(datas[0]); name = datas[1]; level = int.Parse(datas[2]); itemValue = int.Parse(datas[3]); mass = int.Parse(datas[4]); itemAttribute = (ItemAttribute)Enum.Parse(typeof(ItemAttribute), datas[5]); description = datas[6]; flavorText = datas[7]; }
public HealItem(HealItemBuilder builder, HealItemObserver observer) { ID = builder.getId(); NAME = builder.getName(); HEAL = builder.getHeal(); ITEM_VALUE = builder.getItemValue(); MASS = builder.getMass(); DESCRITION = builder.getDescription(); FLAVOR_TEXT = builder.getFlavorText(); ATTRIBUTE = builder.getAttribute(); LEVEL = builder.getLevel(); ITEM_ATTRIBUTE = builder.getItemAttribute(); this.observer = observer; }
public ItemMaterial(ItemMaterialBuilder builder) { this.ID = builder.getId(); this.QUALITY = builder.getQuality(); this.MASS = builder.getMass(); this.VALUE = builder.getItemValue(); this.CONSUMABILITY = builder.getConsumability(); this.NAME = builder.getName(); this.DESCRIPTOIN = builder.getDescription(); this.FLAVOR_TEXT = builder.getFlavorText(); this.LEVEL = builder.getLevel(); this.HEAVINESS = builder.getHeaviness(); this.ADDITIONAL_DESCRIPTION = builder.getAdditionalDescription(); this.ADDITIONAL_FLAVOR = builder.getAdditionalFlavor(); this.ITEM_ATTRIBUTE = builder.getItemAttribute(); }
/// <summary> /// コンストラクタ /// csvから初期化します /// </summary> /// <param name="datas">csvによるstring配列データ</param> public HealItemBuilder(string[] datas) { ID = int.Parse(datas[0]); NAME = datas[1]; heal = int.Parse(datas[2]); RAW_HEAL = heal; itemValue = int.Parse(datas[3]); RAW_ITEM_VALUE = itemValue; MASS = int.Parse(datas[4]); level = int.Parse(datas[5]); ATTRIBUTE = (HealAttribute)Enum.Parse(typeof(HealAttribute), datas[6]); ITEM_ATTRIBUTE = (ItemAttribute)System.Enum.Parse(typeof(ItemAttribute), datas[7]); DESCRIPTION = datas[8]; FLAVOR_TEXT = datas[9]; observer = new HealItemObserver(ID); }
public ItemMaterialBuilder(string[] datas) { ID = int.Parse(datas[0]); NAME = datas[1]; quality = float.Parse(datas[2]); RAW_QUALITY = quality; MASS = int.Parse(datas[3]); itemValue = int.Parse(datas[4]); RAW_ITEM_VALUE = itemValue; CONSUMABILITY = float.Parse(datas[5]); level = int.Parse(datas[6]); HEAVINESS = int.Parse(datas[7]); ITEM_ATTRIBUTE = (ItemAttribute)System.Enum.Parse(typeof(ItemAttribute), datas[8]); DESCRIPTOIN = datas[9]; FLAVOR_TEXT = datas[10]; ADDITIONAL_DESCRIPTION = datas[11]; ADDITIONAL_FLAVOR = datas[12]; }
public void characterTraded(IFriendly character, int tradedValue, ItemAttribute tradedAttribute) { if (tradedValue < 0) { throw new InvalidOperationException("trade value won't be negative"); } if (charactersTraded.ContainsKey(character)) { charactersTraded[character] += tradedValue; } else { charactersTraded.Add(character, tradedValue); } this.tradedValue = tradedValue; totalTradedValue += tradedValue; tradedTimes++; tradedAttributeTable[tradedAttribute]++; }
public float getValueMag(ItemAttribute itemAttribute) { return(livingTown.getItemValueMag(itemAttribute)); }
public void traded(IFriendly merchant, int tradedValue, ItemAttribute attribute) { observer.characterTraded(merchant, tradedValue, attribute); }
public float getItemValueMag(ItemAttribute itemAttribute) { return(priseMag * attribute.getAttributeMag(itemAttribute)); }
public float getAttributeMag(ItemAttribute attribute) { return(attributeMag[attribute]); }