Mercurial > wow > turok
comparison 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 |
comparison
equal
deleted
inserted
replaced
8:7790dff0fe13 | 9:9400a0ff8540 |
---|---|
21 --@debug@ | 21 --@debug@ |
22 local cType, cText, cNum, cWord, cKey, cPink, cBool = cType, cText, cNum, cWord, cKey, cPink, cBool | 22 local cType, cText, cNum, cWord, cKey, cPink, cBool = cType, cText, cNum, cWord, cKey, cPink, cBool |
23 local print = function(...) | 23 local print = function(...) |
24 if _G.Devian and _G.DevianDB.workspace ~= 1 then | 24 if _G.Devian and _G.DevianDB.workspace ~= 1 then |
25 _G.print('Turok', ...) | 25 _G.print('Turok', ...) |
26 end | |
27 end | |
28 local uprint = function(...) | |
29 if _G.Devian and _G.DevianDB.workspace ~= 1 then | |
30 _G.print('Update', ...) | |
26 end | 31 end |
27 end | 32 end |
28 local GetPrint = function(trace) | 33 local GetPrint = function(trace) |
29 return trace and print or function() end | 34 return trace and print or function() end |
30 end | 35 end |
411 L.focusregen = format('%.2f', self.powerRegen) | 416 L.focusregen = format('%.2f', self.powerRegen) |
412 L.castingmod = format('%.2f', self.castTimeMod) | 417 L.castingmod = format('%.2f', self.castTimeMod) |
413 end | 418 end |
414 | 419 |
415 function T:UNIT_SPELLCAST_INTERRUPTED(e, unit, spellName, rank, target, castID) | 420 function T:UNIT_SPELLCAST_INTERRUPTED(e, unit, spellName, rank, target, castID) |
416 if not T.isEventUnit[unit] then | 421 if not T.unit[unit] then |
417 return | 422 return |
418 end | 423 end |
419 T.spellevent[unit] = {unit, spellName, rank, target, castID, nil } | 424 T.spellevent[unit] = {unit, spellName, rank, target, castID, nil } |
420 end | 425 end |
421 | 426 |
422 function T:UNIT_SPELLCAST_SENT(e,unit, spellName, rank, target, castID) | 427 function T:UNIT_SPELLCAST_SENT(e,unit, spellName, rank, target, castID) |
423 if not T.isEventUnit[unit] then | 428 if not T.unit[unit] then |
424 return | 429 return |
425 end | 430 end |
426 T.unit[unit].spellEventString = e | 431 T.unit[unit].spellEventString = e |
427 T.unit[unit].spellevent = {unit, spellName, rank, target, castID} | 432 T.unit[unit].spellevent = {unit, spellName, rank, target, castID} |
428 end | 433 end |
429 | 434 |
430 function T:UNIT_SPELLCAST (e, unit, spellName, rank, castID, spellID) | 435 function T:UNIT_SPELLCAST (e, unit, spellName, rank, castID, spellID) |
431 if not T.isEventUnit[unit] then | 436 if not T.unit[unit] then |
432 return | 437 return |
433 end | 438 end |
434 --name, subText, text, texture, startTime, endTime, isTradeSkill, castID, notInterruptible | 439 --name, subText, text, texture, startTime, endTime, isTradeSkill, castID, notInterruptible |
435 local q = {UnitCastingInfo(unit)} | 440 local q = {UnitCastingInfo(unit)} |
436 T.unit[unit].casting = q[1] and q or false | 441 T.unit[unit].casting = q[1] and q or false |
438 T.unit[unit].spellevent = {unit, spellName, rank, nil,castID, spellID } | 443 T.unit[unit].spellevent = {unit, spellName, rank, nil,castID, spellID } |
439 print(e, unit) | 444 print(e, unit) |
440 end | 445 end |
441 | 446 |
442 function T:UNIT_CHANNEL(e, unit, spellName, rank, castID, spellID) | 447 function T:UNIT_CHANNEL(e, unit, spellName, rank, castID, spellID) |
443 if not T.isEventUnit[unit] then | 448 if not T.unit[unit] then |
444 return | 449 return |
445 end | 450 end |
446 --name, subText, text, texture, startTime, endTime, isTradeSkill, notInterruptible | 451 --name, subText, text, texture, startTime, endTime, isTradeSkill, notInterruptible |
447 local q = {UnitChannelInfo(unit) } | 452 local q = {UnitChannelInfo(unit) } |
448 T.unit[unit].channeling = q[1] and q or false | 453 T.unit[unit].channeling = q[1] and q or false |
465 = UnitExists, GetRealmName, UnitClassification, UnitClass, UnitIsFriend, UnitIsEnemy, UnitIsFeignDeath | 470 = UnitExists, GetRealmName, UnitClassification, UnitClass, UnitIsFriend, UnitIsEnemy, UnitIsFeignDeath |
466 function T:UnitChanged(e, unit) | 471 function T:UnitChanged(e, unit) |
467 local u = T.unit[unit] | 472 local u = T.unit[unit] |
468 local exists = UnitExists(unit) | 473 local exists = UnitExists(unit) |
469 local realm | 474 local realm |
470 _G.print('Update', cText(' '..unit..' change:'), cText(unit), cText(exists and UnitName(unit))) | 475 uprint(cText(' '..unit..' change:'), cText(unit), cText(exists and UnitName(unit))) |
471 | 476 |
472 u.exists = exists | 477 u.exists = exists |
473 u.name, realm = UnitName(unit) | 478 u.name, realm = UnitName(unit) |
474 u.realm = realm or GetRealmName() | 479 u.realm = realm or GetRealmName() |
475 u.classification = UnitClassification(unit) | 480 u.classification = UnitClassification(unit) |
484 u.channeling = (u.exists and channelinfo[1]) and channelinfo or false | 489 u.channeling = (u.exists and channelinfo[1]) and channelinfo or false |
485 u.isCasting = (u.casting or u.channeling) and true or false | 490 u.isCasting = (u.casting or u.channeling) and true or false |
486 | 491 |
487 | 492 |
488 for k,v in pairs(T.unit[unit]) do | 493 for k,v in pairs(T.unit[unit]) do |
489 _G.print('Update', cText(' -'), cText(k),'->', cText(v)) | 494 uprint(cText(' -'), cText(k),'->', cText(v)) |
490 end | 495 end |
491 end | 496 end |
492 function T:PLAYER_TARGET_CHANGED(e) | 497 function T:PLAYER_TARGET_CHANGED(e) |
493 T:UnitChanged(e, 'target') | 498 T:UnitChanged(e, 'target') |
494 end | 499 end |