本文整理汇总了C#中Obj_AI_Hero类的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Hero类的具体用法?C# Obj_AI_Hero怎么用?C# Obj_AI_Hero使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Obj_AI_Hero类属于命名空间,在下文中一共展示了Obj_AI_Hero类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitiatorArgs
public InitiatorArgs(Obj_AI_Hero hero, Vector3 start, Vector3 end, float range)
{
Hero = hero;
Start = start;
End = end;
Range = range;
}
示例2: BuffManagerArgs
public BuffManagerArgs(string uniqueId, Obj_AI_Hero hero, Vector3 position, float endTime)
{
UniqueId = uniqueId;
Hero = hero;
Position = position;
EndTime = endTime;
}
示例3: ECast
private static void ECast(Obj_AI_Hero enemy)
{
var range = Orbwalking.GetRealAutoAttackRange(enemy);
var path = Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(),
Prediction.GetPrediction(enemy, 0.25f).UnitPosition.To2D(), LucianSpells.E.Range, range);
if (path.Count() > 0)
{
var epos = path.MinOrDefault(x => x.Distance(Game.CursorPos));
if (epos.To3D().UnderTurret(true) || epos.To3D().IsWall())
{
return;
}
if (epos.To3D().CountEnemiesInRange(LucianSpells.E.Range - 100) > 0)
{
return;
}
LucianSpells.E.Cast(epos);
}
if (path.Count() == 0)
{
var epos = ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -LucianSpells.E.Range);
if (epos.UnderTurret(true) || epos.IsWall())
{
return;
}
// no intersection or target to close
LucianSpells.E.Cast(ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -LucianSpells.E.Range));
}
}
示例4: Check
public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
{
try
{
if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
{
return true;
}
foreach (var invulnerable in Items)
{
if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
{
if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
{
if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
{
return true;
}
if (invulnerable.CustomCheck != null && CustomCheck(invulnerable, target, damageType))
{
return true;
}
}
}
}
return false;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例5: CheckCleanse
internal static void CheckCleanse(Obj_AI_Hero player)
{
foreach (var hero in Activator.Heroes.Where(x => x.Player.NetworkId == player.NetworkId))
{
hero.CleanseBuffCount = GetAuras(hero.Player, "summonerboost").Count();
if (hero.CleanseBuffCount > 0)
{
foreach (var buff in GetAuras(hero.Player, "summonerboost"))
{
var duration = (int) Math.Ceiling(buff.EndTime - buff.StartTime);
if (duration > hero.CleanseHighestBuffTime)
{
hero.CleanseHighestBuffTime = duration;
}
}
hero.LastDebuffTimestamp = Utils.GameTimeTickCount;
}
else
{
if (hero.CleanseHighestBuffTime > 0)
hero.CleanseHighestBuffTime -= hero.QSSHighestBuffTime;
else
hero.CleanseHighestBuffTime = 0;
}
}
}
示例6: GetComboDamage
private float GetComboDamage(Obj_AI_Hero t)
{
float fComboDamage = 0f;
if (Q.IsReady())
fComboDamage += (float)ObjectManager.Player.GetSpellDamage(t, SpellSlot.Q);
//fComboDamage += CalcQDamage;
if (W.Level >0)
fComboDamage += (float)ObjectManager.Player.GetSpellDamage(t, SpellSlot.W);
if (E.IsReady())
fComboDamage += (float) ObjectManager.Player.GetSpellDamage(t, SpellSlot.E);
if (R.IsReady())
fComboDamage += (float) ObjectManager.Player.GetSpellDamage(t, SpellSlot.R);
if (ObjectManager.Player.GetSpellSlot("summonerdot") != SpellSlot.Unknown &&
ObjectManager.Player.Spellbook.CanUseSpell(ObjectManager.Player.GetSpellSlot("summonerdot")) ==
SpellState.Ready && ObjectManager.Player.Distance(t) < 550)
fComboDamage += (float) ObjectManager.Player.GetSummonerSpellDamage(t, Damage.SummonerSpell.Ignite);
if (Items.CanUseItem(3144) && ObjectManager.Player.Distance(t) < 550)
fComboDamage += (float) ObjectManager.Player.GetItemDamage(t, Damage.DamageItems.Bilgewater);
if (Items.CanUseItem(3153) && ObjectManager.Player.Distance(t) < 550)
fComboDamage += (float) ObjectManager.Player.GetItemDamage(t, Damage.DamageItems.Botrk);
return fComboDamage;
}
示例7: GetTarget
public static Obj_AI_Hero GetTarget(float range,
TargetSelector.DamageType damageType,
bool ignoreShield = true,
IEnumerable<Obj_AI_Hero> ignoredChamps = null,
Vector3? rangeCheckFrom = null)
{
if (_lastTarget == null || !_lastTarget.IsValidTarget() || _lastDamageType != damageType)
{
var newTarget = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);
_lastTarget = newTarget;
_lastDamageType = damageType;
return newTarget;
}
if (_lastTarget.IsValidTarget(range) && damageType == _lastDamageType)
{
return _lastTarget;
}
var newTarget2 = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);
_lastTarget = newTarget2;
_lastDamageType = damageType;
return newTarget2;
}
示例8: Update
public void Update(Obj_AI_Hero target)
{
if (target.HealthPercent >= _minEnemyHealth && (!_onlyTwitchUlt || ObjectManager.Player.HasBuff("TwitchFullAutomatic")))
{
Use(target);
}
}
示例9: Update
public void Update(Obj_AI_Hero target)
{
if ((target.HealthPercent >= _minEnemyHealth || ObjectManager.Player.HealthPercent < 20) && ObjectManager.Player.HealthPercent <= _maxPlayerHealth && target.Distance(ObjectManager.Player) < 550)
{
Use(target);
}
}
示例10: IsPositionSafe
// use underTurret and .Extend for this please
public static bool IsPositionSafe(Obj_AI_Hero target, Spell spell)
{
var predPos = spell.GetPrediction(target).UnitPosition.To2D();
var myPos = Player.Position.To2D();
var newPos = (target.Position.To2D() - myPos);
newPos.Normalize();
var checkPos = predPos + newPos * (spell.Range - Vector2.Distance(predPos, myPos));
Obj_Turret closestTower = null;
foreach (var tower in ObjectManager.Get<Obj_Turret>()
.Where(tower => tower.IsValid && !tower.IsDead && Math.Abs(tower.Health) > float.Epsilon)
.Where(tower => Vector3.Distance(tower.Position, Player.Position) < 1450))
{
closestTower = tower;
}
if (closestTower == null)
return true;
if (Vector2.Distance(closestTower.Position.To2D(), checkPos) <= 910)
return false;
return true;
}
示例11: EnemyWStackCount
public static int EnemyWStackCount(Obj_AI_Hero t)
{
return
t.Buffs.Where(xBuff => xBuff.Name == "varuswdebuff" && t.IsValidTarget(Q.Range))
.Select(xBuff => xBuff.Count)
.FirstOrDefault();
}
示例12: Cast
internal bool Cast(Obj_AI_Hero target, bool farmcast = false)
{
if (!item.IsReady())
{
return false;
}
if (!farmcast)
{
if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) &&
Player.CountEnemiesInRange(item.Range) >= eneinrangecount)
{
item.Cast();
return true;
}
if (type == ItemCastType.TargettedCast && target.IsInRange(item.Range))
{
item.Cast(target);
return true;
}
}
else if (farmcast)
{
if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) && ObjectManager.Get<Obj_AI_Minion>().Count(x=> x.IsValidTarget(item.Range)) >= minioncount)
{
item.Cast();
return true;
}
}
return false;
}
示例13: Combo
public static void Combo(Obj_AI_Hero t)
{
var useQ = Menu.Item("UseQ").GetValue<bool>();
var useR = Menu.Item("UseR").GetValue<bool>();
var alwaysStun = Menu.Item("alwaysStun").GetValue<bool>();
var numOfEnemies = Menu.Item("MinEnemys").GetValue<Slider>().Value;
t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
if (useQ && Q.IsReady())
{
if (t.IsValidTarget())
{
if (alwaysStun)
{
castStunQ(t);
}
else
{
Q.Cast(t);
}
}
}
if (useR && R.IsReady())
{
var t2 = TargetSelector.GetTarget(2500, TargetSelector.DamageType.Magical);
if (GetEnemys(t2) >= numOfEnemies)
{
R.Cast(t2, false, true);
}
}
}
示例14: Game_OnGameLoad
private static void Game_OnGameLoad(EventArgs args)
{
EQDrawList = new List<Vector3>();
Player = ObjectManager.Player;
if (Player.ChampionName != ChampionName) return;
Q = new Spell(SpellSlot.Q, 700f);
Q.SetSkillshot(0.5f, 70f, float.MaxValue, false, SkillshotType.SkillshotLine);
W = new Spell(SpellSlot.W, 300f);
E = new Spell(SpellSlot.E, 830f);
E.SetSkillshot(0.5f, 70f, float.MaxValue, false, SkillshotType.SkillshotCircle);
Config = new Menu("J4Helper", "J4Helper", true);
//Orbwalker
Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));
//Misc
Config.AddSubMenu(new Menu("Keys", "Keys"));
Config.SubMenu("Keys")
.AddItem(
new MenuItem("EQMouse", "EQ to Mouse").SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press)));
Config.AddToMainMenu();
Game.OnUpdate += Game_OnUpdate;
Drawing.OnDraw += Drawing_OnDraw;
Game.PrintChat("J4Helper Loaded.");
Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
}
示例15: PrintSData
//private static bool done;
/*
private static void PrintSData()
{
if (done) return;
foreach (var spell in Player.Spellbook.Spells)
{
var sdata = spell.SData;
Game.PrintChat("spell " + spell.Slot + " speed " + sdata.MissileSpeed + " delay " + sdata.DelayCastOffsetPercent + " width " + sdata.LineWidth + " range " + sdata.CastRange);
}
done = true;
}
*/
private static void SorakaMain(EventArgs args)
{
Player = ObjectManager.Player;
if (Player.CharData.BaseSkinName != "Soraka")
{
return;
}
Config = SorakaMenu.CreateMenu();
Config.AddToMainMenu();
InitializeSpells();
AntiGapcloser.OnEnemyGapcloser += OnGapClose;
Interrupter2.OnInterruptableTarget += OnInterruptableTarget;
Obj_AI_Base.OnProcessSpellCast += DangerDetector;
Orbwalking.BeforeAttack += BeforeAttack;
Game.OnUpdate += OnUpdate;
Drawing.OnDraw += OnDraw;
Game.PrintChat("SephSoraka Loaded!");
}