@@ -58,34 +58,34 @@ local function ResolveCurrency(db, option)
58
58
end
59
59
60
60
local _Migration = {
61
- [" %n" ] = " [" .. L [" name" ].. " ]" ,
61
+ [" %n" ] = " [" .. L [" name" ].. " ]" ,
62
62
[" %N" ] = " [" .. L [" name2" ].. " ]" ,
63
- [" %Z" ] = " [" .. L [" zone" ].. " ]" ,
63
+ [" %Z" ] = " [" .. L [" zone" ].. " ]" ,
64
64
[" %z" ] = " [" .. L [" subzone" ].. " ]" ,
65
- [" %g" ] = " [" .. L [" gold" ].. " ]" ,
66
- [" %s" ] = " [" .. L [" silver" ].. " ]" ,
67
- [" %c" ] = " [" .. L [" copper" ].. " ]" ,
68
- [" %G" ] = " " , [" %S" ] = " " , [" %C" ] = " " ,
69
- [" %B" ] = " [" .. L [" worldbuff" ].. " ]" ,
65
+ [" %g" ] = " [" .. L [" gold" ].. " ]" ,
66
+ [" %s" ] = " [" .. L [" silver" ].. " ]" ,
67
+ [" %c" ] = " [" .. L [" copper" ].. " ]" ,
68
+ [" %G" ] = " " , [" %S" ] = " " , [" %C" ] = " " ,
69
+ [" %B" ] = " [" .. L [" worldbuff" ].. " ]" ,
70
70
[" %T" ] = " [" .. L [" cooldown" ].. " ]" ,
71
- [" %L" ] = " [" .. L [" elapsed" ].. " ]" ,
72
- [" %l" ] = " [" .. L [" level" ].. " ]" ,
73
- [" %e" ] = " [" .. L [" expCur" ].. " ]" ,
71
+ [" %L" ] = " [" .. L [" elapsed" ].. " ]" ,
72
+ [" %l" ] = " [" .. L [" level" ].. " ]" ,
73
+ [" %e" ] = " [" .. L [" expCur" ].. " ]" ,
74
74
[" %E" ] = " [" .. L [" expMax" ].. " ]" ,
75
75
[" %p" ] = " [" .. L [" exp%" ].. " ]" ,
76
- [" %R" ] = " [" .. L [" expRest" ].. " ]" ,
76
+ [" %R" ] = " [" .. L [" expRest" ].. " ]" ,
77
77
[" %P" ] = " [" .. L [" expRest%" ].. " ]" ,
78
- -- ["%F"], ["%I"]
78
+ -- ["%F"], ["%I"]
79
79
[" %f" ] = " [" .. L [" color" ].. " ]" ,
80
80
[" %r" ] = " |n" ,
81
- [" %%" ] = " %" ,
82
- [" !n" ] = " [" .. L [" instName" ].. " ]" ,
81
+ [" %%" ] = " %" ,
82
+ [" !n" ] = " [" .. L [" instName" ].. " ]" ,
83
83
[" !d" ] = " [" .. L [" difficulty" ].. " ]" ,
84
- [" !i" ] = " [" .. L [" instID" ].. " ]" ,
84
+ [" !i" ] = " [" .. L [" instID" ].. " ]" ,
85
85
[" !p" ] = " [" .. L [" progress" ].. " ]" ,
86
86
[" !P" ] = " [" .. L [" bosses" ].. " ]" ,
87
- [" !t" ] = " [" .. L [" time" ].. " ]" ,
88
- [" !!" ] = " !" ,
87
+ [" !t" ] = " [" .. L [" time" ].. " ]" ,
88
+ [" !!" ] = " !" ,
89
89
}
90
90
91
91
local _TranslationTable = {
@@ -105,9 +105,6 @@ local _TranslationTable = {
105
105
[" gold" ] = function (db ) return ResolveCurrency (db , L [" gold" ]) end ,
106
106
[" silver" ] = function (db ) return ResolveCurrency (db , L [" silver" ]) end ,
107
107
[" copper" ] = function (db ) return ResolveCurrency (db , L [" copper" ]) end ,
108
- [" g" ] = function (db ) return ResolveCurrency (db , L [" gold" ]) end ,
109
- [" s" ] = function (db ) return ResolveCurrency (db , L [" silver" ]) end ,
110
- [" c" ] = function (db ) return ResolveCurrency (db , L [" copper" ]) end ,
111
108
[" name" ] = " coloredName" ,
112
109
[" name2" ] = " name" ,
113
110
[" zone" ] = " zone" ,
@@ -140,9 +137,6 @@ local _TranslationTable = {
140
137
[L [" gold" ] ] = " gold" ,
141
138
[L [" silver" ] ] = " silver" ,
142
139
[L [" copper" ] ] = " copper" ,
143
- [L [" g" ] ] = " g" ,
144
- [L [" s" ] ] = " s" ,
145
- [L [" c" ] ] = " c" ,
146
140
[L [" name" ] ] = " name" ,
147
141
[L [" name2" ] ] = " name2" ,
148
142
[L [" zone" ] ] = " zone" ,
@@ -212,10 +206,8 @@ function SavedClassic:OnInitialize()
212
206
if not self .db .global .version then
213
207
self :ResetWholeDB ()
214
208
else
215
- if self .db .global .version :match (" 1.4 ." ) then
209
+ if not self .db .global .version :match (" 1.15.6 ." ) then
216
210
self :Migrate ()
217
- -- p(L["Reset due to update"](self.db.global.version, self.version))
218
- -- self:ResetWholeDB()
219
211
end
220
212
end
221
213
@@ -330,20 +322,20 @@ function SavedClassic:InitPlayerDB()
330
322
playerdb .info1_2 = format (" \n [%s:%s/ffee99]" , L [" currency" ], L [" gold" ])
331
323
playerdb .info2 = true
332
324
playerdb .info2_1 = " "
325
+ playerdb .info2_2 = " "
333
326
334
327
if UnitLevel (" player" ) < GetMaxPlayerLevel () then
335
328
playerdb .info1_1 = format (" \n [%s/00ff00]■[%s] [[%s/ffffff]:[%s]] [%s] [%s/ffffff]([%s]: [%s])[%s]" ,
336
329
L [" color" ], L [" color" ], L [" level" ], L [" name" ], L [" ilvl" ], L [" color" ], L [" zone" ], L [" subzone" ], L [" color" ])
337
330
playerdb .info2_1 = format (" [%s/cc66ff][%s]/[%s] ([%s]%%)[%s] [%s/66ccff]+[%s] ([%s]%%)[%s]" ,
338
331
L [" color" ], L [" expCur" ], L [" expMax" ], L [" exp%" ], L [" color" ], L [" color" ], L [" expRest" ], L [" expRest%" ], L [" color" ])
339
- playerdb .info2_2 = format (" [%s/ffffff][%s:%s][%s]" ,
340
- L [" color" ], L [" currency" ], L [" JP" ], L [" color" ] )
341
332
else
342
333
playerdb .info1_1 = format (" \n [%s/00ff00]■[%s] [[%s]] [%s] [%s/ffffff]([%s]: [%s])[%s]" ,
343
334
L [" color" ], L [" color" ], L [" name" ], L [" ilvl" ], L [" color" ], L [" zone" ], L [" subzone" ], L [" color" ])
344
- playerdb .info2_1 = format (" [%s/ffffff][%s:%s] [%s:%s] [%s:%s] [%s:%s] [%s:%s][%s]" ,
345
- L [" color" ], L [" currency" ], L [" VP" ], L [" currency" ], L [" JP" ], L [" currency" ], L [" conquest" ], L [" currency" ], L [" honor" ], L [" currency" ], L [" FS" ], L [" color" ])
346
- playerdb .info2_2 = format (" [%s/ffffff][%s]/[%s][%s]" , L [" color" ], L [" dqCom" ], L [" dqMax" ], L [" color" ])
335
+ playerdb .info2_1 = format (" [%s/ffffff][%s][%s]" , L [" color" ], L [" worldbuff" ], L [" color" ])
336
+ end
337
+ if class == " WARLOCK" then
338
+ playerdb .info2_2 = format (" [%s:%s/cc66cc]" , L [" item" ], " 6265" )
347
339
end
348
340
349
341
playerdb .info3 = true
@@ -476,22 +468,22 @@ function SavedClassic:PLAYER_XP_UPDATE()
476
468
end
477
469
478
470
function SavedClassic :PLAYER_UPDATE_RESTING (...)
479
- if IsResting () then
480
- self :RegisterEvent (" COMBAT_LOG_EVENT_UNFILTERED" )
481
- else
482
- self :UnregisterEvent (" COMBAT_LOG_EVENT_UNFILTERED" )
483
- end
471
+ if IsResting () then
472
+ self :RegisterEvent (" COMBAT_LOG_EVENT_UNFILTERED" )
473
+ else
474
+ self :UnregisterEvent (" COMBAT_LOG_EVENT_UNFILTERED" )
475
+ end
484
476
end
485
477
486
478
function SavedClassic :COMBAT_LOG_EVENT_UNFILTERED (...)
487
- local playerGUID = UnitGUID (" player" )
488
- local _ , combatEvent , _ , _ , _ , _ , _ , destGUID , _ , _ , _ ,
489
- spellId = CombatLogGetCurrentEventInfo ()
490
- if combatEvent == " SPELL_AURA_APPLIED" and destGUID == playerGUID then
491
- if self .wb [spellId ] then
492
- self :SaveWorldBuff ()
493
- end
494
- end
479
+ local playerGUID = UnitGUID (" player" )
480
+ local _ , combatEvent , _ , _ , _ , _ , _ , destGUID , _ , _ , _ ,
481
+ spellId = CombatLogGetCurrentEventInfo ()
482
+ if combatEvent == " SPELL_AURA_APPLIED" and destGUID == playerGUID then
483
+ if self .wb [spellId ] then
484
+ self :SaveWorldBuff ()
485
+ end
486
+ end
495
487
end
496
488
497
489
function SavedClassic :PLAYER_EQUIPMENT_CHANGED ()
@@ -502,28 +494,28 @@ function SavedClassic:PLAYER_EQUIPMENT_CHANGED()
502
494
end
503
495
504
496
function SavedClassic :SaveWorldBuffs ()
505
- local db = self .db .realm [player ]
506
- db .worldBuffs = {}
507
- db .chrono = {}
508
- for i = 1 ,64 do
509
- local _ , _ , _ , _ , _ , expire , _ , _ , _ , id = UnitBuff (" player" , i )
510
- if id and self .wb [id ] then
511
- table.insert (db .worldBuffs , { id = id , remain = floor ((expire - GetTime ())/ 60 ) })
512
- end
513
- if id == 349981 then
514
- self :SaveChronoBuff (i )
515
- end
516
- end
517
- table.sort (db .worldBuffs , function (a ,b ) return (a .remain or 0 ) > (b .remain or 0 ) end )
497
+ local db = self .db .realm [player ]
498
+ db .worldBuffs = {}
499
+ db .chrono = {}
500
+ for i = 1 ,64 do
501
+ local _ , _ , _ , _ , _ , expire , _ , _ , _ , id = UnitBuff (" player" , i )
502
+ if id and self .wb [id ] then
503
+ table.insert (db .worldBuffs , { id = id , remain = floor ((expire - GetTime ())/ 60 ) })
504
+ end
505
+ if id == 349981 then
506
+ self :SaveChronoBuff (i )
507
+ end
508
+ end
509
+ table.sort (db .worldBuffs , function (a ,b ) return (a .remain or 0 ) > (b .remain or 0 ) end )
518
510
end
519
511
520
512
function SavedClassic :SaveChronoBuff (numBuff )
521
- local db = self .db .realm [player ]
522
- local displacer = { UnitBuff (" player" , numBuff ) }
523
- for i = 1 ,# self .cd do
524
- table.insert (db .chrono , {id = self .cd [i ], remain = floor (displacer [16 + i ]/ 60 ) })
525
- end
526
- table.sort (db .chrono , function (a ,b ) return (a .remain or 0 ) > (b .remain or 0 ) end )
513
+ local db = self .db .realm [player ]
514
+ local displacer = { UnitBuff (" player" , numBuff ) }
515
+ for i = 1 ,# self .cd do
516
+ table.insert (db .chrono , {id = self .cd [i ], remain = floor (displacer [16 + i ]/ 60 ) })
517
+ end
518
+ table.sort (db .chrono , function (a ,b ) return (a .remain or 0 ) > (b .remain or 0 ) end )
527
519
end
528
520
529
521
function SavedClassic :SaveZone ()
@@ -593,21 +585,6 @@ function SavedClassic:PLAYER_MONEY()
593
585
end
594
586
595
587
function SavedClassic :CurrencyUpdate ()
596
- -- local db = self.db.realm[player]
597
- -- for _, currencyID in pairs(self.currencies.order) do
598
- -- local info = SavedClassic_GetCurrencyInfo(currencyID)
599
- -- if info then
600
- -- db.currencyCount[currencyID] = { quantity = tonumber(info.quantity) }
601
- -- if info.useTotalEarnedForMaxQty then
602
- -- db.currencyCount[currencyID]["totalEarned"] = info.totalEarned or 0
603
- -- --db.currencyCount[currencyID]["maxQuantity"] = info.maxQuantity
604
- -- if info.maxQuantity and info.maxQuantity > 0 then
605
- -- self.db.global.maxQty = self.db.global.maxQty or {}
606
- -- self.db.global.maxQty[currencyID] = info.maxQuantity
607
- -- end
608
- -- end
609
- -- end
610
- -- end
611
588
self :PLAYER_MONEY ()
612
589
end
613
590
@@ -651,36 +628,35 @@ function SavedClassic:ShowInstanceInfo(tooltip, character)
651
628
local currentTime = time ()
652
629
653
630
local wbstr = " "
654
- if db .worldBuffs then
655
- for _ ,b in ipairs (db .worldBuffs ) do
656
- if b .id and b .remain then
657
- local icon = GetSpellTexture (b .id ) or " "
658
- wbstr = wbstr .. " |T" .. icon .. " :14:14|t" .. b .remain .. L [" minites" ].. " "
659
- end
660
- end
661
- end
662
- wbstr = wbstr .. " |T133881:14:14|t" .. (db .itemCount [184937 ] or 0 )
663
- if db .chrono then
664
- local cdstr = " "
665
- for i ,b in ipairs (db .chrono ) do
666
- if b .id and b .remain and b .remain > 0 then
667
- local icon = GetSpellTexture (b .id ) or " "
668
- cdstr = cdstr .. " |T" .. icon .. " :14:14|t" .. b .remain .. L [" minites" ].. " "
669
- end
670
- end
671
- if cdstr ~= " " then
672
- cdstr = string.sub (cdstr ,1 ,- 2 ) -- trim trailing space
673
- wbstr = wbstr .. " (" .. cdstr .. " )"
674
- end
675
- end
631
+ if db .worldBuffs then
632
+ for _ ,b in ipairs (db .worldBuffs ) do
633
+ if b .id and b .remain then
634
+ local icon = GetSpellTexture (b .id ) or " "
635
+ wbstr = wbstr .. " |T" .. icon .. " :14:14|t" .. b .remain .. L [" minites" ].. " "
636
+ end
637
+ end
638
+ end
639
+ wbstr = wbstr .. " |T133881:14:14|t" .. (db .itemCount [184937 ] or 0 )
640
+ if db .chrono then
641
+ local cdstr = " "
642
+ for i ,b in ipairs (db .chrono ) do
643
+ if b .id and b .remain and b .remain > 0 then
644
+ local icon = GetSpellTexture (b .id ) or " "
645
+ cdstr = cdstr .. " |T" .. icon .. " :14:14|t" .. b .remain .. L [" minites" ].. " "
646
+ end
647
+ end
648
+ if cdstr ~= " " then
649
+ cdstr = string.sub (cdstr ,1 ,- 2 ) -- trim trailing space
650
+ wbstr = wbstr .. " (" .. cdstr .. " )"
651
+ end
652
+ end
653
+ db .wbstr = wbstr
676
654
677
655
local tsstr = " "
678
- local ts_icon , ts_cooldown = " " , " " -- for Tailoring cooldowns integration
679
656
if db .tradeSkills then
680
657
for id , cooldown in pairs (db .tradeSkills ) do
681
658
local ts = self .ts [id ]
682
659
if ts and cooldown and cooldown .ends then
683
- -- if ts.share then ts = self.ts[ts.share] end
684
660
local remain = cooldown .ends - currentTime
685
661
if remain > 0 then
686
662
local hh , mm = floor (remain / 3600 ), floor (remain % 3600 / 60 )
@@ -690,12 +666,6 @@ function SavedClassic:ShowInstanceInfo(tooltip, character)
690
666
else
691
667
cooldown_str = format (" %02d:%02d" , hh , mm )
692
668
end
693
- if ts .tailoring then
694
- ts_icon = ts_icon .. (ts .icon or ts .altName or " " )
695
- ts_cooldown = cooldown_str
696
- else
697
- tsstr = tsstr .. (ts .icon or ts .altName or " " ).. cooldown_str
698
- end
699
669
else
700
670
db .tradeSkills [id ] = nil
701
671
end
@@ -704,7 +674,7 @@ function SavedClassic:ShowInstanceInfo(tooltip, character)
704
674
end
705
675
end
706
676
end
707
- db .tsstr = tsstr .. ts_icon .. ts_cooldown
677
+ db .tsstr = tsstr
708
678
709
679
if db .dqResetReal and currentTime > db .dqResetReal then
710
680
db .dqComplete = 0
@@ -767,35 +737,6 @@ function SavedClassic:ShowInstanceInfo(tooltip, character)
767
737
end
768
738
end
769
739
end
770
- --[[
771
- db.heroics = db.heroics or {}
772
- if db.info4 then
773
- if db.info4oneline then
774
- local oneline = ""
775
- for i = 1, #db.heroics do
776
- local instance = db.heroics[i]
777
- local remain = SecondsToTime(instance.reset - time())
778
- if remain and ( remain ~= "" ) then
779
- oneline = oneline.." "..(self.abbr.heroic[instance.name] or instance.name)
780
- end
781
- end
782
- if oneline ~= "" then
783
- oneline = oneline:gsub("^ ","") -- trim leading space
784
- tooltip:AddLine("|cffffff99 "..oneline.."|r")
785
- end
786
- else
787
- for i = 1, #db.heroics do
788
- local instance = db.heroics[i]
789
- local remain = SecondsToTime(instance.reset - time())
790
- if remain and ( remain ~= "" ) then
791
- local line4_1 = self:TranslateInstance(db.info4_1, instance)
792
- local line4_2 = self:TranslateInstance(db.info4_2, instance)
793
- tooltip:AddDoubleLine(line4_1, line4_2)
794
- end
795
- end
796
- end
797
- end
798
- --]]
799
740
end
800
741
801
742
function SavedClassic :TranslateCharacter (line , db )
@@ -1427,9 +1368,6 @@ function SavedClassic:BuildOptions()
1427
1368
tdb .info3 = rdb [ch ].info3
1428
1369
tdb .info3_1 = rdb [ch ].info3_1
1429
1370
tdb .info3_2 = rdb [ch ].info3_2
1430
- tdb .info4 = rdb [ch ].info4
1431
- tdb .info4_1 = rdb [ch ].info4_1
1432
- tdb .info4_2 = rdb [ch ].info4_2
1433
1371
end ,
1434
1372
confirm = function () return L [" Confirm copy" ] end ,
1435
1373
order = 92
0 commit comments