changeset 3:1c0f88ab78b7

Fixed class detection.
author tercio
date Sun, 01 Jun 2014 22:52:51 -0300
parents f2456f1454af
children 16590718738a
files PVPScan.lua
diffstat 1 files changed, 2 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/PVPScan.lua	Sun Jun 01 03:48:11 2014 -0300
+++ b/PVPScan.lua	Sun Jun 01 22:52:51 2014 -0300
@@ -1,6 +1,7 @@
 
 PVPScan = LibStub ("AceAddon-3.0"):NewAddon ("PVPScan", "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0")
 
+local PVPScan = PVPScan
 local LDB = LibStub ("LibDataBroker-1.1", true)
 local LDBIcon = LDB and LibStub ("LibDBIcon-1.0", true)
 local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
@@ -290,15 +291,6 @@
 			return
 		end
 		
-		if (PVPScan.NeedClass [target_name]) then
-			local class = PVPScan:GuessClass (...)
-			if (class) then
-				PVPScan:UpdateBar (PVPScan.SpotBars [PVPScan.CurrentShownPlayers [target_name]], target_name, class, true)
-				PVPScan.NeedClass [target_name] = nil
-			end
-			return
-		end
-		
 		if (not PVPScan.CurrentShownPlayers [target_name] and _bit_band (target_flags, OBJECT_TYPE_PLAYER) ~= 0) then --> is player
 			if (_bit_band (target_flags, REACTION_HOSTILE) ~= 0) then --> is hostile
 				local class = PVPScan:GuessClass (...)
@@ -641,9 +633,7 @@
 		local arg1, arg2, arg3, arg4 = select (1, ...)
 		
 		if (type (arg1) == "number") then
-			if (PVPScan.ClassSpellList [arg1]) then
-				return PVPScan.ClassSpellList [arg1]
-			end
+			return PVPScan.ClassSpellList [arg1]
 		end
 
 		return nil