Mercurial > wow > kbf
comparison KBF.lua @ 28:2986c72f64ba
OOC only workaround for bug in off-hand weapon enchant
author | Chris Mellon <arkanes@gmail.com> |
---|---|
date | Tue, 28 Dec 2010 16:54:40 -0600 |
parents | 9967caf18b2a |
children | 758987dad08c |
comparison
equal
deleted
inserted
replaced
27:9967caf18b2a | 28:2986c72f64ba |
---|---|
52 HideBlizFrame(TemporaryEnchantFrame) | 52 HideBlizFrame(TemporaryEnchantFrame) |
53 | 53 |
54 end | 54 end |
55 | 55 |
56 function kbf:OnUpdate() | 56 function kbf:OnUpdate() |
57 -- little custom hax to reposition the alternate power bar | |
58 -- try really hard to remember not to commit this | |
59 if PlayerPowerBarAlt:IsShown() then | |
60 PlayerPowerBarAlt:ClearAllPoints() | |
61 PlayerPowerBarAlt:SetPoint("BOTTOM", UIParent, "BOTTOM", 0, 233) | |
62 end | |
63 | |
57 if self.pollForUnitChange and not InCombatLockdown() then | 64 if self.pollForUnitChange and not InCombatLockdown() then |
58 if UnitHasVehicleUI("player") then | 65 if UnitHasVehicleUI("player") then |
59 -- only swap if we're in a "real" vehicle with its own actions | 66 -- only swap if we're in a "real" vehicle with its own actions |
60 -- There is possibly a timing issue here where | 67 -- There is possibly a timing issue here where |
61 -- we have set the poll flag but the unit is not | 68 -- we have set the poll flag but the unit is not |
81 if ( GameTooltip:IsOwned(frame) ) then | 88 if ( GameTooltip:IsOwned(frame) ) then |
82 self:OnEnter(frame) | 89 self:OnEnter(frame) |
83 end | 90 end |
84 end | 91 end |
85 -- temporary enchants | 92 -- temporary enchants |
86 -- TODO: The blizz secure aura header binds both temp enchants | |
87 -- to the main hand. No support for cancelling weapon enchants | |
88 -- until this gets fixed up | |
89 local tempEnchant = self.secureFrame:GetAttribute("tempEnchant1") | 93 local tempEnchant = self.secureFrame:GetAttribute("tempEnchant1") |
90 if tempEnchant and tempEnchant:IsShown() then | 94 if tempEnchant and tempEnchant:IsShown() then |
91 if self.dirty or true then | 95 if self.dirty or true then |
92 self:BindBarToWeaponEnchant(tempEnchant, 16) | 96 self:BindBarToWeaponEnchant(tempEnchant, 16) |
93 end | 97 end |
99 if self.dirty or true then | 103 if self.dirty or true then |
100 self:BindBarToWeaponEnchant(tempEnchant, 17) | 104 self:BindBarToWeaponEnchant(tempEnchant, 17) |
101 end | 105 end |
102 self:UpdateBarExpirationTime(tempEnchant) | 106 self:UpdateBarExpirationTime(tempEnchant) |
103 buffCount = buffCount + 1 | 107 buffCount = buffCount + 1 |
108 -- SAH binds the offhand enchant to the main hand for removal purposes. | |
109 -- fix it up if we're out of combat | |
110 -- TODO: maybe this should only happen if we're dirty | |
111 if not InCombatLockdown() then | |
112 tempEnchant:SetAttribute('target-slot', 17) | |
113 end | |
104 end | 114 end |
105 -- there's also a third temp enchant for thrown weapons, which the | 115 -- there's also a third temp enchant for thrown weapons, which the |
106 -- current SAH doesn't support at all. | 116 -- current SAH doesn't support at all. |
107 -- Since I can't insert bars into the flow, can't support this | 117 -- Since I can't insert bars into the flow, can't support this |
108 -- until I either go to multiple secure headers & figure out how to position them | 118 -- until I either go to multiple secure headers & figure out how to position them |