- Aura handling cleanup. Duplication is evil!

This commit is contained in:
rokiyo
2010-10-30 04:21:00 +00:00
parent 9599ed33cd
commit b9feaae590
2 changed files with 375 additions and 487 deletions

View File

@ -179,12 +179,14 @@ function PlayerInfo.prototype:UpdateBuffs(unit, fromRepeated)
end end
if not self.frame.buffFrame.buffs[startingNum]:IsVisible() or self.frame.buffFrame.buffs[startingNum].type ~= "mh" then if not self.frame.buffFrame.buffs[startingNum]:IsVisible() or self.frame.buffFrame.buffs[startingNum].type ~= "mh" then
self:SetUpBuff(startingNum, self:SetupAura("buff",
startingNum,
GetInventoryItemTexture(self.unit, GetInventorySlotInfo("MainHandSlot")), GetInventoryItemTexture(self.unit, GetInventorySlotInfo("MainHandSlot")),
self.mainHandEnchantEndTime, self.mainHandEnchantEndTime,
CurrTime + (mainHandExpiration/1000), CurrTime + (mainHandExpiration/1000),
true, true,
mainHandCharges, mainHandCharges,
nil,
"mh") "mh")
end end
@ -199,12 +201,14 @@ function PlayerInfo.prototype:UpdateBuffs(unit, fromRepeated)
end end
if not self.frame.buffFrame.buffs[startingNum]:IsVisible() or self.frame.buffFrame.buffs[startingNum].type ~= "oh" then if not self.frame.buffFrame.buffs[startingNum]:IsVisible() or self.frame.buffFrame.buffs[startingNum].type ~= "oh" then
self:SetUpBuff(startingNum, self:SetupAura("buff",
startingNum,
GetInventoryItemTexture(self.unit, GetInventorySlotInfo("SecondaryHandSlot")), GetInventoryItemTexture(self.unit, GetInventorySlotInfo("SecondaryHandSlot")),
self.offHandEnchantEndTime, self.offHandEnchantEndTime,
CurrTime + (offHandExpiration/1000), CurrTime + (offHandExpiration/1000),
true, true,
offHandCharges, offHandCharges,
nil,
"oh") "oh")
end end
@ -217,7 +221,7 @@ function PlayerInfo.prototype:UpdateBuffs(unit, fromRepeated)
end end
end end
local direction = self.moduleSettings.buffGrowDirection == "Left" and -1 or 1 local direction = self.moduleSettings.auras["buff"].growDirection == "Left" and -1 or 1
self.frame.buffFrame.buffs = self:CreateIconFrames(self.frame.buffFrame, direction, self.frame.buffFrame.buffs, "buff") self.frame.buffFrame.buffs = self:CreateIconFrames(self.frame.buffFrame, direction, self.frame.buffFrame.buffs, "buff")
end end
end end

File diff suppressed because it is too large Load Diff