ArcHUD3

ArcHUD3

594k Downloads

powerTypes are now under the Enum.PowerType

mihai-adrian-iordache opened this issue · 2 comments

commented

HI,

Just found out that powerTypes are no longer global constants they are now under the global table Enum.PowerType. You can enum the table itself to get they key, val pairs. They keys correspond to the written power types(LunarPower, Mana, Maelstrom, Insanity, etc) and the values to their numerical value.

For example for me i was checking against lunar power maelstrom and insanity which would be:

Enum.PowerType.LunarPower for SPELL_POWER_LUNAR_POWER
Enum.PowerType.Maelstrom for SPELL_POWER_MAELSTROM
Enum.PowerType.Insanity for SPELL_POWER_INSANITY

This is kinda tedious work but i think the SPELL_POWER_* need to be changed to their enum counterparts all over the place. I suddenly remember what blizz was saying about their spaghetti code, and appreciate the work it goes into it better, lool.

Cheers,
Garrett

commented

Hi Chicken, this info was exactly what I was looking for to get Combo points working again! Thankyou! I really have never used git hub before so not sure how to properly add a change suggestion and I just barely have coding knowledge at all lol but Ill share what I did to get rogue combo points working.

Firstly, Anticipation has been removed and Deeper Stratagem added for a new max of 6 combo points (this may be different for Subtlety I haven’t checked all specs yet) and changed in ArcHUD3\Rings\ComboPoints.lua at lines 67 to 76

_function module:UpdateComboPointsMax()
	local maxComboPoints = UnitPowerMax(self.unit, Enum.PowerType.ComboPoints)
	self.f:SetMax(maxComboPoints)
	
	if (maxComboPoints == 5) then
		self.maxUsablePoints = 5;
	elseif (maxComboPoints == 6) then
		self.maxUsablePoints = 6;
	end
end_

And changing lines 68 and 82 from

local comboPoints = UnitPower(self.unit, SPELL_POWER_COMBO_POINTS);
to

local comboPoints = UnitPower(self.unit, Enum.PowerType.ComboPoints);

and changing line 80 from
if (powerType == SPELL_POWER_ENERGY) then
to
if (powerType == Enum.PowerType.Energy) then

Simillar Changes to the Combo points file in the root directory: ArcHUD3\ComboPoints.lua

at line 72
if (powerType == SPELL_POWER_ENERGY) then
to
if (powerType == Enum.PowerType.Energy) then

and at line 73:
points = UnitPower("player", SPELL_POWER_COMBO_POINTS);
to
points = UnitPower("player", Enum.PowerType.ComboPoints);

Hope this helps, love this addon. Other changes needed are that combo points are no longer tied to a target ( I think this has been the case for a while now) Therefore there are some settings not needed e.g. target switching and delay of decay as they are tied to player. I will have a look at changing this tommorow after work!

commented

already fixed on branch wow8, building new release