Hack Into AGUF: Big Buff Feature (Updated for 3.1)

I updated this article for WoW 3.1, AGUF r700 release.

Before: before

After: after

Recently I stop using Xperl instead of ag_unitframes, which is absolutly wonderful and nice-looking.

But there is one thing that I love about Xperl and ag_unitframes couldnot satisfied my need: Big Buff Feature.

Xperl can display the debuff that you cast in twice size, so I could easily manage my debuffs.

I know there are so many Uis for this for instance, I use dotimer for my other needs. But I still want this feature.

I went through the internet and found no solutions. But I did notice that there are people like me who wants this feature.

So I decide to do it myself.

Here are my steps:

File:ag_UnitFrames\modules\auras\auras.lua

1.add a function GetAuraScale()

--add GetAuraScale
function plugin.GetAuraScale(self, frame)
--error('test getaura scale')
	local position, rows, columns, scale
	
	if frame and frame == self.debuffFrame then
		position = plugin.db.profile.units[self.type].DebuffPos
		rows = plugin.db.profile.units[self.type].DebuffRows
		columns = plugin.db.profile.units[self.type].DebuffColumns	
	else
		position = plugin.db.profile.units[self.type].AuraPos
		rows = plugin.db.profile.units[self.type].AuraRows
		columns = plugin.db.profile.units[self.type].AuraColumns
	end
	local count = rows * columns
	if frame.growAs then
		position = frame.growAs
	end

if position == “Below” or position == “Above” then
if frame.autoScale then
local offset = type(frame.autoScale) == “number” and frame.autoScale or 0
scale = (self.frame:GetWidth() + offset)/(16*columns+(columns-1)*2)
end
elseif position == “Left” or position == “Right” then
if frame.autoScale then
local offset = type(frame.autoScale) == “number” and frame.autoScale or 0
scale = (self.frame:GetHeight() + offset)/(16*rows+(rows-1)*2)
end
end
if frame.auraScale then
scale = frame.auraScale
end
if not scale or scale <= 0 then
scale = 1
end
return scale
end
–end here 2.modity function UpdateAuraFrame()

a.find:

plugin.SetAura(self, frame["Aura" .. i], false, id, icon, count, nil, expirationTime, duration)
modify to:
local scale = plugin.GetAuraScale(self, frame)
plugin.SetAura(self, frame["Aura" .. i], false, id, icon, count, nil, expirationTime, duration, scale)
b.find:
plugin.SetAura(self, frame["Aura" .. index], true, id, icon, count, debuffType, expirationTime, duration)
modify to:
local aura_name, aura_rank, aura_icon, aura_count, aura_debuffType,aura_duration, aura_expirationTime, aura_isMine, aura_isStealable =UnitAura(self.type, i,"HARMFUL")
local scale = plugin.GetAuraScale(self, frame)
if self.type == "target" and aura_isMine=="player" then
	scale = scale * 2;
end
plugin.SetAura(self, frame["Aura" .. index], true, id, icon, count, debuffType, expirationTime, duration, scale)
3.modity function SetAura()

a.find:

function plugin.SetAura(self, buffFrame, isDebuff, id, buff, count, class, expirationTime, duration)
modify to:
function plugin.SetAura(self, buffFrame, isDebuff, id, buff, count, class, expirationTime, duration, scale)
b.add these line at the begining of this function:
--start 就放大兩倍
if scale then
	buffFrame:SetScale(scale)
end
--end 
附上我修改過的檔案,請備份原檔案後再試驗唷。下載

Comments