本文整理汇总了C#中Obj_AI_Base.IsHero方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.IsHero方法的具体用法?C# Obj_AI_Base.IsHero怎么用?C# Obj_AI_Base.IsHero使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.IsHero方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Obj_AI_Base_OnBuffLose
private static void Obj_AI_Base_OnBuffLose(Obj_AI_Base sender, Obj_AI_BaseBuffLoseEventArgs args)
{
try
{
if (!sender.IsValid || !args.Buff.Caster.IsValid || !sender.IsHero())
return;
Program.SpellList.RemoveAll(d => d.Buff && d.Target == sender && (d.Name == args.Buff.DisplayName || d.Name == args.Buff.Name));
DrawManager.Line.RemoveAll(d => d.Buff && d.Target == sender && (d.Name == args.Buff.DisplayName || d.Name == args.Buff.Name));
DrawManager.Timer.RemoveAll(d => d.Buff && d.Target == sender && (d.Name == args.Buff.DisplayName || d.Name == args.Buff.Name));
DrawManager.TimerLine.RemoveAll(d => d.Buff && d.Target == sender && (d.Name == args.Buff.DisplayName || d.Name == args.Buff.Name));
}
catch (Exception e)
{
e.ErrorMessage("BUFF_LOSE", args.Buff.DisplayName);
}
}
示例2: Obj_AI_Base_OnBuffGain
private static void Obj_AI_Base_OnBuffGain(Obj_AI_Base sender, Obj_AI_BaseBuffGainEventArgs args)
{
try
{
if (!sender.IsValid || !args.Buff.Caster.IsValid || !sender.IsHero())
return;
var database = SpellDatabase.Database.FirstOrDefault(d => d.Buff && (d.Name == args.Buff.DisplayName || d.Name == args.Buff.Name));
if (database != null)
{
if ((database.SpellType == SpellType.Spell && !Config.Menu.CheckboxValue("sTimer")) ||
(database.SpellType == SpellType.SummonerSpell && !Config.Menu.CheckboxValue("ssTimer")) ||
(database.SpellType == SpellType.Item && !Config.Menu.CheckboxValue("itemTimer")))
return;
Program.SpellList.Add(new Spell
{
SpellType = database.SpellType,
Team = sender.IsAlly ? Team.Ally : sender.IsEnemy ? Team.Enemy : Team.None,
DrawType = database.DrawType,
Importance = database.Importance,
Caster = sender,
Target = sender,
CastPosition = sender.Position,
ChampionName = database.ChampionName,
Name = database.Name,
MenuCode = database.MenuCode,
FullTime = args.Buff.EndTime - args.Buff.StartTime,
EndTime = args.Buff.EndTime,
NetworkID = sender.NetworkId,
Buff = database.Buff,
OnlyMe = database.OnlyMe,
Color = database.Color,
SpriteName = database.SpriteName,
});
return;
}
}
catch (Exception e)
{
e.ErrorMessage("BUFF_GAIN", args.Buff.DisplayName);
}
}