Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if InitialSetupDone == false then
- -- Without this, the default power bar will display Mana instead of Maelstrom in Ghost Wolf
- oldUnitPower = UnitPower
- UnitPower = (function(unitId, powerType, luaOrigin)
- if luaOrigin and luaOrigin == "power.lua" then
- local currentSpec = GetSpecialization()
- if currentSpec ~= nil then
- local specId = GetSpecializationInfo(currentSpec)
- if specId == 262 or specId == 263 then -- Elemental or Enhancement
- return oldUnitPower(unitId, SPELL_POWER_MAELSTROM)
- end
- end
- end
- return oldUnitPower(unitId, powerType)
- end)
- oldUnitPowerMax = UnitPowerMax
- UnitPowerMax = (function(unitId, powerType, luaOrigin)
- if luaOrigin and luaOrigin == "power.lua" then
- local currentSpec = GetSpecialization()
- if currentSpec ~= nil then
- local specId = GetSpecializationInfo(currentSpec)
- if specId == 262 or specId == 263 then -- Elemental or Enhancement
- return oldUnitPowerMax(unitId, SPELL_POWER_MAELSTROM)
- end
- end
- end
- return oldUnitPowerMax(unitId, powerType)
- end)
- -- Without this, using Ghost Wolf will disable the alternate power bar
- oldUnitPowerType = UnitPowerType
- UnitPowerType = (function(...)
- local currentSpec = GetSpecialization()
- if currentSpec ~= nil then
- local specId = GetSpecializationInfo(currentSpec)
- if specId == 262 or specId == 263 then -- Elemental or Enhancement
- return SPELL_POWER_MAELSTROM, "MAELSTROM"
- end
- end
- return oldUnitPowerType(...)
- end)
- InitialSetupDone = true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement