added TargetBuffSteable function
Sidoine De Wispelaere [12-22-10 - 10:46]
added TargetBuffSteable function
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@341 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/Condition.lua b/Condition.lua
index 98932fa..9dd4b3d 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -689,9 +689,22 @@ Ovale.conditions=
end
return compare(Ovale.pointsTalent[condition[1]], condition[2], condition[3])
end,
- TargetDispellableBuffPresent = function(condition)
-
- return nil
+ TargetBuffStealable = function(condition)
+ local i = 1
+ local stealable = false
+ local target = getTarget(condition.target)
+ while true do
+ local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = UnitBuff(target, i)
+ if not name then
+ break
+ end
+ if isStealable then
+ stealable = true
+ break
+ end
+ i = i + 1
+ end
+ return testbool(stealable, condition[1])
end,
-- Test if a buff is present on the target
-- 1 : buff spell id
diff --git a/defaut/Druide.lua b/defaut/Druide.lua
index 882184f..bf622da 100644
--- a/defaut/Druide.lua
+++ b/defaut/Druide.lua
@@ -94,7 +94,7 @@ AddIcon help=main mastery=1
if Speed(more 0)
{
if BuffPresent(SHOOTINGSTARS) Spell(STARSURGE)
- if TargetDebuffExpires(INSECTSWARM 10 mine=1) and TargetDeadIn(more 6)
+ if TargetDebuffExpires(INSECTSWARM 4 mine=1) and TargetDeadIn(more 6)
Spell(INSECTSWARM)
if BuffPresent(ECLIPSESOLAR)
Spell(SUNFIRE)