Loading...

Simple plugin starting guidelines

#1
Hi,

I am willing to create a simple plugin that allows players to change the unitframes health color when a specified buff/debuff is up on the unit (same sort of thing that grid2 or healbot allows to do). I have decent Lua and WoW addon developpement knowledge but never really dived into ElvUI code. Where should I look first ? Where can I find documentation of the code ? Maybe there already exists such a plugin, or an obvious way to make it ?

Thanks a lot
Lyriam

Simple plugin starting guidelines

#3
Thanks for the reply ! Right after writing my post I starded digging into the code and pretty quickly stumbled upon these two files. By adding a simple piece of code I could get to where I originally wanted (i.e highlighting the group and raid frames when there's a glimmer on the unit). Making this into a working generalized plugin, that's another story ! :D But it would definitely be useful !

Thanks again

Simple plugin starting guidelines

#4
I've written a simple plugin for my needs but I have a problem: How do I overwrite the function Update in oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua ?
I simply want to add this:

Code: Select all

...
elseif IsPartyOrRaidFrame(object) and glimmerOn then
	object.DebuffHighlight:SetVertexColor(glimmerColor.r, glimmerColor.g, glimmerColor.b, glimmerColor.a)
...
What's the simplest way to do so ?
Thanks !

Simple plugin starting guidelines

#5
Ok, not sure if this helps but most oUF Plugins give you the opportunity to create your own PostUpdate function which can be called with the update function. If you look at the end of the Update function in oUF DebuffHighlight you see it's there.
What you could do is create your own function and then add that as PostUpdate in your layout.

self. Debuffhighlight.PostUpdate = MyFunction

Or check if ElvUi already has a PostUpdate function for DebuffHighlight and overwrite or hook into that.

Simple plugin starting guidelines

#6
The problem with these two solutions is that they both use the PostUpdate function, which takes in parameters a debuff supposedly already filtered. Since I want to filter the Glimmer of Light (which is a buff) the post update function will never be called. The Update function in the oUF ibrary specifies "HARMFUL" when checking for auras on the target, and I can't hook that function. Or can I ?

Who is online

Users browsing this forum: No registered users and 1 guest