本文整理汇总了C#中MinionOrderTypes类的典型用法代码示例。如果您正苦于以下问题:C# MinionOrderTypes类的具体用法?C# MinionOrderTypes怎么用?C# MinionOrderTypes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MinionOrderTypes类属于命名空间,在下文中一共展示了MinionOrderTypes类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsCanLastHit
public static Tuple<bool, Obj_AI_Base> IsCanLastHit(Vector3 from, float range, MinionTypes _MinionType, MinionTeam _MinionTeam, MinionOrderTypes _MinionOrderType, bool _IsRanged)
{
bool result = false;
Obj_AI_Base target = null;
if (HasTargonItem && !player.IsDead && player.Buffs.Any(x => x.Count > 0 && x.Name == "talentreaperdisplay") && IsAllyInRange(1500))
{
var minions = MinionManager.GetMinions(from, range, _MinionType, _MinionTeam, _MinionOrderType);
var itemNum = player.InventoryItems.Any(x => x.Id == ItemId.Face_of_the_Mountain || x.Id == ItemId.Relic_Shield || x.Id == ItemId.Targons_Brace);
foreach(var minion in minions)
{
var a = player.Buffs.Any(x => x.DisplayName.Contains("ThreshPassiveSoulsGain")) ? player.Buffs.Find(x => x.DisplayName.Contains("ThreshPassiveSoulsGain")).Count : 0;
var dmg = _IsRanged ? player.GetAutoAttackDamage(minion) + a : GetItemDmg();
if (minion.Health < dmg && player.CanAttack && Orbwalking.InAutoAttackRange(minion))
{
result = true;
target = minion;
}
}
}
return new Tuple<bool, Obj_AI_Base>(result, target);
}
示例2: GetMinions
public static List<Obj_AI_Minion> GetMinions(Vector3 from, float range, MinionTypes type = MinionTypes.All,
MinionTeam team = MinionTeam.Enemy, MinionOrderTypes order = MinionOrderTypes.Health)
{
var result = from minion in ObjectManager.Get<Obj_AI_Minion>()
where minion.IsValidTarget(range, false, @from)
let minionTeam = minion.Team
where
(team == MinionTeam.Neutral && minionTeam == GameObjectTeam.Neutral)
|| (team == MinionTeam.Ally
&& minionTeam
== (myHero.Team == GameObjectTeam.Chaos ? GameObjectTeam.Chaos : GameObjectTeam.Order))
|| (team == MinionTeam.Enemy
&& minionTeam
== (myHero.Team == GameObjectTeam.Chaos ? GameObjectTeam.Order : GameObjectTeam.Chaos))
|| (team == MinionTeam.NotAlly && minionTeam != myHero.Team)
|| (team == MinionTeam.NotAllyForEnemy
&& (minionTeam == myHero.Team || minionTeam == GameObjectTeam.Neutral))
|| team == MinionTeam.All
where
(minion.IsMelee() && type == MinionTypes.Melee)
|| (!minion.IsMelee() && type == MinionTypes.Ranged) || type == MinionTypes.All
where MinionManager.IsMinion(minion) || minionTeam == GameObjectTeam.Neutral || IsPet(minion)
select minion;
switch (order)
{
case MinionOrderTypes.Health:
result = result.OrderBy(i => i.Health);
break;
case MinionOrderTypes.MaxHealth:
result = result.OrderBy(i => i.MaxHealth).Reverse();
break;
}
return result.ToList();
}
示例3: GetMinions
public static List<Obj_AI_Base> GetMinions(float range,
MinionTypes type = MinionTypes.All,
MinionTeam team = MinionTeam.Enemy,
MinionOrderTypes order = MinionOrderTypes.Health)
{
return GetMinions(ObjectManager.Player.ServerPosition, range, type, team, order);
}
示例4: GetMinions
/// <summary>
/// Returns the minions in range from From.
/// </summary>
public static List<Obj_AI_Base> GetMinions(Vector3 from,
float range,
MinionTypes type = MinionTypes.All,
MinionTeam team = MinionTeam.Enemy,
MinionOrderTypes order = MinionOrderTypes.Health)
{
var result = new List<Obj_AI_Base>();
foreach (var minion in ObjectManager.Get<Obj_AI_Minion>())
{
if (minion.IsValidTarget(range, false))
{
if (team == MinionTeam.Neutral && minion.Team == GameObjectTeam.Neutral ||
team == MinionTeam.Ally &&
minion.Team ==
(ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Chaos : GameObjectTeam.Order) ||
team == MinionTeam.Enemy &&
minion.Team ==
(ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Order : GameObjectTeam.Chaos) ||
team == MinionTeam.NotAlly && minion.Team != ObjectManager.Player.Team ||
team == MinionTeam.NotAllyForEnemy &&
(minion.Team == ObjectManager.Player.Team || minion.Team == GameObjectTeam.Neutral) ||
team == MinionTeam.All)
{
if (minion.IsMelee() && type == MinionTypes.Melee ||
!minion.IsMelee() && type == MinionTypes.Ranged || type == MinionTypes.All)
{
result.Add(minion);
}
}
}
}
if (order == MinionOrderTypes.Health)
{
result = result.OrderBy(o => o.Health).ToList();
}
else if (order == MinionOrderTypes.MaxHealth)
{
result = result.OrderBy(o => o.MaxHealth).Reverse().ToList();
}
return result;
}
示例5: GetMinions
/// <summary>
/// Returns the minions in range from From.
/// </summary>
public static List<Obj_AI_Base> GetMinions(Vector3 from,
float range,
MinionTypes type = MinionTypes.All,
MinionTeam team = MinionTeam.Enemy,
MinionOrderTypes order = MinionOrderTypes.Health)
{
var result = (from minion in GameObjects.Minions.Concat(GameObjects.Jungle)
where minion.IsValidTarget(range, false, @from)
let minionTeam = minion.Team
where
team == MinionTeam.Neutral && minionTeam == GameObjectTeam.Neutral ||
team == MinionTeam.Ally &&
minionTeam ==
(ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Chaos : GameObjectTeam.Order) ||
team == MinionTeam.Enemy &&
minionTeam ==
(ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Order : GameObjectTeam.Chaos) ||
team == MinionTeam.NotAlly && minionTeam != ObjectManager.Player.Team ||
team == MinionTeam.NotAllyForEnemy &&
(minionTeam == ObjectManager.Player.Team || minionTeam == GameObjectTeam.Neutral) ||
team == MinionTeam.All
where
minion.IsMelee() && type == MinionTypes.Melee || !minion.IsMelee() && type == MinionTypes.Ranged ||
type == MinionTypes.All
where IsMinion(minion) || minionTeam == GameObjectTeam.Neutral
select minion).Select(m => m as Obj_AI_Base).ToList();
switch (order)
{
case MinionOrderTypes.Health:
result = result.OrderBy(o => o.Health).ToList();
break;
case MinionOrderTypes.MaxHealth:
result = result.OrderBy(o => o.MaxHealth).Reverse().ToList();
break;
}
return result;
}
示例6: GetMinions
public static List<Obj_AI_Base> GetMinions(Vector3 from,
float range,
MinionTypes type = MinionTypes.All,
MinionTeam team = MinionTeam.Enemy,
MinionOrderTypes order = MinionOrderTypes.Health)
{
var result = (from minion in ObjectManager.Get<Obj_AI_Minion>()
where minion.IsValidTarget(range, false, @from)
let minionTeam = minion.Team
where
team == MinionTeam.Neutral && minionTeam == GameObjectTeam.Neutral ||
team == MinionTeam.Ally &&
minionTeam ==
(ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Chaos : GameObjectTeam.Order) ||
team == MinionTeam.Enemy &&
minionTeam ==
(ObjectManager.Player.Team == GameObjectTeam.Chaos ? GameObjectTeam.Order : GameObjectTeam.Chaos) ||
team == MinionTeam.NotAlly && minionTeam != ObjectManager.Player.Team ||
team == MinionTeam.NotAllyForEnemy &&
(minionTeam == ObjectManager.Player.Team || minionTeam == GameObjectTeam.Neutral) ||
team == MinionTeam.All
where
!minion.IsRanged && type == MinionTypes.Melee || minion.IsRanged && type == MinionTypes.Ranged ||
type == MinionTypes.All
where IsMinion(minion) || minionTeam == GameObjectTeam.Neutral && minion.MaxHealth > 5 && minion.IsHPBarRendered
select minion).Cast<Obj_AI_Base>().ToList();
switch (order)
{
case MinionOrderTypes.Health:
result = result.OrderBy(o => o.Health).ToList();
break;
case MinionOrderTypes.MaxHealth:
result = result.OrderByDescending(o => o.MaxHealth).ToList();
break;
}
return result;
}