blueboy / portal

This portal repo is for development purposes only
http://github.com/blueboy/portal
GNU General Public License v2.0
27 stars 24 forks source link

spell pushback causing bots to never cast? #12

Closed kennumen closed 11 years ago

kennumen commented 12 years ago

Okay, I encountered this glitch with a low level spellcasting druid (just him and me) - important: NO TANK. I let the druid get aggro (just tell it to attack and do nothing), and he somehow aggro'd a second mob. So now he's got 2 boars on him, getting him the maximum of 0.5 * 2 pushback on his spellcasting. In other words, the first two attacks during any one spell cast cause that spellcasting to be 0.5 seconds longer (per attack, up to a maximum of 1second).

So a 1.4 second (or 1.5, whatever) spellcasting for Wrath would turn into 2.4 (or 2.5) second casting. Thing is, the loop delay for NextCombatManeuver was set to 2 seconds which caused it to stop it's nearly-finished Wrath and start over. Nowhere (that I know of) does it account for the spell pushback which may make spellcasting take longer than intended. Likewise, for channeled spells (like say a priest's Mind Flay) each pushback takes off 0.5 seconds. Also unaccounted for but far less critical (at worst the bot will stand there for a second).

There also lies danger in the imprecision of the delay code, with a maximum precision of 1 second. So you can't have the bot sleep 1.6 seconds for a 1.4second casting. You can't have it wait 3.2 seconds for a 3second mind flay. You can't have it wait an additional 0.5 seconds because a pushback occured. Have been wanting to redo that system but took a quick look and was thoroughly discouraged ;)