blacula
New Member
- Joined
- Feb 22, 2013
- Messages
- 115
- Reaction score
- 0
Have been working on this bit of code:
Have tried several different ways of doing this, but I cannot make it stop spamming sprint during combat. Sprint is totally useless for combat now, and all it does is uselessly waste fury. So I am trying to get it to use sprint for movement only and nothing else.
Code:
public static bool CanUseSprint
{
get
{
return !UseOOCBuff && CanCast(SNOPower.Barbarian_Sprint, CanCastFlags.NoTimer) && !Player.IsIncapacitated &&
(
// last power used was whirlwind and we don't have sprint up
(LastPowerUsed == SNOPower.Barbarian_Whirlwind && !GetHasBuff(SNOPower.Barbarian_Sprint)) ||
// Fury Dump Options for sprint: use at max energy constantly
(Settings.Combat.Barbarian.FuryDumpWOTB && Player.PrimaryResourcePct >= V.F("Barbarian.WOTB.FuryDumpMin") && GetHasBuff(SNOPower.Barbarian_WrathOfTheBerserker)) ||
(Settings.Combat.Barbarian.FuryDumpAlways && Player.PrimaryResourcePct >= V.F("Barbarian.WOTB.FuryDumpMin")) ||
// or on a timer
(
(SNOPowerUseTimer(SNOPower.Barbarian_Sprint) && !GetHasBuff(SNOPower.Barbarian_Sprint)) &&
// Always keep up if we are whirlwinding, if the target is a goblin, or if we are more than 16 feet away from the target
(Hotbar.Contains(SNOPower.Barbarian_Whirlwind) || CurrentTarget.IsTreasureGoblin ||
(CurrentTarget.CentreDistance >= V.F("Barbarian.Sprint.SingleTargetRange") && Player.PrimaryResource >= V.F("Barbarian.Sprint.SingleTargetMinFury"))
)
)
) &&
// minimum time between uses
TimeSincePowerUse(SNOPower.Barbarian_Sprint) >= V.I("Barbarian.Sprint.MinUseDelay") &&
// If they have battle-rage, make sure it's up
(!Hotbar.Contains(SNOPower.Barbarian_BattleRage) || (Hotbar.Contains(SNOPower.Barbarian_BattleRage) && GetHasBuff(SNOPower.Barbarian_BattleRage))) &&
// Check for minimum energy
Player.PrimaryResource >= V.F("Barbarian.Sprint.MinFury");
}
}
Have tried several different ways of doing this, but I cannot make it stop spamming sprint during combat. Sprint is totally useless for combat now, and all it does is uselessly waste fury. So I am trying to get it to use sprint for movement only and nothing else.






