Add support for post June 18, 2014 Hundred Hands effects

Set Spells:Jun182014HundredHandsRevamp to true if your spell file is newer
This commit is contained in:
Michael Cook (mackal)
2014-09-28 13:27:38 -04:00
parent 3be7d45d36
commit 66c171b61b
5 changed files with 22 additions and 7 deletions
+5 -2
View File
@@ -9035,7 +9035,7 @@ void Bot::SetAttackTimer() {
}
}
int hhe = std::max(itembonuses.HundredHands + spellbonuses.HundredHands, -99);
int hhe = itembonuses.HundredHands + spellbonuses.HundredHands;
int speed = 0;
int delay = 36;
@@ -9049,7 +9049,10 @@ void Bot::SetAttackTimer() {
//we have a weapon, use its delay
delay = ItemToUse->Delay;
}
speed = static_cast<int>(((delay / haste_mod) + ((hhe / 100.0f) * delay)) * 100);
if (RuleB(Spells, Jun182014HundredHandsRevamp))
speed = static_cast<int>(((delay / haste_mod) + ((hhe / 1000.0f) * (delay / haste_mod))) * 100);
else
speed = static_cast<int>(((delay / haste_mod) + ((hhe / 100.0f) * delay)) * 100);
TimerToUse->SetAtTrigger(std::max(RuleI(Combat, MinHastedDelay), speed), true);
if(i == MainPrimary)