From b29fc849c0a762db332bfd5648134ef079bb240d Mon Sep 17 00:00:00 2001 From: Parnic Date: Fri, 19 Nov 2010 16:22:36 +0000 Subject: [PATCH] - fixed configuration mode error in the player info module when the player had weapon buffs applied (ticket #104) --- modules/PlayerInfo.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/PlayerInfo.lua b/modules/PlayerInfo.lua index ba1c7cb..880f9fe 100644 --- a/modules/PlayerInfo.lua +++ b/modules/PlayerInfo.lua @@ -156,10 +156,16 @@ function PlayerInfo.prototype:UpdateBuffs(unit, fromRepeated) end end + -- no acceptable space found to append weapon buffs, so don't. + -- either the player already has 40 buffs on him or he's in configuration mode + if startingNum == 0 then + return + end + if hasMainHandEnchant or hasOffHandEnchant then local CurrTime = GetTime() - if hasMainHandEnchant then + if hasMainHandEnchant and startingNum <= IceCore.BuffLimit then if self.mainHandEnchantEndTime == 0 or abs(self.mainHandEnchantEndTime - (mainHandExpiration/1000)) > CurrTime - self.mainHandEnchantTimeSet + EPSILON then self.mainHandEnchantEndTime = mainHandExpiration/1000 @@ -181,7 +187,7 @@ function PlayerInfo.prototype:UpdateBuffs(unit, fromRepeated) startingNum = startingNum + 1 end - if hasOffHandEnchant then + if hasOffHandEnchant and startingNum <= IceCore.BuffLimit then if self.offHandEnchantEndTime == 0 or abs(self.offHandEnchantEndTime - (offHandExpiration/1000)) > abs(CurrTime - self.offHandEnchantTimeSet) + EPSILON then self.offHandEnchantEndTime = offHandExpiration/1000