Going to repost this here, since it's more appropriate...
---
Update again!
Code:
// Rend spam
if(!bBuffsOnly && hashPowerHotbarAbilities.Contains(SNOPower.Barbarian_Rend))
{
//Logging.Write("!Buffs and has ability...");
if(iAnythingWithinRange[RANGE_7] > 0 || targetCurrent.fRadiusDistance <= 9f)
{
//Logging.Write("Range and target count...");
if(GilesUseTimer(SNOPower.Barbarian_Rend) ||
(iAnythingWithinRange[RANGE_7] > iWithinRangeLastRend && DateTime.Now.Subtract(dictAbilityLastUse[SNOPower.Barbarian_Rend]).TotalMilliseconds >= 250) ||
(targetCurrent.iThisACDGUID != iACDGUIDLastRend && DateTime.Now.Subtract(dictAbilityLastUse[SNOPower.Barbarian_Rend]).TotalMilliseconds >= 250))
{
Logging.Write("*** Timers ***");
if(playerStatus.dCurrentEnergy >= 20)
{
Logging.Write("****** Using Rend ******");
iWithinRangeLastRend = iAnythingWithinRange[RANGE_7];
iACDGUIDLastRend = targetCurrent.iThisACDGUID;
return new GilesPower(SNOPower.Barbarian_Rend, 0f, playerStatus.vCurrentPosition, iCurrentWorldID, -1, USE_COMBAT_ONLY, USE_SLOWLY);
}
}
}
}
After watching my Logging function calls spam the DB window, I realized the first two checks aren't necessary to report. They work fine (and spam like crazy when something is in range). I had to disable them.
As for the second-to-last ("*** Timers ***") and last nested if statement ("*** Using Rend ***"), if the second-to-last one passes, the last one always passes right behind it. So no problems there.
Here are my logs from Az kill:
[09:56:29.440 N] *** Timers ***
[09:56:31.182 N] ****** Using Rend ******
[09:56:32.292 N] *** Timers ***
[09:56:33.498 N] ****** Using Rend ******
[09:56:34.623 N] *** Timers ***
[09:56:34.623 N] ****** Using Rend ******
[09:56:35.767 N] *** Timers ***
[09:56:35.767 N] ****** Using Rend ******
[09:56:36.907 N] *** Timers ***
[09:56:36.907 N] ****** Using Rend ******
That repeats until the fight ends. However, he only ACTUALLY casted Rend twice, once at the start and very end.
I think I have found the problem. He's not actually USING Rend during those times, he's using Frenzy (or potentially Charge/Leap). At this point, I'm 99% certain the problem lies with the fact that abilities are chosen every 'tick', but when Frenzy is chosen, Rend still passes the check but won't actually be used (because of the Global Cooldown on abilties). Either that or it's the low default timers of Bash/Frenzy/Cleave conflicting with Rend's usage, although it could just be a priority problem.
Phew, this has been driving me crazy, hopefully we can figure out a fix. It can't be as simple as giving Rend higher priority over Frenzy (to an extent) can it, but making sure Rend isn't spamming TOO much, to avoid Frenzy never being used?
I bet that might work.
-Sym
p.s. Maybe when Rend is supposed to be used, a timer/bool is triggered that prevents any just about any other ability from happening for 0.5-1s or something?
p.p.s. The goal here would be to not have Rend spam unnecessarily (which most of your checks are accurate/correct). However, the "full fury" and "a lot of fury" checks are redundant would only cause problems if the priority issue was fixed. So default Rend time on a single target/same count targets should be 4-5s, others can be low, like the "new mobs in range" and "target switch" checks.
p.p.p.s. This all might be covered in the new version, if so ignore.
Please let me know if you want some assistance coding. I have no problem hoping on Skype or something and fiddling around.
---
Cleaner Rend Spam section (removing redundancies, making it easier to read, and prioritizing main if checks):
Code:
// Rend spam
if(!bBuffsOnly && hashPowerHotbarAbilities.Contains(SNOPower.Barbarian_Rend) && playerStatus.dCurrentEnergy >= 20)
{
if(!bWaitingForSpecial || playerStatus.dCurrentEnergy >= 75)
{
if(iAnythingWithinRange[RANGE_7] > 0 || targetCurrent.fRadiusDistance <= 9f)
{
if(GilesUseTimer(SNOPower.Barbarian_Rend) ||
(iAnythingWithinRange[RANGE_7] > iWithinRangeLastRend && DateTime.Now.Subtract(dictAbilityLastUse[SNOPower.Barbarian_Rend]).TotalMilliseconds >= 250) ||
(targetCurrent.iThisACDGUID != iACDGUIDLastRend && DateTime.Now.Subtract(dictAbilityLastUse[SNOPower.Barbarian_Rend]).TotalMilliseconds >= 250))
{
//Logging.Write("****** Attempting to Rend ******");
iWithinRangeLastRend = iAnythingWithinRange[RANGE_7];
iACDGUIDLastRend = targetCurrent.iThisACDGUID;
return new GilesPower(SNOPower.Barbarian_Rend, 0f, playerStatus.vCurrentPosition, iCurrentWorldID, -1, USE_COMBAT_ONLY, USE_SLOWLY);
}
}
}
}