本文整理汇总了C#中ItemId类的典型用法代码示例。如果您正苦于以下问题:C# ItemId类的具体用法?C# ItemId怎么用?C# ItemId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemId类属于命名空间,在下文中一共展示了ItemId类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssetContentChangeEventArgs
public AssetContentChangeEventArgs(ContentChangeEventArgs e, OverrideType previousOverride, OverrideType newOverride, ItemId itemId)
: base(e.Content, e.Index, e.ChangeType, e.OldValue, e.NewValue)
{
PreviousOverride = previousOverride;
NewOverride = newOverride;
ItemId = itemId;
}
示例2: DecrementItemCount
public void DecrementItemCount(ItemId itemId)
{
ThrowIfCheckedOut();
ThrowIfItemNotInCart(itemId);
if (_items.Get(itemId).CanDecrement())
ApplyChange(new DecrementedItemCountInCart { CartId = _id, ItemId = itemId });
}
示例3: Potion
public Potion(ItemId id)
{
Id = id;
switch (Id)
{
case ItemId.Health_Potion://Mau
Name = "RegenerationPotion";
HealthAmount = 150;
ProcessTime = 15;
break;
case ItemId.Mana_Potion://Mana
Name = "FlaskOfCrystalWater";
ManaAmount = 100;
ProcessTime = 15;
break;
case (ItemId)2041://Mau va Mana
Name = "ItemCrystalFlask";
HealthAmount = 120;
ManaAmount = 60;
ProcessTime = 12;
break;
case (ItemId)2010://Banh quy
Name = "ItemMiniRegenPotion";
HealthAmount = 170;
ManaAmount = 10;
ProcessTime = 15;
break;
}
}
示例4: AddItem
public Item AddItem(ItemId itemId, decimal weight)
{
decimal price = _itemPrices.GetWeighedPrice(itemId);
var item = new WeighedItem(itemId, price, weight);
return AddItem(item);
}
示例5: ItemStackTemplate
public ItemStackTemplate(ItemId id, int amount)
: this(ItemMgr.GetTemplate(id), amount)
{
if (m_Template == null)
{
throw new ArgumentException("id " + id + " is invalid.");
}
}
示例6: BuyItem
public static void BuyItem(ItemId item)
{
if (Environment.TickCount - LastShopAttempt > Autoplay.Rand.Next(0, 670))
{
Autoplay.Bot.BuyItem(item);
LastShopAttempt = Environment.TickCount;
}
}
示例7: IDDHeavyMetalItemData
public IDDHeavyMetalItemData(AnalysisMethods ams_, ItemId item)
{
InitializeComponent();
umass = item.declaredUMass;
length = item.length;
DeclaredUMassTextBox.Text = umass.ToString("F3");
LengthTextBox.Text = length.ToString("F3");
Integ.GetCurrentAcquireDetectorPair(ref acq, ref det);
}
示例8: WeighedItem
public WeighedItem(ItemId id, decimal price, decimal weight)
: base(id, price)
{
if(weight <= 0.0M)
{
throw new ArgumentOutOfRangeException("weight", "weight must be greater than 0.");
}
Weight = weight;
}
示例9: Item
public Item(string name, int range, CastType castType, ItemId id, ItemType itemType, bool meleeOnly = false, string buffName = null)
{
Name = name;
Range = range;
CastType = castType;
Id = id;
ItemType = itemType;
MeleeOnly = meleeOnly;
BuffName = buffName;
}
示例10: RecycleItem
public async Task<RecycleInventoryItemResponse> RecycleItem(ItemId itemId, int amount)
{
var message = new RecycleInventoryItemMessage
{
ItemId = itemId,
Count = amount
};
return await PostProtoPayload<Request, RecycleInventoryItemResponse>(RequestType.RecycleInventoryItem, message);
}
示例11: UseCaptureItem
public async Task<UseItemCaptureResponse> UseCaptureItem(ulong encounterId, ItemId itemId, string spawnPointId)
{
var message = new UseItemCaptureMessage
{
EncounterId = encounterId,
ItemId = itemId,
SpawnPointId = spawnPointId
};
return await PostProtoPayload<Request, UseItemCaptureResponse>(RequestType.UseItemCapture, message);
}
示例12: GetItemPrice
private static decimal GetItemPrice(IEnumerable<Item> items, ItemId id)
{
Item itemPrice = items.SingleOrDefault(x => x.Id == id);
if (itemPrice == null)
{
throw new InvalidOperationException("ItemId was not found in list.");
}
return itemPrice.GetPrice();
}
示例13: OnCurrensyChanges
private void OnCurrensyChanges(ItemId arg1, int arg2)
{
switch (arg1)
{
case ItemId.money:
moneyField.text = arg2.ToString("0");
break;
case ItemId.crystal:
crystalField.text = arg2.ToString("0");
break;
}
}
示例14: AddFortModifier
public async Task<AddFortModifierResponse> AddFortModifier(string fortId, ItemId modifierType)
{
var message = new AddFortModifierMessage()
{
FortId = fortId,
ModifierType = modifierType,
PlayerLatitude = _client.CurrentLatitude,
PlayerLongitude = _client.CurrentLongitude
};
return await _baseRpc.PostProtoPayload<Request, AddFortModifierResponse>(RequestType.AddFortModifier, message);
}
示例15: OnItemCollected
private void OnItemCollected(ItemId arg1, float arg2, float arg3)
{
if (itemType == arg1)
{
currentCount = CurrentCount + (int)arg2;
if (OnQuestProgressChange != null)
OnQuestProgressChange(CurrentCount, TargetCount);
if (CurrentCount >= TargetCount)
{
ReadyToReward();
}
}
}