本文整理汇总了C#中ezEvade.EvadeSpellData类的典型用法代码示例。如果您正苦于以下问题:C# EvadeSpellData类的具体用法?C# EvadeSpellData怎么用?C# EvadeSpellData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EvadeSpellData类属于ezEvade命名空间,在下文中一共展示了EvadeSpellData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例4: LoadSpecialSpell
public static void LoadSpecialSpell(EvadeSpellData spellData)
{
if (spellData.spellName == "EkkoEAttack")
{
spellData.useSpellFunc = UseEkkoE2;
}
if (spellData.spellName == "EkkoR")
{
spellData.useSpellFunc = UseEkkoR;
}
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
}
示例12: GetDefaultSpellMode
public static int GetDefaultSpellMode(EvadeSpellData spell)
{
return 0;
}
示例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 =
//.........这里部分代码省略.........
示例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;
}
示例15: GetDefaultSpellMode
public static int GetDefaultSpellMode(EvadeSpellData spell)
{
if (spell.dangerlevel > 3)
{
return 0;
}
return 1;
}