Quantcast
WoWInterface - View Single Post - script/macro player buffs grow right
View Single Post
03-19-20, 06:39 AM   #5
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 264
I have used this technique to move my debuffs over my buffs (which I moved to the bottom of the screen). You could use this as a template for moving them in whatever manner you desired but you will have to do the work to reverse their display order based on the index.
Code:
hooksecurefunc("AuraButton_Update", function(buttonName, index, filter)
	local buffName = buttonName .. index
	if "DebuffButton1" == buffName then
		local buff = _G[buffName]
		if nil ~= buff and not buff.moved then
			hooksecurefunc(buff, "SetPoint", function(self, point, relativeFrame, relativePoint, offsetX, offsetY)
				if relativeFrame ~= BuffFrame or relativePoint ~= "TOP" or offsetX ~= 10 then
					self:ClearAllPoints()
					self:SetPoint("BOTTOM", BuffFrame, "TOP", 10, 24)
				end
			end)
			buff.moved = true
		end
	end
	if "BuffButton1" == buffName then
		local buff = _G[buffName]
		if nil ~= buff and not buff.moved then
			hooksecurefunc(buff, "SetPoint", function(self, point, relativeFrame, relativePoint, offsetX, offsetY)
				if relativeFrame ~= WorldFrame or relativePoint ~= "BOTTOMRIGHT" or offsetX ~= -290 then
					self:ClearAllPoints()
					self:SetPoint("TOPRIGHT", WorldFrame, "BOTTOMRIGHT", -290, -4)
				end
			end)
			buff.moved = true
		end
	end
end)
  Reply With Quote