本文整理汇总了C#中SpellbookCastSpellEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# SpellbookCastSpellEventArgs类的具体用法?C# SpellbookCastSpellEventArgs怎么用?C# SpellbookCastSpellEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SpellbookCastSpellEventArgs类属于命名空间,在下文中一共展示了SpellbookCastSpellEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Spellbook_OnCastSpell
public static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (sender.Owner.IsMe)
{
lock (m_lock)
{
if (SPredictioner.Config.Item("ENABLED").GetValue<bool>() && (SPredictioner.Config.Item("COMBOKEY").GetValue<KeyBind>().Active || SPredictioner.Config.Item("HARASSKEY").GetValue<KeyBind>().Active))
{
if (!ShineCommon.Utility.IsValidSlot(args.Slot))
return;
if (SPredictioner.Spells[(int)args.Slot] == null)
return;
if (handleEvent[(int)args.Slot])
{
args.Process = false;
handleEvent[(int)args.Slot] = false;
var enemy = args.EndPosition.GetEnemiesInRange(200f).OrderByDescending(p => ShineCommon.Utility.GetPriority(p.ChampionName)).FirstOrDefault();
if (enemy == null)
enemy = TargetSelector.GetTarget(SPredictioner.Spells[(int)args.Slot].Range, TargetSelector.DamageType.Physical);
if (enemy != null)
SPredictioner.Spells[(int)args.Slot].SPredictionCast(enemy, ShineCommon.Utility.HitchanceArray[SPredictioner.Config.Item("SPREDHITC").GetValue<StringList>().SelectedIndex]);
}
}
}
}
}
示例2: Spellbook_OnCastSpell
private void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E)
{
passRdy = true;
}
}
示例3: OnCastSpell
static void OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (sender == null || !sender.Owner.IsMe) {
return;
}
var antiswitch = Config.Item("antiswitchenabled").GetValue<bool>();
var useforthis = Config.Item("Spells." + args.Slot).GetValue<bool>();
var target = args.Target as Obj_AI_Hero;
var mindelay = Config.Item("mindelay").GetValue<Slider>().Value;
if (antiswitch && target != null)
{
if (target != Player.LastCastedSpellTarget() && Utils.TickCount - Player.LastCastedSpellT() <= mindelay)
{
args.Process = false;
return;
}
}
var humanizerenabled = Config.Item("humanizerenabled").GetValue<bool>();
var delayforthis = Config.Item(args.Slot + "delay").GetValue<Slider>().Value;
if (humanizerenabled && useforthis)
{
if (Utils.TickCount - Player.LastCastedSpellT() <= delayforthis)
{
args.Process = false;
}
}
}
示例4: PassiveControl
private void PassiveControl(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E)
{
ProcessSpell();
}
}
示例5: OnSpell
public static void OnSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (args.Slot == SpellSlot.Q)
{
PortAIO.OrbwalkerManager.ResetAutoAttackTimer();
}
}
示例6: Spellbook_OnCastSpell
private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (sender.Owner.IsMe)
{
switch (args.Slot)
{
case SpellSlot.Q:
case SpellSlot.W:
case SpellSlot.E:
case SpellSlot.R:
if (IsReady)
{
// We are safe to cast a spell
_sendTime = TickCount;
}
else
{
// Don't allow the spellcast
args.Process = false;
}
break;
}
}
}
示例7: OnCastSpell
public static void OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (sender.Owner.IsMe && args.Slot == SpellSlot.Q && Program.Player.IsDashing())
{
args.Process = false;
}
}
示例8: Spellbook_OnCastSpell
void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (!IsActive() || SummonerSpells.GetFlashSlot() == args.Slot || !sender.Owner.IsMe)
return;
var startWall = GetStartWall();
if (!startWall.IsZero && Game.CursorPos.IsWall() && ObjectManager.Player.Distance(startWall) < 1000)
{
args.Process = false;
ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, startWall);
return;
}
for (var dist = ObjectManager.Player.Distance(Game.CursorPos); dist < 800; dist += 25)
{
var curPos = ObjectManager.Player.Position.Extend(Game.CursorPos, dist);
if (!curPos.IsWall())
{
ObjectManager.Player.Spellbook.CastSpell(args.Slot, curPos, false);
return;
}
}
if (ObjectManager.Player.ServerPosition.To2D().Distance(args.StartPosition) < 390f)
{
args.Process = false;
ObjectManager.Player.Spellbook.CastSpell(args.Slot, ObjectManager.Player.ServerPosition.Extend(args.StartPosition, 400f));
}
}
示例9: OnSpell
public static void OnSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (args.Slot == SpellSlot.Q)
{
Orbwalker.ResetAutoAttack();
}
}
示例10: Spellbook_OnCastSpell
private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (sender.Owner.IsMe)
{
if (args.Slot == SpellSlot.Q)
{
args.Process = Orbwalker.CanMove;
QCastSpellTime = Core.GameTickCount;
}
else if (args.Slot == SpellSlot.W)
{
args.Process = Core.GameTickCount - Champion.ShouldWaitTime > W.CastDelay && Orbwalker.CanMove;
if (args.Process)
{
WCastSpellTime = Core.GameTickCount;
}
}
else if (args.Slot == SpellSlot.R)
{
if (args.Process)
{
RCastSpellTime = Core.GameTickCount;
}
}
}
}
示例11: Spellbook_OnCastSpell
private void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (args.Slot == SpellSlot.E)
{
NextCicleOn = Game.Time + 9.8f;
}
}
示例12: OnCastSpell
protected override void OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (sender.Owner.IsMe && args.Slot == SpellSlot.Q)
{
LastCast = myUtility.TickCount;
}
}
示例13: Spellbook_OnCastSpell
private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (sender.Owner.IsMe && args.Slot == F.Slot)
{
var wall = SummMenu["wall"].Cast<CheckBox>().CurrentValue
&& (NavMesh.GetCollisionFlags(args.EndPosition) == CollisionFlags.Wall
|| NavMesh.GetCollisionFlags(args.EndPosition) == CollisionFlags.Building);
if (wall && SummMenu["wall"].Cast<CheckBox>().CurrentValue
|| args.EndPosition.Distance(Player.Instance) < 450 && SummMenu["extend"].Cast<CheckBox>().CurrentValue)
{
args.Process = false;
}
if (args.EndPosition.Distance(Player.Instance) < 450 && SummMenu["extend"].Cast<CheckBox>().CurrentValue)
{
if (wall && SummMenu["wall"].Cast<CheckBox>().CurrentValue)
{
args.Process = false;
}
F.Cast(Player.Instance.Position.Extend(Game.CursorPos, 450).To3D());
}
}
}
示例14: OnSpellbookCastSpell
private static void OnSpellbookCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (!Enabled)
{
return;
}
try
{
if (sender.Owner.IsMe)
{
var target = args.Target as Obj_AI_Hero;
if (target != null)
{
switch (args.Slot)
{
case SpellSlot.Q:
case SpellSlot.W:
case SpellSlot.E:
case SpellSlot.R:
Damages.Clean();
if (Damages.IsDying(target))
{
args.Process = false;
}
break;
}
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
示例15: OnCastSpell
protected override void OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
{
if (sender.Owner.IsMe && args.Slot == SpellSlot.E && Player.IsDashing())
{
args.Process = false;
}
}