check pet speed before kill command
Sidoine De Wispelaere [10-20-10 - 17:56]
check pet speed before kill command
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@315 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/Condition.lua b/Condition.lua
index 8684f28..901e9cd 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -703,7 +703,7 @@ Ovale.conditions=
end
end,
Speed = function(condition)
- return compare(GetUnitSpeed("player")*100/7, condition[1], condition[2])
+ return compare(GetUnitSpeed(getTarget(condition.target))*100/7, condition[1], condition[2])
end,
-- Test if the player is in a given stance
-- 1 : the stance
diff --git a/Ovale.toc b/Ovale.toc
index 824a67c..95a2459 100644
--- a/Ovale.toc
+++ b/Ovale.toc
@@ -3,7 +3,7 @@
## Notes: Show the icon of the next spell to cast
## Notes-frFR: Affiche l'icône du prochain sort à lancer
## Author: Sidoine
-## Version: 4.0.11
+## Version: 4.0.12
## OptionalDeps: Ace3, ButtonFacade, Recount, Skada, LibBabble-CreatureType-3.0
## SavedVariables: OvaleDB
## SavedVariablesPerCharacter: OvaleDBPC
diff --git a/OvaleCompile.lua b/OvaleCompile.lua
index 56a70e0..4fc9ead 100644
--- a/OvaleCompile.lua
+++ b/OvaleCompile.lua
@@ -90,7 +90,12 @@ local function HasTalent(talentId)
Ovale:RemplirListeTalents()
end
if Ovale.listeTalentsRemplie then
- return Ovale.pointsTalent[talentId]>0
+ if Ovale.pointsTalent[talentId]~=nil then
+ return Ovale.pointsTalent[talentId]>0
+ else
+ Ovale:Print("Unknown talent "..talentId)
+ return false
+ end
else
return false
end
diff --git a/defaut/Chasseur.lua b/defaut/Chasseur.lua
index b5a4731..f62d420 100644
--- a/defaut/Chasseur.lua
+++ b/defaut/Chasseur.lua
@@ -59,7 +59,7 @@ AddIcon help=main mastery=1
if TargetBuffPresent(FRENZYEFFECT stacks=5 target=pet) Spell(FOCUSFIRE)
if CheckBoxOn(multi) Spell(MULTISHOT)
if TargetDebuffExpires(SERPENTSTING 0 mine=1) and TargetDeadIn(more 8) Spell(SERPENTSTING)
- Spell(KILLCOMMAND)
+ if Speed(equal 0 target=pet) Spell(KILLCOMMAND)
Spell(ARCANESHOT)
Spell(STEADYSHOT)
}