Maelstrom Weapon Plugin for oUF
Hey there oUF users, developers, authors, ...
I'm working on a oUF layout myself and was looking for a way to include Maelstrom weapon stacks into my player frame whenever I play an enhancement shaman. Is there something like this allready out? Can someone point me into the right direction? Huge thanks in advance! |
You can do this with a Tag.
Code:
local MAELSTROM_WEAPON = GetSpellInfo(53817) You can check for player's class in your layout to only "activate" it for shamans. Code:
local _, playerClass = UnitClass('player') |
Thanks for the reply. I saw that Phanx is using the same Maelstrom tag in his oUF layout. Although I didn't run his layout I believe the Maelstrom stacks are displayed as numbers, right?
I'm no hero with lua yet but you use tags to display something in text, correct? Perhaps I wasn't precise enough in my first post, but I'm actually aiming to generate a Maelstrom bar instead of a number. I'm able to create an extra bar on my player frame when the class = shaman and show 5 "stacks" on it. Now I just need to figure out a way to make the bar work. I based my code on the Holy Power and made 5 points instead of 3. So, do I still need to introduce that tag, or do I need to create some function? Really appreciate your reply. |
You need a call to update the bar. Just take a look at the update function for the holy power element and adapt the code to get the stack count. Suitable locations for the update are your PostUpdate function for Buffs or CustomFilter if you use it.
|
This is what I have so far. If someone can push me a bit closer into the direction, I would be very happy. Btw, the first bar is my totembar, the lowest bar should be the maelstrom bar. Not sure if this is needed but I added it to my tags.lua file anyway Code:
local MAELSTROM_WEAPON = GetSpellInfo(53817) Code:
lib.genMaelstrom = function(self) Code:
UpdateMaelstrom = function(self, event, unit, unitBuff) So any idea's? |
No time to look at the code, just want to say that you don't need the tag at all if you want to display the stacks with a bar. Except you want a bar and the stack count as a number, at once. Which would be pretty much overkill, imho.
|
Okay, I'm throwing out the tag. Thanks for the fast reply!
|
The 4th return of UnitBuff is the stack count, the first is the name of the buff. In your code num is the name, which is wrong.
What you still miss is the call to UpdateMaelstrom. Apart from that I don't know where you got MAELSTROM_WEAPON from, it returns nil for me. Use GetSpellInfo(53817) instead. |
He had set
Code:
local MAELSTROM_WEAPON = GetSpellInfo(53817) |
All times are GMT -6. The time now is 05:03 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI