Quantcast

v7.1.4.3 - Count set bonus

Pawel [02-04-17 - 08:03]
v7.1.4.3 - Count set bonus
Filename
MaxDps.toc
helper.lua
diff --git a/MaxDps.toc b/MaxDps.toc
index c17e823..0985270 100644
--- a/MaxDps.toc
+++ b/MaxDps.toc
@@ -1,6 +1,6 @@
 ## Title: MaxDps
 ## Notes: Rotation helper framework.
-## Version: 7.1.4.2
+## Version: 7.1.4.3
 ## Author: Kaminaris
 ## Interface: 70100
 ## SavedVariables: MaxDpsOptions
diff --git a/helper.lua b/helper.lua
index 1637b57..d57db4f 100644
--- a/helper.lua
+++ b/helper.lua
@@ -197,6 +197,16 @@ function MaxDps:ExtractTooltip(spell, pattern)
 	return 0;
 end

+function MaxDps:SetBonus(items)
+	local c = 0;
+	for _, item in ipairs(items) do
+		if IsEquippedItem(item) then
+			c = c + 1;
+		end
+	end
+	return c;
+end
+
 function MaxDps:Cooldown(spell, timeShift)
 	local start, duration, enabled = GetSpellCooldown(spell);
 	if enabled and duration == 0 and start == 0 then