herotc / hero-lib

WoW Addon - Core Library used by HeroRotation and AethysTools, can also be used by others 3rd-Party Addons.
European Union Public License 1.2
44 stars 35 forks source link

[Demonology] SoulShards() sometimes returns a decimal #30

Closed Zeldern closed 5 years ago

Zeldern commented 5 years ago

Sometimes demonology returns a decimal number e.g. 1.1 or 2.1 for shards which effects the next spell shown in the rotation.

I noticed that within the wow interface files specifically ShardBar.lua they have the following where they use math.floor to ensure soulshards are not decimal for both demonology and affliction. Shouldn't we also be using this for our soulshards function?


local shardPower = WarlockPowerBar_UnitPower(self:GetUnit());

-- Bug ID: 496542: Destruction is supposed to show partial soulshards, but Affliction and Demonology should only show full ones.
if GetSpecialization() ~= SPEC_WARLOCK_DESTRUCTION then
    shardPower = math.floor(shardPower);
end```
Cilraaz commented 5 years ago

Added flooring of shard count to the SoulShardsP override function for Demonology Warlocks within Hero Rotation. Commit: https://github.com/herotc/hero-rotation/commit/58e32d671332b346941b031acee917d9d3af5a15