diff Turok/Turok.lua @ 9:9400a0ff8540

Ugh Timer: - container update directionality - talent update iterates over a non-volatile table to carry out updates - index management steps organized - talentRow status implemented, returns the spell associated with the talent chosen from that row CombatLog: - sort out font controls and unbork arguments
author Nenue
date Sun, 21 Feb 2016 13:08:30 -0500
parents a9b8b0866ece
children
line wrap: on
line diff
--- a/Turok/Turok.lua	Sun Feb 21 08:49:34 2016 -0500
+++ b/Turok/Turok.lua	Sun Feb 21 13:08:30 2016 -0500
@@ -25,6 +25,11 @@
     _G.print('Turok', ...)
   end
 end
+local uprint = function(...)
+  if _G.Devian and _G.DevianDB.workspace ~= 1 then
+    _G.print('Update', ...)
+  end
+end
 local GetPrint = function(trace)
   return trace and print or function() end
 end
@@ -413,14 +418,14 @@
   end
 
 function T:UNIT_SPELLCAST_INTERRUPTED(e, unit, spellName, rank, target, castID)
-  if not T.isEventUnit[unit] then
+  if not T.unit[unit] then
     return
   end
   T.spellevent[unit] = {unit, spellName, rank, target, castID, nil }
 end
 
 function T:UNIT_SPELLCAST_SENT(e,unit, spellName, rank, target, castID)
-  if not T.isEventUnit[unit] then
+  if not T.unit[unit] then
     return
   end
   T.unit[unit].spellEventString = e
@@ -428,7 +433,7 @@
 end
 
 function T:UNIT_SPELLCAST (e, unit, spellName, rank, castID, spellID)
-  if not T.isEventUnit[unit] then
+  if not T.unit[unit] then
     return
   end
   --name, subText, text, texture, startTime, endTime, isTradeSkill, castID, notInterruptible
@@ -440,7 +445,7 @@
 end
 
 function T:UNIT_CHANNEL(e, unit, spellName, rank, castID, spellID)
-  if not T.isEventUnit[unit] then
+  if not T.unit[unit] then
     return
   end
   --name, subText, text, texture, startTime, endTime, isTradeSkill, notInterruptible
@@ -467,7 +472,7 @@
   local u = T.unit[unit]
   local exists = UnitExists(unit)
   local realm
-  _G.print('Update', cText('  '..unit..' change:'), cText(unit), cText(exists and UnitName(unit)))
+  uprint(cText('  '..unit..' change:'), cText(unit), cText(exists and UnitName(unit)))
 
   u.exists = exists
   u.name, realm = UnitName(unit)
@@ -486,7 +491,7 @@
 
 
   for k,v in pairs(T.unit[unit]) do
-    _G.print('Update', cText('  -'), cText(k),'->', cText(v))
+    uprint(cText('  -'), cText(k),'->', cText(v))
   end
 end
 function T:PLAYER_TARGET_CHANGED(e)