Quantcast

Fixed some codes in talent specific rotation

Taracque [08-31-12 - 14:20]
Fixed some codes in talent specific rotation
Filename
DKCrutch.lua
diff --git a/DKCrutch.lua b/DKCrutch.lua
index ce8f8d2..491c437 100644
--- a/DKCrutch.lua
+++ b/DKCrutch.lua
@@ -524,14 +524,14 @@ function DKCrutch:AdviseBloodAbility()
 	-- Blood Tap if have at least 5 charges, and at least on fully depleted rune
 	if (DKCrutch.SpellList["Blood Tap"]) then
 		local name,_,_,count = DKCrutch:hasBuff("player", DKCrutch.SpellList["Blood Charge"])
-		if (count>5) and (DKCrutch.depletedCount>0) then
-			return "Blood Charge"
+		if (count) and (count>=5) and (DKCrutch.depletedCount>0) then
+			return "Blood Tap"
 		end
 	end

 	-- Plague Leech if Outbreak available, and have on fully depleted rune
 	if (DKCrutch.SpellList["Plague Leech"]) then
-		if (obcd) and (obcd<=0) and (IsSpellInRange(DKCrutch.SpellList["Outbreak"], "target") == 1) then
+		if (obcd) and (obcd<=0) and (IsSpellInRange(DKCrutch.SpellList["Outbreak"], "target") == 1) and (DKCrutch.depletedCount>0) then
 			if (DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Plague Leech"]) <= 1) then
 				return "Plague Leech"
 			end
@@ -611,14 +611,14 @@ function DKCrutch:AdviseFrostAbility()
 	-- Blood Tap if have at least 5 charges, and at least on fully depleted rune
 	if (DKCrutch.SpellList["Blood Tap"]) then
 		local name,_,_,count = DKCrutch:hasBuff("player", DKCrutch.SpellList["Blood Charge"])
-		if (count>5) and (DKCrutch.depletedCount>0) then
-			return "Blood Charge"
+		if (count) and (count>=5) and (DKCrutch.depletedCount>0) then
+			return "Blood Tap"
 		end
 	end

 	-- Plague Leech if Outbreak available, and have on fully depleted rune
 	if (DKCrutch.SpellList["Plague Leech"]) then
-		if (obcd) and (obcd<=0) and (IsSpellInRange(DKCrutch.SpellList["Outbreak"], "target") == 1) then
+		if (obcd) and (obcd<=0) and (IsSpellInRange(DKCrutch.SpellList["Outbreak"], "target") == 1) and (DKCrutch.depletedCount>0) then
 			if (DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Plague Leech"]) <= 1 ) then
 				return "Plague Leech"
 			end
@@ -729,14 +729,14 @@ function DKCrutch:AdviseUnholyAbility()
 	-- Blood Tap if have at least 5 charges, and at least on fully depleted rune
 	if (DKCrutch.SpellList["Blood Tap"]) then
 		local name,_,_,count = DKCrutch:hasBuff("player", DKCrutch.SpellList["Blood Charge"])
-		if (count>5) and (DKCrutch.depletedCount>0) then
-			return "Blood Charge"
+		if (count) and (count>=5) and (DKCrutch.depletedCount>0) then
+			return "Blood Tap"
 		end
 	end

 	-- Plague Leech if Outbreak available, and have on fully depleted rune
 	if (DKCrutch.SpellList["Plague Leech"]) then
-		if (obcd) and (obcd<=0) and (IsSpellInRange(DKCrutch.SpellList["Outbreak"], "target") == 1) then
+		if (obcd) and (obcd<=0) and (IsSpellInRange(DKCrutch.SpellList["Outbreak"], "target") == 1) and (DKCrutch.depletedCount>0) then
 			if (DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Plague Leech"]) <= 1) then
 				return "Plague Leech"
 			end