本文整理汇总了C#中Obj_AI_Base.LSGetAutoAttackDamage方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.LSGetAutoAttackDamage方法的具体用法?C# Obj_AI_Base.LSGetAutoAttackDamage怎么用?C# Obj_AI_Base.LSGetAutoAttackDamage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.LSGetAutoAttackDamage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnObjAiBaseProcessSpellCast
/// <summary>
/// Process Spell Cast subscribed event function.
/// </summary>
/// <param name="sender"><see cref="Obj_AI_Base" /> sender</param>
/// <param name="args">Processed Spell Cast Data</param>
private static void OnObjAiBaseProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (!sender.LSIsValidTarget(2000, false) || !AutoAttack.IsAutoAttack(args.SData.Name) || !sender.IsAlly)
{
return;
}
if (!(sender is Obj_AI_Minion) && !(sender is Obj_AI_Turret))
{
return;
}
var target = args.Target as Obj_AI_Minion;
if (target == null)
{
return;
}
ActiveAttacks.Remove(sender.NetworkId);
ActiveAttacks.Add(
sender.NetworkId,
new PredictedDamage(
sender,
target,
Variables.TickCount - (Game.Ping / 2),
sender.AttackCastDelay * 1000,
(sender.AttackDelay * 1000) - (sender is Obj_AI_Turret ? 70 : 0),
sender.IsMelee ? int.MaxValue : (int)args.SData.MissileSpeed,
(float)sender.LSGetAutoAttackDamage(target)));
}
示例2: OnObjAiBaseProcessSpellCast
private static void OnObjAiBaseProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
try
{
if (!Enabled)
{
return;
}
var enemy = sender as AIHeroClient;
var turret = sender as Obj_AI_Turret;
foreach (
var hero in GameObjects.Heroes.Where(h => h.IsValid && IncomingDamages.ContainsKey(h.NetworkId)))
{
if (ShouldReset(hero))
{
IncomingDamages[hero.NetworkId] = 0;
continue;
}
if (enemy != null && enemy.IsValid && enemy.IsEnemy && enemy.LSDistance(hero) <= 2000f)
{
if (args.Target != null && args.Target.NetworkId.Equals(hero.NetworkId))
{
if (args.SData.IsAutoAttack())
{
AddDamage(
hero, (int)(GetTime(sender, hero, args.SData) * 0.3f),
(float)sender.LSGetAutoAttackDamage(hero, true));
}
else if (args.SData.TargettingType == SpellDataTargetType.Unit ||
args.SData.TargettingType == SpellDataTargetType.SelfAndUnit)
{
AddDamage(
hero, (int)(GetTime(sender, hero, args.SData) * 0.3f),
(float)sender.LSGetSpellDamage(hero, args.SData.Name));
}
}
if (args.Target == null && Skillshots)
{
var slot = enemy.GetSpellSlot(args.SData.Name);
if (slot != SpellSlot.Unknown &&
(slot == SpellSlot.Q || slot == SpellSlot.E || slot == SpellSlot.W ||
slot == SpellSlot.R))
{
var width = Math.Min(
750f,
(args.SData.TargettingType == SpellDataTargetType.Cone || args.SData.LineWidth > 0) &&
args.SData.TargettingType != SpellDataTargetType.Cone
? args.SData.LineWidth
: (args.SData.CastRadius <= 0
? args.SData.CastRadiusSecondary
: args.SData.CastRadius));
if (args.End.LSDistance(hero.ServerPosition) <= Math.Pow(width, 2))
{
AddDamage(
hero, (int)(GetTime(sender, hero, args.SData) * 0.6f),
(float)sender.LSGetSpellDamage(hero, args.SData.Name));
}
}
}
}
if (turret != null && turret.IsValid && turret.IsEnemy && turret.LSDistance(hero) <= 1500f)
{
if (args.Target != null && args.Target.NetworkId.Equals(hero.NetworkId))
{
AddDamage(
hero, (int)(GetTime(sender, hero, args.SData) * 0.3f),
(float)
sender.CalcDamage(
hero, DamageType.Physical,
sender.BaseAttackDamage + sender.FlatPhysicalDamageMod));
}
}
}
}
catch (Exception e)
{
Console.WriteLine(e);
}
}
示例3: Game_ProcessSpell
private void Game_ProcessSpell(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (enabled)
{
AIHeroClient target = args.Target as AIHeroClient;
if (target != null && target.Team != sender.Team)
{
if (sender.IsValid && !sender.IsDead)
{
var data =
IncomingDamagesAlly.Concat(IncomingDamagesEnemy)
.FirstOrDefault(i => i.Hero.NetworkId == target.NetworkId);
if (data != null)
{
var missileSpeed = (sender.LSDistance(target) / args.SData.MissileSpeed) +
args.SData.SpellCastTime;
missileSpeed = missileSpeed > 1f ? 0.8f : missileSpeed;
if (Orbwalking.IsAutoAttack(args.SData.Name))
{
var dmg =
(float)(sender.LSGetAutoAttackDamage(target, true));
if (args.SData.Name.ToLower().Contains("crit"))
{
dmg = dmg * 2;
}
data.Damages.Add(
new Dmg(target, dmg, missileSpeed, !sender.Name.ToLower().Contains("turret")));
}
else
{
var hero = sender as AIHeroClient;
if (hero != null &&
!CombatHelper.BuffsList.Any(
b => args.Slot == b.Slot && hero.ChampionName == b.ChampionName))
{
data.Damages.Add(
new Dmg(
target,
(float)Damage.LSGetSpellDamage(hero, (Obj_AI_Base)args.Target, args.Slot),
missileSpeed, false,
SpellDatabase.CcList.Any(
cc =>
cc.Slot == args.Slot &&
cc.Champion.ChampionName == hero.ChampionName)));
}
}
}
}
}
}
}
示例4: Obj_AI_Base_OnProcessSpellCast
public override void Obj_AI_Base_OnProcessSpellCast(
Obj_AI_Base sender,
GameObjectProcessSpellCastEventArgs args)
{
//attackMinions.Clear();
if (sender == null) return;
if (sender.IsEnemy)
{
if (SoulBound != null && Program.combo["SoulBoundSaver"].Cast<CheckBox>().CurrentValue)
{
if ((!(sender is AIHeroClient) || args.SData.IsAutoAttack()) && args.Target != null
&& args.Target.NetworkId == SoulBound.NetworkId)
{
incomingDamage.Add(
SoulBound.ServerPosition.LSDistance(sender.ServerPosition) / args.SData.MissileSpeed
+ Game.Time,
(float)sender.LSGetAutoAttackDamage(SoulBound));
}
else if (sender is AIHeroClient)
{
var attacker = (AIHeroClient)sender;
var slot = attacker.GetSpellSlot(args.SData.Name);
if (slot != SpellSlot.Unknown)
{
if (slot == attacker.GetSpellSlot("SummonerDot") && args.Target != null
&& args.Target.NetworkId == SoulBound.NetworkId)
{
InstantDamage.Add(
Game.Time + 2,
(float)attacker.GetSummonerSpellDamage(SoulBound, LeagueSharp.Common.Damage.SummonerSpell.Ignite));
}
else if (slot.HasFlag(SpellSlot.Q | SpellSlot.W | SpellSlot.E | SpellSlot.R)
&& ((args.Target != null && args.Target.NetworkId == SoulBound.NetworkId)
|| args.End.LSDistance(SoulBound.ServerPosition, true)
< Math.Pow(args.SData.LineWidth, 2)))
{
InstantDamage.Add(Game.Time + 2, (float)attacker.LSGetSpellDamage(SoulBound, slot));
}
}
}
}
}
if (sender.IsMe && args.SData.Name == E.Instance.Name)
{
LeagueSharp.Common.Utility.DelayAction.Add(250, Orbwalker.ResetAutoAttack);
}
}
示例5: ObjAiBaseOnOnProcessSpellCast
/// <summary>
/// Fired when the game processes a spell cast.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="args">The <see cref="GameObjectProcessSpellCastEventArgs" /> instance containing the event data.</param>
private static void ObjAiBaseOnOnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (!sender.LSIsValidTarget(3000) || sender.Team != ObjectManager.Player.Team || sender is AIHeroClient
|| !Orbwalking.IsAutoAttack(args.SData.Name) || !(args.Target is Obj_AI_Base))
{
return;
}
var target = (Obj_AI_Base) args.Target;
ActiveAttacks.Remove(sender.NetworkId);
var attackData = new PredictedDamage(
sender,
target,
Utils.GameTimeTickCount - Game.Ping/2,
sender.AttackCastDelay*1000,
sender.AttackDelay*1000 - (sender is Obj_AI_Turret ? 70 : 0),
sender.CombatType == GameObjectCombatType.Melee ? int.MaxValue : (int) args.SData.MissileSpeed,
(float)sender.LSGetAutoAttackDamage(target, true));
ActiveAttacks.Add(sender.NetworkId, attackData);
}