Quantcast

Fixed Amber Shamer converted player targeting, fixed vehicle situations.

Taracque [12-06-12 - 23:45]
Fixed Amber Shamer converted player targeting, fixed vehicle situations.
Filename
Elementarist.lua
diff --git a/Elementarist.lua b/Elementarist.lua
index 3d05748..f85584c 100755
--- a/Elementarist.lua
+++ b/Elementarist.lua
@@ -1125,11 +1125,11 @@ function Elementarist:DecideSpells()

 	local guid = UnitGUID("target")
 	local guid = UnitGUID("target")
-	if  UnitName("target") == nil or UnitIsFriend("player","target") ~= nil or UnitHealth("target") == 0 then
+	if  (UnitName("target") == nil) or (UnitCanAttack("player","target") == nil) or (UnitHealth("target") == 0) then
 		guid = nil
 	end

-	if UnitInVehicle("player") then
+	if (UnitInVehicle("player") and HasVehicleActionBar()) then
 		-- player is in a "vehicle" don't suggest spell
 		Elementarist:SetTexture(Elementarist.textureList["next"],"")
 		Elementarist:SetTexture(Elementarist.textureList["next1"],"")