本文整理汇总了C#中ezEvade.EvadeSpellData类的典型用法代码示例。如果您正苦于以下问题:C# EvadeSpellData类的具体用法?C# EvadeSpellData怎么用?C# EvadeSpellData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EvadeSpellData类属于ezEvade命名空间,在下文中一共展示了EvadeSpellData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CreateEvadeSpellMenu
private static Menu CreateEvadeSpellMenu(EvadeSpellData spell)
{
string menuName = spell.name + " (" + spell.spellKey.ToString() + ") Settings";
if (spell.isItem)
{
menuName = spell.name + " Settings";
}
Menu newSpellMenu = evadeSpellMenu.IsSubMenu ? evadeSpellMenu.Parent.AddSubMenuEx(menuName, spell.charName + spell.name + "EvadeSpellSettings") : evadeSpellMenu.AddSubMenuEx(menuName, spell.charName + spell.name + "EvadeSpellSettings");
newSpellMenu.Add(spell.name + "UseEvadeSpell", new CheckBox("Use Spell", true));
newSpellMenu.Add(spell.name + "EvadeSpellDangerLevel", new Slider("Danger Level", spell.dangerlevel - 1, 0, 4));
var slider = newSpellMenu.Add(spell.name + "EvadeSpellMode", new Slider("Spell Mode", GetDefaultSpellMode(spell), 0, 2));
var array = new[] { "Undodgeable", "Activation Time", "Always" };
slider.OnValueChange += delegate(ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args)
{
sender.DisplayName = array[args.NewValue];
};
slider.DisplayName = array[slider.CurrentValue];
//newSpellMenu.AddItem(new MenuItem(spell.name + "SpellActivationTime", "Spell Activation Time").SetValue(new Slider(0, 0, 1000)));
//Menu newSpellMiscMenu = new Menu("Misc Settings", spell.charName + spell.name + "EvadeSpellMiscSettings");
//newSpellMenu.AddSubMenuEx(newSpellMiscMenu);
return newSpellMenu;
}
开发者ID:HeheheM,项目名称:Elobuddy-3,代码行数:29,代码来源:EvadeSpell.cs
示例2: CreateEvadeSpellMenu
private static Menu CreateEvadeSpellMenu(EvadeSpellData spell)
{
string menuName = spell.name + " (" + spell.spellKey.ToString() + ") Settings";
if (spell.isItem)
{
menuName = spell.name + " Settings";
}
Menu newSpellMenu = new Menu(menuName, spell.charName + spell.name + "EvadeSpellSettings");
newSpellMenu.AddItem(new MenuItem(spell.name + "UseEvadeSpell", "Use Spell").SetValue(true));
newSpellMenu.AddItem(new MenuItem(spell.name + "EvadeSpellDangerLevel", "Danger Level")
.SetValue(new StringList(new[] { "Low", "Normal", "High", "Extreme" }, spell.dangerlevel - 1)));
//newSpellMenu.AddItem(new MenuItem(spell.name + "SpellActivationTime", "Spell Activation Time").SetValue(new Slider(0, 0, 1000)));
//Menu newSpellMiscMenu = new Menu("Misc Settings", spell.charName + spell.name + "EvadeSpellMiscSettings");
//newSpellMenu.AddSubMenu(newSpellMiscMenu);
newSpellMenu.AddItem(new MenuItem(spell.name + "EvadeSpellMode", "Spell Mode")
.SetValue(new StringList(new[] { "Undodgeable", "Activation Time", "Always" },
GetDefaultSpellMode(spell))));
evadeSpellMenu.AddSubMenu(newSpellMenu);
return newSpellMenu;
}
开发者ID:aikoy,项目名称:ezEvade,代码行数:28,代码来源:EvadeSpell.cs
示例3: UseEkkoR
public static bool UseEkkoR(EvadeSpellData evadeSpell, bool process = true)
{
if ((from obj in ObjectManager.Get<Obj_AI_Minion>() where obj != null && obj.IsValid && !obj.IsDead && obj.Name == "Ekko" && obj.IsAlly select obj.ServerPosition.To2D()).Any(blinkPos => !blinkPos.CheckDangerousPos(10)))
{
EvadeSpell.CastEvadeSpell(() => EvadeCommand.CastSpell(evadeSpell), process);
//DelayAction.Add(50, () => myHero.IssueOrder(GameObjectOrder.MoveTo, posInfo.position.To3D()));
return true;
}
return false;
}
开发者ID:Xelamats,项目名称:PortAIO,代码行数:11,代码来源:SpecialEvadeSpell.cs
示例4: LoadSpecialSpell
public static void LoadSpecialSpell(EvadeSpellData spellData)
{
if (spellData.spellName == "EkkoEAttack")
{
spellData.useSpellFunc = UseEkkoE2;
}
if (spellData.spellName == "EkkoR")
{
spellData.useSpellFunc = UseEkkoR;
}
}
开发者ID:Xelamats,项目名称:PortAIO,代码行数:12,代码来源:SpecialEvadeSpell.cs
示例5: UseBrokenWings
public static bool UseBrokenWings(EvadeSpellData evadeSpell, bool process = false)
{
var posInfo = EvadeHelper.GetBestPositionDash(evadeSpell);
if (posInfo != null)
{
EvadeCommand.MoveTo(posInfo.position);
DelayAction.Add(50, () => EvadeSpell.CastEvadeSpell(() => EvadeCommand.CastSpell(evadeSpell), process));
return true;
}
return false;
}
开发者ID:CONANLXF,项目名称:AIO,代码行数:12,代码来源:SpecialEvadeSpell.cs
示例6: CastSpell
public static void CastSpell(EvadeSpellData spellData, Vector2 movePos)
{
EvadeSpell.lastSpellEvadeCommand = new EvadeCommand
{
order = EvadeOrderCommand.CastSpell,
targetPosition = movePos,
evadeSpellData = spellData,
timestamp = EvadeUtils.TickCount,
isProcessed = false
};
myHero.Spellbook.CastSpell(spellData.spellKey, movePos.To3D(), false);
}
开发者ID:aikoy,项目名称:ezEvade,代码行数:13,代码来源:EvadeCommand.cs
示例7: Attack
public static void Attack(EvadeSpellData spellData, Obj_AI_Base target)
{
EvadeSpell.lastSpellEvadeCommand = new EvadeCommand
{
order = EvadeOrderCommand.Attack,
target = target,
evadeSpellData = spellData,
timestamp = EvadeUtils.TickCount,
isProcessed = false
};
Player.IssueOrder(GameObjectOrder.AttackUnit, target, false);
}
开发者ID:GodLS,项目名称:EloBuddy-Addons,代码行数:13,代码来源:EvadeCommand.cs
示例8: CastSpell
public static void CastSpell(EvadeSpellData spellData, Obj_AI_Base target)
{
EvadeSpell.lastSpellEvadeCommand = new EvadeCommand
{
order = EvadeOrderCommand.CastSpell,
target = target,
evadeSpellData = spellData,
timestamp = EvadeUtils.TickCount,
isProcessed = false
};
myHero.Spellbook.CastSpell(spellData.spellKey, target, false);
}
开发者ID:GodLS,项目名称:EloBuddy-Addons,代码行数:13,代码来源:EvadeCommand.cs
示例9: UsePounce
public static bool UsePounce(EvadeSpellData evadeSpell, bool proecess = true)
{
if (myHero.CharData.BaseSkinName != "Nidalee")
{
var posInfo = EvadeHelper.GetBestPositionDash(evadeSpell);
if (posInfo != null)
{
EvadeSpell.CastEvadeSpell(() => EvadeCommand.CastSpell(evadeSpell), proecess);
return true;
}
}
return false;
}
开发者ID:jis424,项目名称:LeagueSharp,代码行数:14,代码来源:SpecialEvadeSpell.cs
示例10: UseEkkoE2
public static bool UseEkkoE2(EvadeSpellData evadeSpell, bool process = true)
{
if (myHero.HasBuff("ekkoeattackbuff"))
{
var posInfo = EvadeHelper.GetBestPositionTargetedDash(evadeSpell);
if (posInfo != null && posInfo.target != null)
{
EvadeSpell.CastEvadeSpell(() => EvadeCommand.Attack(evadeSpell, posInfo.target), process);
//DelayAction.Add(50, () => myHero.IssueOrder(GameObjectOrder.MoveTo, posInfo.position.To3D()));
return true;
}
}
return false;
}
开发者ID:Xelamats,项目名称:PortAIO,代码行数:15,代码来源:SpecialEvadeSpell.cs
示例11: LoadSpecialSpell
public static void LoadSpecialSpell(EvadeSpellData spellData)
{
if (spellData.spellName == "EkkoEAttack")
{
spellData.useSpellFunc = UseEkkoE2;
}
if (spellData.spellName == "EkkoR")
{
spellData.useSpellFunc = UseEkkoR;
}
if (spellData.spellName == "Pounce")
{
spellData.useSpellFunc = UsePounce;
}
if (spellData.spellName == "RivenTriCleave")
{
spellData.useSpellFunc = UseBrokenWings;
}
}
开发者ID:CONANLXF,项目名称:AIO,代码行数:22,代码来源:SpecialEvadeSpell.cs
示例12: GetDefaultSpellMode
public static int GetDefaultSpellMode(EvadeSpellData spell)
{
return 0;
}
开发者ID:aikoy,项目名称:ezEvade,代码行数:4,代码来源:EvadeSpell.cs
示例13: GetBestPosition
public static PositionInfo GetBestPosition(EvadeSpellData evadeSpell = null)
{
int posChecked = 0;
int maxPosToCheck = 50;
int posRadius = 50;
int radiusIndex = 0;
var extraDelayBuffer = ObjectCache.menuCache.cache["ExtraPingBuffer"].Cast<Slider>().CurrentValue;
var extraEvadeDistance = ObjectCache.menuCache.cache["ExtraEvadeDistance"].Cast<Slider>().CurrentValue;
SpellDetector.UpdateSpells();
CalculateEvadeTime();
if (ObjectCache.menuCache.cache["CalculateWindupDelay"].Cast<CheckBox>().CurrentValue)
{
var extraWindupDelay = Evade.lastWindupTime - EvadeUtils.TickCount;
if (extraWindupDelay > 0)
{
extraDelayBuffer += (int)extraWindupDelay;
}
}
extraDelayBuffer += (int)(Evade.avgCalculationTime);
if (ObjectCache.menuCache.cache["HigherPrecision"].Cast<CheckBox>().CurrentValue)
{
maxPosToCheck = 150;
posRadius = 25;
}
Vector2 heroPoint = ObjectCache.myHeroCache.serverPos2D;
Vector2 lastMovePos = Game.CursorPos.LSTo2D();
List<PositionInfo> posTable = new List<PositionInfo>();
Spell lowestEvadeTimeSpell;
var lowestEvadeTime = SpellDetector.GetLowestEvadeTime(out lowestEvadeTimeSpell);
List<Vector2> fastestPositions = GetFastestPositions();
foreach (var pos in fastestPositions) //add the fastest positions into list of candidates
{
posTable.Add(InitPositionInfo(pos, extraDelayBuffer, extraEvadeDistance, lastMovePos, lowestEvadeTimeSpell));
}
/*if (SpellDetector.spells.Count() == 1)
{
var sortedFastestTable =
posTable.OrderBy(p => p.posDangerLevel);
if (sortedFastestTable.First() != null && sortedFastestTable.First().posDangerLevel > 0)
{
//use fastest
}
}*/
while (posChecked < maxPosToCheck)
{
radiusIndex++;
int curRadius = radiusIndex * (2 * posRadius);
int curCircleChecks = (int)Math.Ceiling((2 * Math.PI * (double)curRadius) / (2 * (double)posRadius));
for (int i = 1; i < curCircleChecks; i++)
{
posChecked++;
var cRadians = (2 * Math.PI / (curCircleChecks - 1)) * i; //check decimals
var pos = new Vector2((float)Math.Floor(heroPoint.X + curRadius * Math.Cos(cRadians)), (float)Math.Floor(heroPoint.Y + curRadius * Math.Sin(cRadians)));
posTable.Add(InitPositionInfo(pos, extraDelayBuffer, extraEvadeDistance, lastMovePos, lowestEvadeTimeSpell));
}
}
IOrderedEnumerable<PositionInfo> sortedPosTable;
if (ObjectCache.menuCache.cache["EvadeMode"].Cast<ComboBox>().CurrentValue == 1)
{
sortedPosTable =
posTable.OrderBy(p => p.isDangerousPos)
.ThenByDescending(p => p.intersectionTime)
.ThenBy(p => p.posDangerLevel)
.ThenBy(p => p.posDangerCount);
fastEvadeMode = true;
}
else if (ObjectCache.menuCache.cache["FastEvadeActivationTime"].Cast<Slider>().CurrentValue > 0
&& ObjectCache.menuCache.cache["FastEvadeActivationTime"].Cast<Slider>().CurrentValue + ObjectCache.gamePing + extraDelayBuffer > lowestEvadeTime)
{
sortedPosTable =
posTable.OrderBy(p => p.isDangerousPos)
.ThenByDescending(p => p.intersectionTime)
.ThenBy(p => p.posDangerLevel)
.ThenBy(p => p.posDangerCount);
fastEvadeMode = true;
}
else
{
sortedPosTable =
//.........这里部分代码省略.........
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:101,代码来源:EvadeHelper.cs
示例14: GetSpellDangerLevel
public static int GetSpellDangerLevel(EvadeSpellData spell)
{
var dangerStr = ObjectCache.menuCache.cache[spell.name + "EvadeSpellDangerLevel"].Cast<Slider>().DisplayName;
var dangerlevel = 1;
switch (dangerStr)
{
case "Low":
dangerlevel = 1;
break;
case "High":
dangerlevel = 3;
break;
case "Extreme":
dangerlevel = 4;
break;
default:
dangerlevel = 2;
break;
}
return dangerlevel;
}
开发者ID:GodLS,项目名称:EloBuddy-Addons,代码行数:24,代码来源:EvadeSpell.cs
示例15: GetDefaultSpellMode
public static int GetDefaultSpellMode(EvadeSpellData spell)
{
if (spell.dangerlevel > 3)
{
return 0;
}
return 1;
}
开发者ID:GodLS,项目名称:EloBuddy-Addons,代码行数:9,代码来源:EvadeSpell.cs
示例16: CreateEvadeSpellMenu
private static Menu CreateEvadeSpellMenu(EvadeSpellData spell)
{
string menuName = spell.name + " (" + spell.spellKey.ToString() + ") Settings";
if (spell.isItem)
{
menuName = spell.name + " Settings";
}
evadeSpellMenu.AddGroupLabel(menuName);
evadeSpellMenu.Add(spell.name + "UseEvadeSpell", new CheckBox("Use Spell"));
evadeSpellMenu.Add(spell.name + "EvadeSpellDangerLevel", new ComboBox("Danger Level", spell.dangerlevel - 1, "Low", "Normal", "High", "Extreme"));
evadeSpellMenu.Add(spell.name + "EvadeSpellMode", new ComboBox("Spell Mode", GetDefaultSpellMode(spell), "Undodgeable", "Activation Time", "Always"));
return evadeSpellMenu;
}
开发者ID:CONANLXF,项目名称:AIO,代码行数:16,代码来源:EvadeSpell.cs
示例17: GetSpellDangerLevel
public static int GetSpellDangerLevel(EvadeSpellData spell)
{
var dangerStr = ObjectCache.menuCache.cache[spell.name + "EvadeSpellDangerLevel"].Cast<ComboBox>().CurrentValue;
var dangerlevel = 1;
switch (dangerStr)
{
case 0:
dangerlevel = 1;
break;
case 2:
dangerlevel = 3;
break;
case 3:
dangerlevel = 4;
break;
default:
dangerlevel = 2;
break;
}
return dangerlevel;
}
开发者ID:CONANLXF,项目名称:AIO,代码行数:24,代码来源:EvadeSpell.cs
示例18: GetBestPositionDash
public static PositionInfo GetBestPositionDash(EvadeSpellData spell)
{
int posChecked = 0;
int maxPosToCheck = 100;
int posRadius = 50;
int radiusIndex = 0;
var extraDelayBuffer = ObjectCache.menuCache.cache["ExtraPingBuffer"].Cast<Slider>().CurrentValue;
var extraEvadeDistance = 100;// Evade.menu.SubMenu("MiscSettings").SubMenu("ExtraBuffers").Item("ExtraEvadeDistance").GetValue<Slider>().Value;
var extraDist = ObjectCache.menuCache.cache["ExtraCPADistance"].Cast<Slider>().CurrentValue;
Vector2 heroPoint = ObjectCache.myHeroCache.serverPos2DPing;
Vector2 lastMovePos = Game.CursorPos.To2D();
List<PositionInfo> posTable = new List<PositionInfo>();
List<int> spellList = SpellDetector.GetSpellList();
int minDistance = 50; //Math.Min(spell.range, minDistance)
int maxDistance = int.MaxValue;
if (spell.fixedRange)
{
minDistance = maxDistance = (int)spell.range;
}
while (posChecked < maxPosToCheck)
{
radiusIndex++;
int curRadius = radiusIndex * (2 * posRadius) + (minDistance - 2 * posRadius);
int curCircleChecks = (int)Math.Ceiling((2 * Math.PI * (double)curRadius) / (2 * (double)posRadius));
for (int i = 1; i < curCircleChecks; i++)
{
posChecked++;
var cRadians = (2 * Math.PI / (curCircleChecks - 1)) * i; //check decimals
var pos = new Vector2((float)Math.Floor(heroPoint.X + curRadius * Math.Cos(cRadians)), (float)Math.Floor(heroPoint.Y + curRadius * Math.Sin(cRadians)));
var posInfo = CanHeroWalkToPos(pos, spell.speed, extraDelayBuffer + ObjectCache.gamePing, extraDist);
posInfo.isDangerousPos = pos.CheckDangerousPos(6);
posInfo.hasExtraDistance = extraEvadeDistance > 0 ? pos.CheckDangerousPos(extraEvadeDistance) : false;// ? 1 : 0;
posInfo.distanceToMouse = pos.GetPositionValue();
posInfo.spellList = spellList;
posInfo.posDistToChamps = pos.GetDistanceToChampions();
posTable.Add(posInfo);
}
if (curRadius >= maxDistance)
break;
}
var sortedPosTable =
posTable.OrderBy(p => p.isDangerousPos)
.ThenBy(p => p.posDangerLevel)
.ThenBy(p => p.posDangerCount)
.ThenBy(p => p.hasExtraDistance)
.ThenBy(p => p.distanceToMouse);
foreach (var posInfo in sortedPosTable)
{
if (CheckPathCollision(myHero, posInfo.position) == false)
{
if (PositionInfoStillValid(posInfo, spell.speed))
{
return posInfo;
}
}
}
return null;
}
开发者ID:CONANLXF,项目名称:AIO,代码行数:73,代码来源:EvadeHelper.cs
示例19: GetBestPositionTargetedDash
public static PositionInfo GetBestPositionTargetedDash(EvadeSpellData spell)
{
/*if (spell.spellDelay > 0)
{
if (CheckWindupTime(spell.spellDelay))
{
return null;
}
}*/
var extraDelayBuffer = ObjectCache.menuCache.cache["ExtraPingBuffer"].Cast<Slider>().CurrentValue;
//var extraEvadeDistance = 100;// Evade.menu.SubMenu("MiscSettings").SubMenu("ExtraBuffers").Item("ExtraEvadeDistance").GetValue<Slider>().Value;
var extraDist = ObjectCache.menuCache.cache["ExtraCPADistance"].Cast<Slider>().CurrentValue;
Vector2 heroPoint = ObjectCache.myHeroCache.serverPos2DPing;
Vector2 lastMovePos = Game.CursorPos.To2D();
List<PositionInfo> posTable = new List<PositionInfo>();
List<int> spellList = SpellDetector.GetSpellList();
int minDistance = 50; //Math.Min(spell.range, minDistance)
int maxDistance = int.MaxValue;
if (spell.fixedRange)
{
minDistance = maxDistance = (int)spell.range;
}
List<Obj_AI_Base> collisionCandidates = new List<Obj_AI_Base>();
if (spell.spellTargets.Contains(SpellTargets.Targetables))
{
foreach (var obj in ObjectManager.Get<Obj_AI_Base>()
.Where(h => !h.IsMe && h.IsValidTarget(spell.range, false)))
{
if (obj.GetType() == typeof(Obj_AI_Turret) && ((Obj_AI_Turret)obj).IsValid())
{
collisionCandidates.Add(obj);
}
}
}
else
{
List<AIHeroClient> heroList = new List<AIHeroClient>();
if (spell.spellTargets.Contains(SpellTargets.EnemyChampions)
&& spell.spellTargets.Contains(SpellTargets.AllyChampions))
{
heroList = EntityManager.Heroes.AllHeroes;
}
else if (spell.spellTargets.Contains(SpellTargets.EnemyChampions))
{
heroList = EntityManager.Heroes.Enemies;
}
else if (spell.spellTargets.Contains(SpellTargets.AllyChampions))
{
heroList = EntityManager.Heroes.Allies;
}
foreach (var hero in heroList.Where(h => !h.IsMe && h.IsValidTarget(spell.range)))
{
collisionCandidates.Add(hero);
}
List<Obj_AI_Minion> minionList = new List<Obj_AI_Minion>();
if (spell.spellTargets.Contains(SpellTargets.EnemyMinions)
&& spell.spellTargets.Contains(SpellTargets.AllyMinions))
{
minionList = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Both, Player.Instance.ServerPosition, spell.range).ToList();
}
else if (spell.spellTargets.Contains(SpellTargets.EnemyMinions))
{
minionList = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Player.Instance.ServerPosition, spell.range).ToList();
}
else if (spell.spellTargets.Contains(SpellTargets.AllyMinions))
{
minionList = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Ally, Player.Instance.ServerPosition, spell.range).ToList();
}
foreach (var minion in minionList.Where(h => h.IsValidTarget(spell.range)))
{
collisionCandidates.Add(minion);
}
}
foreach (var candidate in collisionCandidates)
{
var pos = candidate.ServerPosition.To2D();
PositionInfo posInfo;
if (spell.spellName == "YasuoDashWrapper")
{
bool hasDashBuff = false;
foreach (var buff in candidate.Buffs)
{
if (buff.Name == "YasuoDashWrapper")
{
//.........这里部分代码省略.........
开发者ID:CONANLXF,项目名称:AIO,代码行数:101,代码来源:EvadeHelper.cs
示例20: GetSpellDangerLevel
public static int GetSpellDangerLevel(EvadeSpellData spell)
{
var dangerStr = ObjectCache.menuCache.cache[spell.name + "EvadeSpellDangerLevel"].GetValue<StringList>().SelectedValue;
var dangerlevel = 1;
switch (dangerStr)
{
case "Low":
dangerlevel = 1;
break;
case "High":
dangerlevel = 3;
break;
case "Extreme":
dangerlevel = 4;
break;
default:
dangerlevel = 2;
break;
}
return dangerlevel;
}
开发者ID:aikoy,项目名称:ezEvade,代码行数:24,代码来源:EvadeSpell.cs
注:本文中的ezEvade.EvadeSpellData类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论