本文整理汇总了C#中System.Item.Buy方法的典型用法代码示例。如果您正苦于以下问题:C# Item.Buy方法的具体用法?C# Item.Buy怎么用?C# Item.Buy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Item
的用法示例。
在下文中一共展示了Item.Buy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Game_OnUpdate
private void Game_OnUpdate(EventArgs args)
{
if (!Program.LagFree(0) || Player.IsRecalling() || Player.IsDead)
return;
foreach (var obj in HiddenObjList)
{
if (obj.endTime < Game.Time)
{
HiddenObjList.Remove(obj);
return;
}
}
if (getCheckBoxItem("autoBuy") && Player.InFountain() && !FarsightOrb.IsOwned() && Player.Level >= 9)
{
var itm = new Item(ItemId.Farsight_Alteration);
itm.Buy();
}
if (rengar && Player.HasBuff("rengarralertsound"))
CastVisionWards(Player.ServerPosition);
if (Vayne != null && Vayne.IsValidTarget(1000) && Vayne.HasBuff("vaynetumblefade"))
CastVisionWards(Vayne.ServerPosition);
AutoWardLogic();
}
示例2: OnUpdate
/// <summary>
/// TODO The on update.
/// </summary>
/// <param name="args">
/// TODO The args.
/// </param>
private void OnUpdate(EventArgs args)
{
if (PortAIO.OrbwalkerManager.isComboActive)
{
OnCombo();
}
if (PortAIO.OrbwalkerManager.isHarassActive)
{
OnHarass();
}
if (PortAIO.OrbwalkerManager.isLastHitActive)
{
OnLastHit();
}
if (PortAIO.OrbwalkerManager.isLaneClearActive)
{
OnLaneClear();
}
this.HandleSentinels();
this.KillstealQ();
var enemies = HeroManager.Enemies.Count(x => ObjectManager.Player.LSDistance(x) <= spells[SpellSlot.E].Range);
if (getCheckBoxItem(comboMenu, "eDeath") && enemies > 2 && ObjectManager.Player.HealthPercent <= getSliderItem(comboMenu, "eHealth") && spells[SpellSlot.E].IsReady())
{
var target = HeroManager.Enemies.Where(x => spells[SpellSlot.E].IsInRange(x) && x.HasBuff("KalistaExpungeMarker")).OrderBy(x => Extensions.GetRendDamage(x)).FirstOrDefault();
if (target != null)
{
var stacks = Extensions.GetRendDamage(target);
var damage = Math.Ceiling(stacks * 100 / target.GetTotalHealth());
if (damage >= getSliderItem(comboMenu, "eDeathC") && Environment.TickCount - spells[SpellSlot.E].LastCastAttemptT > 500)
{
spells[SpellSlot.E].Cast();
spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
}
}
}
if (getCheckBoxItem(miscMenu, "useJungleSteal"))
{
this.DoMobSteal();
}
if (getKeyBindItem(miscMenu, "fleeKey") || PortAIO.OrbwalkerManager.isFleeActive)
{
this.OnFlee();
}
var item = new Item(ItemId.Farsight_Alteration);
if (getCheckBoxItem(miscMenu, "autoTrinket") && ObjectManager.Player.Level >= 9 && ObjectManager.Player.InShop() && !Items.HasItem((int)ItemId.Farsight_Alteration))
{
item.Buy();
}
this.HandleBalista();
}
示例3: Buy
private static void Buy(CItem item)
{
Item itm = new Item(item.ID);
itm.Buy();
}