本文整理汇总了C#中EloBuddy.HasBuffOfType方法的典型用法代码示例。如果您正苦于以下问题:C# EloBuddy.HasBuffOfType方法的具体用法?C# EloBuddy.HasBuffOfType怎么用?C# EloBuddy.HasBuffOfType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EloBuddy
的用法示例。
在下文中一共展示了EloBuddy.HasBuffOfType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsCondemnable
private bool IsCondemnable(EloBuddy.AIHeroClient hero)
{
if (!hero.LSIsValidTarget(550f) || hero.HasBuffOfType(EloBuddy.BuffType.SpellShield) ||
hero.HasBuffOfType(EloBuddy.BuffType.SpellImmunity) || hero.IsDashing()) return false;
//values for pred calc pP = player position; p = enemy position; pD = push distance
var pP = EloBuddy.ObjectManager.Player.ServerPosition;
var p = hero.ServerPosition;
var pD = EPushDistanceSlider;
var mode = EModeStringList;
if (mode == 1 && (IsCollisionable(p.LSExtend(pP, -pD)) || IsCollisionable(p.LSExtend(pP, -pD / 2f)) ||
IsCollisionable(p.LSExtend(pP, -pD / 3f))))
{
if (!hero.CanMove)
return true;
var enemiesCount = EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(1200);
if (enemiesCount > 1 && enemiesCount <= 3)
{
var prediction = E.GetPrediction(hero);
for (var i = 15; i < pD; i += 75)
{
if (i > pD)
{
var lastPosFlags = EloBuddy.NavMesh.GetCollisionFlags(
prediction.UnitPosition.ToVector2()
.Extend(
pP.ToVector2(),
-pD)
.ToVector3());
if (lastPosFlags.HasFlag(EloBuddy.CollisionFlags.Wall) || lastPosFlags.HasFlag(EloBuddy.CollisionFlags.Building))
{
return true;
}
return false;
}
var posFlags = EloBuddy.NavMesh.GetCollisionFlags(
prediction.UnitPosition.ToVector2()
.Extend(
pP.ToVector2(),
-i)
.ToVector3());
if (posFlags.HasFlag(EloBuddy.CollisionFlags.Wall) || posFlags.HasFlag(EloBuddy.CollisionFlags.Building))
{
return true;
}
}
return false;
}
else
{
var hitchance = EHitchanceSlider;
var angle = 0.20 * hitchance;
const float travelDistance = 0.5f;
var alpha = new Vector2((float)(p.X + travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X + travelDistance * Math.Sin(Math.PI / 180 * angle)));
var beta = new Vector2((float)(p.X - travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X - travelDistance * Math.Sin(Math.PI / 180 * angle)));
for (var i = 15; i < pD; i += 100)
{
if (i > pD) return false;
if (IsCollisionable(pP.ToVector2().Extend(alpha,
i)
.ToVector3()) && IsCollisionable(pP.ToVector2().Extend(beta, i).ToVector3())) return true;
}
return false;
}
}
if (mode == 2 &&
(IsCollisionable(p.LSExtend(pP, -pD)) || IsCollisionable(p.LSExtend(pP, -pD / 2f)) ||
IsCollisionable(p.LSExtend(pP, -pD / 3f))))
{
if (!hero.CanMove ||
(hero.Spellbook.IsAutoAttacking))
return true;
var hitchance = EHitchanceSlider;
var angle = 0.20 * hitchance;
const float travelDistance = 0.5f;
var alpha = new Vector2((float)(p.X + travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X + travelDistance * Math.Sin(Math.PI / 180 * angle)));
var beta = new Vector2((float)(p.X - travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X - travelDistance * Math.Sin(Math.PI / 180 * angle)));
for (var i = 15; i < pD; i += 100)
{
if (i > pD)
{
return IsCollisionable(alpha.Extend(pP.ToVector2(),
-pD)
.ToVector3()) && IsCollisionable(beta.Extend(pP.ToVector2(), -pD).ToVector3());
}
if (IsCollisionable(alpha.Extend(pP.ToVector2(),
-i)
.ToVector3()) && IsCollisionable(beta.Extend(pP.ToVector2(), -i).ToVector3())) return true;
}
return false;
//.........这里部分代码省略.........
示例2: IsInvulnerable
private bool IsInvulnerable(EloBuddy.AIHeroClient target)
{
return target.HasBuffOfType(EloBuddy.BuffType.SpellShield) || target.HasBuffOfType(EloBuddy.BuffType.SpellImmunity);
}
示例3: NormalMode
private void NormalMode(EkkoCore core, EloBuddy.AIHeroClient target, bool useQ, bool useE, bool useW)
{
if (useQ && (core.Player.Distance(target) > core.spells.E.Range || core.Player.Distance(target) <= 100 && (core.spells.E.IsReady()) && useE))
{
var predQ = core.spells.Q.GetPrediction(target);
if (predQ.HitChance >= HitChance.High)
{
core.spells.Q.Cast(predQ.CastPosition);
}
}
if (useE && core.Player.Distance(target) > core.spells.E.Range * 2)
{
this.CastE(target, core, useQ);
}
if (useW && core.spells.W.IsInRange(target) && (target.HasBuffOfType(BuffType.Slow) || target.HasBuffOfType(BuffType.Stun)))
{
core.spells.W.Cast(target.Position);
}
}