Mercurial > wow > buffalo2
comparison ObjectiveTracker/ObjectiveTracker.lua @ 40:03ed70f846de
- move block accessors into a new file
- define a tMove function for reconciling the free/used tables as needed
- when retrieving an old block frame, confirm ID still matches; resolves multiple watch items on one block
- stop any animations when a block is freed; resolves stuck flare graphics
author | Nenue |
---|---|
date | Sun, 24 Apr 2016 14:15:25 -0400 |
parents | 92534dc793f2 |
children | 756e8aeb040b |
comparison
equal
deleted
inserted
replaced
39:92534dc793f2 | 40:03ed70f846de |
---|---|
459 | 459 |
460 local Play = function(file) if Devian and Devian.InWorkspace() then PlaySoundFile(file) end end | 460 local Play = function(file) if Devian and Devian.InWorkspace() then PlaySoundFile(file) end end |
461 | 461 |
462 local tprint = B.print('Tracker') | 462 local tprint = B.print('Tracker') |
463 T.OnHookedFunc = function(name, ...) | 463 T.OnHookedFunc = function(name, ...) |
464 tprint('|cFFFF8800securehook:|r', name, '|cFF00FFFFargs:|r', ...) | 464 print('|cFFFF8800securehook:|r', name, '|cFF00FFFFargs:|r', ...) |
465 local updateReason, arg1, arg2, arg3 = T[name](...) | 465 local updateReason, arg1, arg2, arg3 = T[name](...) |
466 if updateReason then | 466 if updateReason then |
467 print('|cFF00FFFFupdate reason:|r', updateReason, arg1, arg2, arg3) | 467 print('|cFF00FFFFupdate reason:|r', updateReason, arg1, arg2, arg3) |
468 T:Update(updateReason, arg1, arg2, arg3) | 468 T:Update(updateReason, arg1, arg2, arg3) |
469 end | 469 end |
486 end | 486 end |
487 if reason then | 487 if reason then |
488 tprint('OnEvent(|cFF00FF00'.. event ..'|r):', ...) | 488 tprint('OnEvent(|cFF00FF00'.. event ..'|r):', ...) |
489 T:Update(reason, arg1, arg2, arg3) | 489 T:Update(reason, arg1, arg2, arg3) |
490 else | 490 else |
491 tprint('OnEvent(|cFFFF4400'.. event ..'|r):', ...) | 491 print('OnEvent(|cFFFF4400'.. event ..'|r):', ...) |
492 tprint('no detected reason') | 492 print('no detected reason') |
493 Play([[Interface\Addons\SharedMedia_MyMedia\sound\Quack.ogg]]) | 493 --Play([[Interface\Addons\SharedMedia_MyMedia\sound\Quack.ogg]]) |
494 end | 494 end |
495 local args = (reason or '0') | 495 local args = (reason or '0') |
496 if arg1 then args = args .. ', ' .. tostring(arg1) end | 496 if arg1 then args = args .. ', ' .. tostring(arg1) end |
497 if arg2 then args = args .. ', ' .. tostring(arg2) end | 497 if arg2 then args = args .. ', ' .. tostring(arg2) end |
498 if arg3 then args = args .. ', ' .. tostring(arg3) end | 498 if arg3 then args = args .. ', ' .. tostring(arg3) end |
517 end) | 517 end) |
518 end | 518 end |
519 end | 519 end |
520 end | 520 end |
521 | 521 |
522 T.Conf.TasksLog = T.Conf.TasksLog or {} | 522 |
523 | 523 |
524 ObjectiveTrackerFrame:UnregisterAllEvents() | 524 ObjectiveTrackerFrame:UnregisterAllEvents() |
525 ObjectiveTrackerFrame:Hide() | 525 ObjectiveTrackerFrame:Hide() |
526 _G.MinimapCluster:Hide() | 526 _G.MinimapCluster:Hide() |
527 | 527 |