Jaliborc / PetTracker

Tracks pets, alerts for upgrades and helps you in pet battles.
44 stars 24 forks source link

addons/battle/battle.lua: abilities on lockdown are shown as active #371

Open bloerwald opened 8 months ago

bloerwald commented 8 months ago

Which software were you running?

Please describe the bug. The ability icons in battle do not correctly reflect an ability on lockdown (not cooldown).

Please describe how to reproduce it.

  1. Use pet with Nevermore.
  2. Fight a pet that's slower than yours and use Nevermore.
  3. The ability the enemy uses this turn will be put on a 5 round lockdown.
  4. See enabled icon while it should be disabled.

Any Screenshots? image image

The second ability is not usable and should thus be disabled with a 4 round lockdown.

Fix?
In Battle:GetAbility(i), check the third return value of self:GetAbilityState(i) which is lockdown, treat it like cooldown. The scripts addon just takes max(cooldown, lockdown).