-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSmartBuff.buffs.lua
More file actions
2414 lines (2248 loc) · 148 KB
/
SmartBuff.buffs.lua
File metadata and controls
2414 lines (2248 loc) · 148 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
local _;
local S = SMARTBUFF_GLOBALS;
-- ---------------------------------------------------------------------------
-- Globals and buff type constants (SMARTBUFF_PLAYERCLASS, SMARTBUFF_BUFFLIST, SMARTBUFF_CONST_*, S.CheckPet, S.Toybox, S.ToyboxByID)
-- ---------------------------------------------------------------------------
SMARTBUFF_PLAYERCLASS = nil;
SMARTBUFF_BUFFLIST = nil;
-- Buff types
SMARTBUFF_CONST_ALL = "ALL";
SMARTBUFF_CONST_GROUP = "GROUP";
SMARTBUFF_CONST_GROUPALL = "GROUPALL";
SMARTBUFF_CONST_SELF = "SELF";
SMARTBUFF_CONST_FORCESELF = "FORCESELF";
SMARTBUFF_CONST_TRACK = "TRACK";
SMARTBUFF_CONST_WEAPON = "WEAPON";
SMARTBUFF_CONST_INV = "INVENTORY"; -- This denotes that it's something in the inventory, not an item itself
SMARTBUFF_CONST_FOOD = "FOOD"; -- This is food, an inventory item
SMARTBUFF_CONST_SCROLL = "SCROLL"; -- This is a scroll, an inventory item
SMARTBUFF_CONST_POTION = "POTION"; -- This is a potion, an inventory item
SMARTBUFF_CONST_STANCE = "STANCE"; -- This is a warrior stance
SMARTBUFF_CONST_ITEM = "ITEM"; -- This denotes that it's a conjured item (healthstone, mage food)
SMARTBUFF_CONST_ITEMGROUP = "ITEMGROUP"; -- Unused, candidate for removal
SMARTBUFF_CONST_TOY = "TOY"; -- This is a toy in the toybox
S.CheckPet = "CHECKPET";
S.CheckPetNeeded = "CHECKPETNEEDED";
S.CheckFishingPole = "CHECKFISHINGPOLE";
S.NIL = "x";
S.Toybox = { };
-- Index by itemID for O(1) toy lookup in FindItem (avoids O(n) pairs over Toybox every check)
S.ToyboxByID = { };
-- ---------------------------------------------------------------------------
-- Helper functions: spell/item load (cache or API), validation, toybox population (S.Toybox, S.ToyboxByID)
-- ---------------------------------------------------------------------------
local function GetItems(items)
local t = { };
for _, id in pairs(items) do
-- Validate item ID is a number
if (type(id) == "number" and id > 0) then
-- Validate item ID exists in game using GetItemInfoInstant
-- GetItemInfoInstant doesn't rely on cache - returns instantly for real items
-- Non-real items will return nil
local itemID = C_Item.GetItemInfoInstant(id);
if (itemID) then
-- Item ID is valid and exists in game
-- Store item ID initially (will be updated to link when async load completes)
local idx = #t + 1;
t[idx] = itemID; -- Store numeric ID initially
-- Async load item link using ContinueOnItemLoad
-- This fires immediately if cached, or async if not cached
local item = Item:CreateFromItemID(itemID);
item:ContinueOnItemLoad(function()
local link = item:GetItemLink();
if (link) then
--print("Item found: "..id..", "..link);
t[idx] = link;
end
-- If link unavailable, keep ID (SMARTBUFF_FindItem handles both)
end);
end
-- If GetItemInfoInstant returns nil, item doesn't exist - skip it
end
end
return t;
end
-- Spellbook abilities are not filtered properly this is workaround
-- Return a spell name even if spell is not available
-- This avoids nil comparisons hopefully
local function getSpellBookItemByName(spellId)
local name = C_Spell.GetSpellName(spellId);
if (name == nil) then
return nil;
end
local spellInfo = C_Spell.GetSpellInfo(name);
if (spellInfo == nil) then
return name;
end
return spellInfo;
end
-- Helper function to validate spell data completeness
-- Returns true if spell data looks complete and reliable
function SMARTBUFF_ValidateSpellData(spellInfo)
if (not spellInfo) then return false; end
-- If it's a table (spellInfo), check for critical fields
if (type(spellInfo) == "table") then
-- Must have name and spellID to be considered complete
return spellInfo.name ~= nil and spellInfo.spellID ~= nil;
end
-- If it's a string (spell name fallback), it's incomplete
return false;
end
-- Helper function to validate item data completeness
-- Returns true if item data looks complete and reliable
function SMARTBUFF_ValidateItemData(itemLink, minLevel, texture)
if (not itemLink or itemLink == "") then return false; end
-- Item link is the minimum requirement - minLevel and texture are optional but preferred
return true;
end
-- Helper function to get spell info only if variable is not already set
-- Only calls API if variable is nil, and only updates if valid response received
-- Usage: GetSpellInfoIfNeeded("SMARTBUFF_VARNAME", spellId, isSpellbookSpell)
-- isSpellbookSpell: true for class/talent spells (use spellbook check), false/nil for item spells (flasks/potions)
local function GetSpellInfoIfNeeded(varName, spellId, isSpellbookSpell)
-- Track expected spell for cache sync (and O(1) reverse lookup in DATA_LOAD_RESULT)
if (SMARTBUFF_ExpectedData and SMARTBUFF_ExpectedData.spells) then
SMARTBUFF_ExpectedData.spells[varName] = spellId;
if (not SMARTBUFF_ExpectedData.spellIDToVarName) then SMARTBUFF_ExpectedData.spellIDToVarName = {}; end
SMARTBUFF_ExpectedData.spellIDToVarName[spellId] = varName;
end
-- Check if variable is already set (non-nil) - skip if already loaded
if (_G[varName] ~= nil) then
return; -- Already loaded and verified, skip API call
end
-- Try to load from cache first (AllTheThings pattern: use cache when live data not available)
local cache = SmartBuffItemSpellCache;
if (cache and cache.version and cache.spells and cache.spells[varName]) then
local cachedSpell = cache.spells[varName];
if (cachedSpell) then
_G[varName] = cachedSpell;
-- Validate cached data - if incomplete, mark for refresh
if (not SMARTBUFF_ValidateSpellData(cachedSpell)) then
if (not cache.needsRefresh) then cache.needsRefresh = {}; end
cache.needsRefresh[varName] = true;
C_Spell.RequestLoadSpellData(spellId);
else
-- Still request background refresh to ensure data is current
C_Spell.RequestLoadSpellData(spellId);
end
return;
end
end
-- Not in cache, try to load from API
local spellName = C_Spell.GetSpellName(spellId);
if (not spellName) then
-- Spell doesn't exist - mark as invalid and skip
if (SmartBuffValidSpells) then
SmartBuffValidSpells.spells[spellId] = false; -- Mark as invalid
end
return;
end
local spellInfo = getSpellBookItemByName(spellId);
if (spellInfo) then
-- Validate data - if incomplete, re-queue for refresh
if (not SMARTBUFF_ValidateSpellData(spellInfo)) then
C_Spell.RequestLoadSpellData(spellId);
return;
end
-- For spellbook spells, verify they're known/valid for this character
if (isSpellbookSpell) then
local isKnown = C_SpellBook.IsSpellKnownOrInSpellBook(spellId);
if (not isKnown) then
-- Spell not known - mark as invalid and skip
if (SmartBuffValidSpells) then
SmartBuffValidSpells.spells[spellId] = false;
end
return;
end
-- Valid spellbook spell - mark as valid
if (SmartBuffValidSpells) then
if (not SmartBuffValidSpells.spells) then SmartBuffValidSpells.spells = {}; end
SmartBuffValidSpells.spells[spellId] = true;
SmartBuffValidSpells.version = SMARTBUFF_VERSION;
SmartBuffValidSpells.lastUpdate = GetTime();
end
else
-- Item spell (flask/potion) - always valid if spell exists
if (SmartBuffValidSpells) then
if (not SmartBuffValidSpells.spells) then SmartBuffValidSpells.spells = {}; end
SmartBuffValidSpells.spells[spellId] = true;
SmartBuffValidSpells.version = SMARTBUFF_VERSION;
SmartBuffValidSpells.lastUpdate = GetTime();
end
end
-- Valid API response - update variable and cache
_G[varName] = spellInfo;
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.spells) then
SmartBuffItemSpellCache.spells = {};
end
if (not SmartBuffItemSpellCache.needsRefresh) then
SmartBuffItemSpellCache.needsRefresh = {};
end
SmartBuffItemSpellCache.spells[varName] = spellInfo;
SmartBuffItemSpellCache.needsRefresh[varName] = false; -- Mark as valid
SmartBuffItemSpellCache.version = SMARTBUFF_VERSION;
SmartBuffItemSpellCache.lastUpdate = GetTime();
else
-- API call failed - request loading, cache will be repopulated when SPELL_DATA_LOAD_RESULT fires
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.needsRefresh) then
SmartBuffItemSpellCache.needsRefresh = {};
end
SmartBuffItemSpellCache.needsRefresh[varName] = true; -- Mark as needing refresh
C_Spell.RequestLoadSpellData(spellId);
end
end
-- Helper function to get spell info directly from C_Spell.GetSpellInfo() only if variable is not already set
-- Loads from cache first, then API if needed
-- Usage: GetSpellInfoDirectIfNeeded("SMARTBUFF_VARNAME", spellId, isSpellbookSpell)
-- isSpellbookSpell: true for character/racial spells (use spellbook check), false/nil for item spells (flasks/potions/scrolls)
local function GetSpellInfoDirectIfNeeded(varName, spellId, isSpellbookSpell)
-- Track expected spell for cache sync (and O(1) reverse lookup in DATA_LOAD_RESULT)
if (SMARTBUFF_ExpectedData and SMARTBUFF_ExpectedData.spells) then
SMARTBUFF_ExpectedData.spells[varName] = spellId;
if (not SMARTBUFF_ExpectedData.spellIDToVarName) then SMARTBUFF_ExpectedData.spellIDToVarName = {}; end
SMARTBUFF_ExpectedData.spellIDToVarName[spellId] = varName;
end
-- Check if variable is already set (non-nil) - skip if already loaded
if (_G[varName] ~= nil) then
return; -- Already loaded and verified, skip API call
end
-- Try to load from cache first (AllTheThings pattern: use cache when live data not available)
local cache = SmartBuffItemSpellCache;
if (cache and cache.version and cache.spells and cache.spells[varName]) then
local cachedSpell = cache.spells[varName];
if (cachedSpell) then
_G[varName] = cachedSpell;
-- Validate cached data - if incomplete, mark for refresh
if (not SMARTBUFF_ValidateSpellData(cachedSpell)) then
if (not cache.needsRefresh) then cache.needsRefresh = {}; end
cache.needsRefresh[varName] = true;
C_Spell.RequestLoadSpellData(spellId);
else
-- Still request background refresh to ensure data is current
C_Spell.RequestLoadSpellData(spellId);
end
return;
end
end
-- Not in cache, try to load from API
local spellName = C_Spell.GetSpellName(spellId);
if (not spellName) then
-- Spell doesn't exist - mark as invalid and skip
if (SmartBuffValidSpells) then
SmartBuffValidSpells.spells[spellId] = false; -- Mark as invalid
end
return;
end
local spellInfo = C_Spell.GetSpellInfo(spellId);
if (spellInfo) then
-- Validate data - if incomplete, re-queue for refresh
if (not SMARTBUFF_ValidateSpellData(spellInfo)) then
C_Spell.RequestLoadSpellData(spellId);
return;
end
-- For spellbook spells, verify they're known/valid for this character
if (isSpellbookSpell) then
local isKnown = C_SpellBook.IsSpellKnownOrInSpellBook(spellId);
if (not isKnown) then
-- Spell not known - mark as invalid and skip
if (SmartBuffValidSpells) then
SmartBuffValidSpells.spells[spellId] = false;
end
return;
end
-- Valid spellbook spell - mark as valid
if (SmartBuffValidSpells) then
if (not SmartBuffValidSpells.spells) then SmartBuffValidSpells.spells = {}; end
SmartBuffValidSpells.spells[spellId] = true;
SmartBuffValidSpells.version = SMARTBUFF_VERSION;
SmartBuffValidSpells.lastUpdate = GetTime();
end
else
-- Item spell (flask/potion/scroll) - always valid if spell exists
if (SmartBuffValidSpells) then
if (not SmartBuffValidSpells.spells) then SmartBuffValidSpells.spells = {}; end
SmartBuffValidSpells.spells[spellId] = true;
SmartBuffValidSpells.version = SMARTBUFF_VERSION;
SmartBuffValidSpells.lastUpdate = GetTime();
end
end
-- Valid API response received - update the variable and cache
_G[varName] = spellInfo;
-- Save to cache for persistence
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.spells) then
SmartBuffItemSpellCache.spells = {};
end
if (not SmartBuffItemSpellCache.needsRefresh) then
SmartBuffItemSpellCache.needsRefresh = {};
end
SmartBuffItemSpellCache.spells[varName] = spellInfo;
SmartBuffItemSpellCache.needsRefresh[varName] = false; -- Mark as valid
SmartBuffItemSpellCache.version = SMARTBUFF_VERSION;
SmartBuffItemSpellCache.lastUpdate = GetTime();
else
-- API call failed - request loading, cache will be repopulated when SPELL_DATA_LOAD_RESULT fires
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.needsRefresh) then
SmartBuffItemSpellCache.needsRefresh = {};
end
SmartBuffItemSpellCache.needsRefresh[varName] = true; -- Mark as needing refresh
C_Spell.RequestLoadSpellData(spellId);
end
end
-- Helper function to validate item data completeness
-- Returns true if item data looks complete and reliable
local function ValidateItemData(itemLink, minLevel, texture)
-- Must have itemLink to be considered complete
if (not itemLink or itemLink == "") then return false; end
-- minLevel and texture should be present (can be 0/nil for some items, but should be explicitly set)
-- For now, just check itemLink exists - minLevel/texture can be nil for some items
return true;
end
-- Helper function to get item info only if variable is not already set
-- Loads from cache first, then API if needed
-- Usage: GetItemInfoIfNeeded("SMARTBUFF_VARNAME", itemId)
local function GetItemInfoIfNeeded(varName, itemId)
-- Track expected item for cache sync (and O(1) reverse lookup in DATA_LOAD_RESULT)
if (SMARTBUFF_ExpectedData and SMARTBUFF_ExpectedData.items) then
SMARTBUFF_ExpectedData.items[varName] = itemId;
if (not SMARTBUFF_ExpectedData.itemIDToVarName) then SMARTBUFF_ExpectedData.itemIDToVarName = {}; end
SMARTBUFF_ExpectedData.itemIDToVarName[itemId] = varName;
end
-- Check if variable is already set (non-nil) - skip if already loaded
if (_G[varName] ~= nil) then
return; -- Already loaded and verified, skip API call
end
-- Try to load from cache first (AllTheThings pattern: use cache when live data not available)
local cache = SmartBuffItemSpellCache;
if (cache and cache.version and cache.items and cache.items[varName]) then
local cachedLink = cache.items[varName];
if (cachedLink) then
_G[varName] = cachedLink;
-- Check if we have minLevel/texture in cache
local itemData = cache.itemData and cache.itemData[varName];
local minLevel = itemData and itemData[1];
local texture = itemData and itemData[2];
-- Validate cached data - if incomplete, mark for refresh
if (not ValidateItemData(cachedLink, minLevel, texture)) then
if (not cache.needsRefresh) then cache.needsRefresh = {}; end
cache.needsRefresh[varName] = true;
if (cache.itemIDs and cache.itemIDs[varName]) then
C_Item.RequestLoadItemDataByID(cache.itemIDs[varName]);
end
else
-- Still request background refresh to ensure data is current
if (cache.itemIDs and cache.itemIDs[varName]) then
C_Item.RequestLoadItemDataByID(cache.itemIDs[varName]);
end
end
return; -- Use cached data, refresh in background
end
end
-- Not in cache, try to load from API
local itemName, itemLink, itemRarity, itemLevel, minLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, texture = C_Item.GetItemInfo(itemId);
if (itemLink) then
-- Validate data - if incomplete, re-queue for refresh
if (not SMARTBUFF_ValidateItemData(itemLink, minLevel, texture)) then
C_Item.RequestLoadItemDataByID(itemId);
-- Still mark in cache as needing refresh
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.needsRefresh) then
SmartBuffItemSpellCache.needsRefresh = {};
end
SmartBuffItemSpellCache.needsRefresh[varName] = true;
return;
end
-- Valid API response received - update the variable and cache
_G[varName] = itemLink;
-- Save to cache for persistence (including minLevel and texture)
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.items) then
SmartBuffItemSpellCache.items = {};
end
if (not SmartBuffItemSpellCache.itemIDs) then
SmartBuffItemSpellCache.itemIDs = {};
end
if (not SmartBuffItemSpellCache.itemData) then
SmartBuffItemSpellCache.itemData = {};
end
if (not SmartBuffItemSpellCache.needsRefresh) then
SmartBuffItemSpellCache.needsRefresh = {};
end
SmartBuffItemSpellCache.items[varName] = itemLink;
SmartBuffItemSpellCache.itemIDs[varName] = itemId;
SmartBuffItemSpellCache.itemData[varName] = {minLevel or 0, texture or 0}; -- Store minLevel and texture
SmartBuffItemSpellCache.needsRefresh[varName] = false; -- Mark as valid
SmartBuffItemSpellCache.version = SMARTBUFF_VERSION;
SmartBuffItemSpellCache.lastUpdate = GetTime();
else
-- Item not loaded yet: set placeholder so buff list can include it; ITEM_DATA_LOAD_RESULT will update later
_G[varName] = "item:" .. tostring(itemId);
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.needsRefresh) then
SmartBuffItemSpellCache.needsRefresh = {};
end
SmartBuffItemSpellCache.needsRefresh[varName] = true;
C_Item.RequestLoadItemDataByID(itemId);
end
end
local function InsertItem(t, type, itemId, spellId, duration, link)
-- Use GetItemInfoIfNeeded pattern to track and cache items
-- Generate a unique varName for tracking (won't be used as global, just for cache tracking)
local varName = "SMARTBUFF_DYNAMIC_" .. tostring(itemId);
-- Track expected item for cache sync (and O(1) reverse lookup in DATA_LOAD_RESULT)
if (SMARTBUFF_ExpectedData and SMARTBUFF_ExpectedData.items) then
SMARTBUFF_ExpectedData.items[varName] = itemId;
if (not SMARTBUFF_ExpectedData.itemIDToVarName) then SMARTBUFF_ExpectedData.itemIDToVarName = {}; end
SMARTBUFF_ExpectedData.itemIDToVarName[itemId] = varName;
end
-- Try cache first
local item = nil;
local minLevel, texture = nil, nil;
local cache = SmartBuffItemSpellCache;
if (cache and cache.version and cache.items and cache.items[varName]) then
item = cache.items[varName];
local itemData = cache.itemData and cache.itemData[varName];
if (itemData) then
minLevel = itemData[1];
texture = itemData[2];
end
end
-- If not in cache, try API
if (not item) then
local itemName, itemLink, itemRarity, itemLevel, apiMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, apiTexture = C_Item.GetItemInfo(itemId);
item = itemLink;
minLevel = apiMinLevel;
texture = apiTexture;
-- Cache if valid
if (item and SMARTBUFF_ValidateItemData(item, minLevel, texture)) then
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.items) then SmartBuffItemSpellCache.items = {}; end
if (not SmartBuffItemSpellCache.itemIDs) then SmartBuffItemSpellCache.itemIDs = {}; end
if (not SmartBuffItemSpellCache.itemData) then SmartBuffItemSpellCache.itemData = {}; end
if (not SmartBuffItemSpellCache.needsRefresh) then SmartBuffItemSpellCache.needsRefresh = {}; end
SmartBuffItemSpellCache.items[varName] = item;
SmartBuffItemSpellCache.itemIDs[varName] = itemId;
SmartBuffItemSpellCache.itemData[varName] = {minLevel or 0, texture or 0};
SmartBuffItemSpellCache.needsRefresh[varName] = false;
elseif (item) then
-- Item link exists but data incomplete - mark for refresh
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.needsRefresh) then SmartBuffItemSpellCache.needsRefresh = {}; end
SmartBuffItemSpellCache.needsRefresh[varName] = true;
C_Item.RequestLoadItemDataByID(itemId);
else
-- Item not loaded - request loading
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.needsRefresh) then SmartBuffItemSpellCache.needsRefresh = {}; end
SmartBuffItemSpellCache.needsRefresh[varName] = true;
C_Item.RequestLoadItemDataByID(itemId);
end
else
-- Item in cache - still request background refresh
if (cache.needsRefresh and cache.needsRefresh[varName]) then
C_Item.RequestLoadItemDataByID(itemId);
end
end
-- Get spell info (use GetSpellInfoDirectIfNeeded pattern)
-- Item spells (flasks/potions/toys) are NOT spellbook spells - don't use spellbook check
local spellVarName = "SMARTBUFF_DYNAMIC_SPELL_" .. tostring(spellId);
if (SMARTBUFF_ExpectedData and SMARTBUFF_ExpectedData.spells) then
SMARTBUFF_ExpectedData.spells[spellVarName] = spellId;
if (not SMARTBUFF_ExpectedData.spellIDToVarName) then SMARTBUFF_ExpectedData.spellIDToVarName = {}; end
SMARTBUFF_ExpectedData.spellIDToVarName[spellId] = spellVarName;
end
local spell = nil;
if (cache and cache.version and cache.spells and cache.spells[spellVarName]) then
spell = cache.spells[spellVarName];
end
if (not spell) then
spell = C_Spell.GetSpellInfo(spellId);
if (spell and SMARTBUFF_ValidateSpellData(spell)) then
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.spells) then SmartBuffItemSpellCache.spells = {}; end
if (not SmartBuffItemSpellCache.needsRefresh) then SmartBuffItemSpellCache.needsRefresh = {}; end
SmartBuffItemSpellCache.spells[spellVarName] = spell;
SmartBuffItemSpellCache.needsRefresh[spellVarName] = false;
elseif (spell) then
-- Spell exists but incomplete - mark for refresh
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.needsRefresh) then SmartBuffItemSpellCache.needsRefresh = {}; end
SmartBuffItemSpellCache.needsRefresh[spellVarName] = true;
C_Spell.RequestLoadSpellData(spellId);
else
-- Spell not loaded - request loading
SMARTBUFF_InitItemSpellCache();
if (not SmartBuffItemSpellCache.needsRefresh) then SmartBuffItemSpellCache.needsRefresh = {}; end
SmartBuffItemSpellCache.needsRefresh[spellVarName] = true;
C_Spell.RequestLoadSpellData(spellId);
end
end
-- Accept partial data (AllTheThings pattern) - add item even if data isn't fully loaded yet
-- Data will be updated when ITEM_DATA_LOAD_RESULT/SPELL_DATA_LOAD_RESULT fires
if (item) then
-- ItemLink available - use it
local spellToAdd = spell;
if (not spellToAdd and spellId) then
-- Spell not loaded yet - use spellId as placeholder, will be resolved by event system
spellToAdd = spellId;
end
--print("Item found: "..item..", "..tostring(spellToAdd));
tinsert(t, {item, duration, type, nil, spellToAdd, link});
elseif (itemId) then
-- ItemLink not loaded yet - use itemId as placeholder, will be resolved by event system
-- This ensures toys/items are added even if itemLink isn't available immediately
local itemPlaceholder = "item:" .. tostring(itemId);
local spellToAdd = spell;
if (not spellToAdd and spellId) then
spellToAdd = spellId;
end
tinsert(t, {itemPlaceholder, duration, type, nil, spellToAdd, link});
end
-- If neither item nor itemId is available, skip adding (will be added when data loads via events)
end
local function AddItem(itemId, spellId, duration, link)
InsertItem(SMARTBUFF_SCROLL, SMARTBUFF_CONST_SCROLL, itemId, spellId, duration, link);
end
-- ---------------------------------------------------------------------------
-- Toybox: load collected toys into S.Toybox / S.ToyboxByID for TOY buff type
-- Uses C_ToyBox; restores from SmartBuffToyCache when valid, then refreshes from live.
-- ---------------------------------------------------------------------------
function SMARTBUFF_LoadToys()
-- Populate S.Toybox (by link) and S.ToyboxByID (by itemID) from C_ToyBox; restore from cache first, then override with live data.
local cache = SmartBuffToyCache;
local nLearned = C_ToyBox.GetNumLearnedDisplayedToys() or 0;
-- Skip full reload if cache is valid and learned toy count matches (avoids re-scanning C_ToyBox every init)
if (cache and cache.version and cache.toyCount > 0) then
local currentToyCount = 0;
if (S.Toybox) then
for _ in pairs(S.Toybox) do
currentToyCount = currentToyCount + 1;
end
end
if (currentToyCount == cache.toyCount and currentToyCount == nLearned and nLearned > 0) then
SMARTBUFF_AddMsgD("Toys already loaded and verified (cached: " .. cache.toyCount .. ")");
return;
end
end
-- Clear and restore from cache first (fallback pattern - AllTheThings: use cache when live data not available)
wipe(S.Toybox);
wipe(S.ToyboxByID);
-- Cache format: new [toyID]=icon; legacy [itemLink]={toyID,icon}. Build toyIDToCachedLink for placeholders.
local toyIDToCachedLink = {};
if (cache and cache.version and cache.toybox) then
for k, v in pairs(cache.toybox) do
local id, icon, linkKey;
if (type(v) == "table") then
id, icon = v[1], v[2];
linkKey = k;
else
id, icon = k, v;
linkKey = "item:" .. tostring(id);
end
local entry = {id, icon};
S.Toybox[linkKey] = entry;
S.ToyboxByID[id] = entry;
toyIDToCachedLink[id] = linkKey;
end
end
-- Reset toybox filters so indexing sees all toys (user may have e.g. expansion source set to none)
if (C_ToyBoxInfo and C_ToyBoxInfo.SetDefaultFilters) then
C_ToyBoxInfo.SetDefaultFilters();
end
C_ToyBox.SetCollectedShown(true);
C_ToyBox.SetAllSourceTypeFilters(true);
C_ToyBox.SetFilterString("");
local nTotal = C_ToyBox.GetNumTotalDisplayedToys();
if (nLearned <= 0) then
return;
end
-- Load toys from live data, updating/overriding cached entries when available
for i = 1, nTotal do
local num = C_ToyBox.GetToyFromIndex(i);
local id, name, icon = C_ToyBox.GetToyInfo(num);
if (id and PlayerHasToy(id)) then
local _, itemLink = C_Item.GetItemInfo(id);
if (itemLink) then
local entry = {id, icon};
S.Toybox[tostring(itemLink)] = entry;
S.ToyboxByID[id] = entry;
else
C_Item.RequestLoadItemDataByID(id);
local cachedLink = toyIDToCachedLink[id];
local cachedIcon = (cache and cache.toybox) and (cache.toybox[id] or (type(cache.toybox[cachedLink]) == "table" and cache.toybox[cachedLink][2]));
local entry = {id, icon or cachedIcon};
S.Toybox[cachedLink or ("item:" .. tostring(id))] = entry;
S.ToyboxByID[id] = entry;
end
end
end
SMARTBUFF_AddMsgD("Toys initialized");
end
-- ---------------------------------------------------------------------------
-- Init: item list (stones, oils, food items, scroll table, toys)
-- ---------------------------------------------------------------------------
function SMARTBUFF_InitItemList()
-- Weapon enhancements: mana gems, sharpening stones, weightstones, oils (classic → TWW)
-- Only call API if variable is not already set (optimization: skip if already loaded and verified)
GetItemInfoIfNeeded("SMARTBUFF_MANAGEM", 36799); --"Mana Gem"
GetItemInfoIfNeeded("SMARTBUFF_BRILLIANTMANAGEM", 81901); --"Brilliant Mana Gem"
GetItemInfoIfNeeded("SMARTBUFF_SSROUGH", 2862); --"Rough Sharpening Stone"
GetItemInfoIfNeeded("SMARTBUFF_SSCOARSE", 2863); --"Coarse Sharpening Stone"
GetItemInfoIfNeeded("SMARTBUFF_SSHEAVY", 2871); --"Heavy Sharpening Stone"
GetItemInfoIfNeeded("SMARTBUFF_SSSOLID", 7964); --"Solid Sharpening Stone"
GetItemInfoIfNeeded("SMARTBUFF_SSDENSE", 12404); --"Dense Sharpening Stone"
GetItemInfoIfNeeded("SMARTBUFF_SSELEMENTAL", 18262); --"Elemental Sharpening Stone"
GetItemInfoIfNeeded("SMARTBUFF_SSFEL", 23528); --"Fel Sharpening Stone"
GetItemInfoIfNeeded("SMARTBUFF_SSADAMANTITE", 23529); --"Adamantite Sharpening Stone"
GetItemInfoIfNeeded("SMARTBUFF_WSROUGH", 3239); --"Rough Weightstone"
GetItemInfoIfNeeded("SMARTBUFF_WSCOARSE", 3240); --"Coarse Weightstone"
GetItemInfoIfNeeded("SMARTBUFF_WSHEAVY", 3241); --"Heavy Weightstone"
GetItemInfoIfNeeded("SMARTBUFF_WSSOLID", 7965); --"Solid Weightstone"
GetItemInfoIfNeeded("SMARTBUFF_WSDENSE", 12643); --"Dense Weightstone"
GetItemInfoIfNeeded("SMARTBUFF_WSFEL", 28420); --"Fel Weightstone"
GetItemInfoIfNeeded("SMARTBUFF_WSADAMANTITE", 28421); --"Adamantite Weightstone"
GetItemInfoIfNeeded("SMARTBUFF_SHADOWOIL", 3824); --"Shadow Oil"
GetItemInfoIfNeeded("SMARTBUFF_FROSTOIL", 3829); --"Frost Oil"
GetItemInfoIfNeeded("SMARTBUFF_MANAOIL1", 20745); --"Minor Mana Oil"
GetItemInfoIfNeeded("SMARTBUFF_MANAOIL2", 20747); --"Lesser Mana Oil"
GetItemInfoIfNeeded("SMARTBUFF_MANAOIL3", 20748); --"Brilliant Mana Oil"
GetItemInfoIfNeeded("SMARTBUFF_MANAOIL4", 22521); --"Superior Mana Oil"
GetItemInfoIfNeeded("SMARTBUFF_WIZARDOIL1", 20744); --"Minor Wizard Oil"
GetItemInfoIfNeeded("SMARTBUFF_WIZARDOIL2", 20746); --"Lesser Wizard Oil"
GetItemInfoIfNeeded("SMARTBUFF_WIZARDOIL3", 20750); --"Wizard Oil"
GetItemInfoIfNeeded("SMARTBUFF_WIZARDOIL4", 20749); --"Brilliant Wizard Oil"
GetItemInfoIfNeeded("SMARTBUFF_WIZARDOIL5", 22522); --"Superior Wizard Oil"
GetItemInfoIfNeeded("SMARTBUFF_SHADOWCOREOIL", 171285); --"Shadowcore Oil"
GetItemInfoIfNeeded("SMARTBUFF_EMBALMERSOIL", 171286); --"Embalmer's Oil"
-- Dragonflight
GetItemInfoIfNeeded("SMARTBUFF_SafeRockets_q1", 198160); -- Completely Safe Rockets (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_SafeRockets_q2", 198161); -- Completely Safe Rockets (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_SafeRockets_q3", 198162); -- Completely Safe Rockets (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_BuzzingRune_q1", 194821); -- Buzzing Rune (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_BuzzingRune_q2", 194822); -- Buzzing Rune (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_BuzzingRune_q3", 194823); -- Buzzing Rune (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_ChirpingRune_q1", 194824); -- Chirping Rune (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_ChirpingRune_q2", 194825); -- Chirping Rune (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_ChirpingRune_q3", 194826); -- Chirping Rune (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_HowlingRune_q1", 194821); -- Howling Rune (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_HowlingRune_q2", 194822); -- Howling Rune (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_HowlingRune_q3", 194820); -- Howling Rune (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_PrimalWeighstone_q1", 191943); -- Primal Weighstone (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_PrimalWeighstone_q2", 191944); -- Primal Weighstone (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_PrimalWeighstone_q3", 191945); -- Primal Weighstone (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_PrimalWhetstone_q1", 191933); -- Primal Whestone (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_PrimalWhetstone_q2", 191939); -- Primal Whestone (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_PrimalWhetstone_q3", 191940); -- Primal Whestone (Quality 3)
-- The War Within
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance1_q1", 222503); -- Ironclaw Razorstone
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance1_q2", 222504); -- Ironclaw Razorstone
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance1_q3", 222505); -- Ironclaw Razorstone
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance2_q1", 222506); -- Ironclaw Weightstone
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance2_q2", 222506); -- Ironclaw Weightstone
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance2_q3", 222507); -- Ironclaw Weightstone
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance3_q1", 222508); -- Ironclaw Whetstone
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance3_q2", 222509); -- Ironclaw Whetstone
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance3_q3", 222510); -- Ironclaw Whetstone
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance4_q1", 224108); -- Oil of Beledar's Grace
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance4_q2", 224109); -- Oil of Beledar's Grace
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance4_q3", 224110); -- Oil of Beledar's Grace
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance5_q1", 224111); -- Oil of Deep Toxins
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance5_q2", 224112); -- Oil of Deep Toxins
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance5_q3", 224113); -- Oil of Deep Toxins
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance6_q1", 224105); -- Algari Mana Oil
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance6_q2", 224106); -- Algari Mana Oil
GetItemInfoIfNeeded("SMARTBUFF_TWWWeaponEnhance6_q3", 224107); -- Algari Mana Oil
-- Food (well-fed) item vars
-- SMARTBUFF_KIBLERSBITS = C_Item.GetItemInfo(33874); --"Kibler's Bits"
-- SMARTBUFF_STORMCHOPS = C_Item.GetItemInfo(33866); --"Stormchops"
GetItemInfoIfNeeded("SMARTBUFF_JUICYBEARBURGER", 35565); --"Juicy Bear Burger"
GetItemInfoIfNeeded("SMARTBUFF_CRUNCHYSPIDER", 22645); --"Crunchy Spider Surprise"
GetItemInfoIfNeeded("SMARTBUFF_LYNXSTEAK", 27635); --"Lynx Steak"
GetItemInfoIfNeeded("SMARTBUFF_CHARREDBEARKABOBS", 35563); --"Charred Bear Kabobs"
GetItemInfoIfNeeded("SMARTBUFF_BATBITES", 27636); --"Bat Bites"
GetItemInfoIfNeeded("SMARTBUFF_ROASTEDMOONGRAZE", 24105); --"Roasted Moongraze Tenderloin"
GetItemInfoIfNeeded("SMARTBUFF_MOKNATHALSHORTRIBS", 31672); --"Mok'Nathal Shortribs"
GetItemInfoIfNeeded("SMARTBUFF_CRUNCHYSERPENT", 31673); --"Crunchy Serpent"
GetItemInfoIfNeeded("SMARTBUFF_ROASTEDCLEFTHOOF", 27658); --"Roasted Clefthoof"
GetItemInfoIfNeeded("SMARTBUFF_FISHERMANSFEAST", 33052); --"Fisherman's Feast"
GetItemInfoIfNeeded("SMARTBUFF_WARPBURGER", 27659); --"Warp Burger"
GetItemInfoIfNeeded("SMARTBUFF_RAVAGERDOG", 27655); --"Ravager Dog"
GetItemInfoIfNeeded("SMARTBUFF_SKULLFISHSOUP", 33825); --"Skullfish Soup"
GetItemInfoIfNeeded("SMARTBUFF_BUZZARDBITES", 27651); --"Buzzard Bites"
GetItemInfoIfNeeded("SMARTBUFF_TALBUKSTEAK", 27660); --"Talbuk Steak"
GetItemInfoIfNeeded("SMARTBUFF_GOLDENFISHSTICKS", 27666); --"Golden Fish Sticks"
GetItemInfoIfNeeded("SMARTBUFF_SPICYHOTTALBUK", 33872); --"Spicy Hot Talbuk"
GetItemInfoIfNeeded("SMARTBUFF_FELTAILDELIGHT", 27662); --"Feltail Delight"
GetItemInfoIfNeeded("SMARTBUFF_BLACKENEDSPOREFISH", 27663); --"Blackened Sporefish"
GetItemInfoIfNeeded("SMARTBUFF_HOTAPPLECIDER", 34411); --"Hot Apple Cider"
GetItemInfoIfNeeded("SMARTBUFF_BROILEDBLOODFIN", 33867); --"Broiled Bloodfin"
GetItemInfoIfNeeded("SMARTBUFF_SPICYCRAWDAD", 27667); --"Spicy Crawdad"
GetItemInfoIfNeeded("SMARTBUFF_POACHEDBLUEFISH", 27665); --"Poached Bluefish"
GetItemInfoIfNeeded("SMARTBUFF_BLACKENEDBASILISK", 27657); --"Blackened Basilisk"
GetItemInfoIfNeeded("SMARTBUFF_GRILLEDMUDFISH", 27664); --"Grilled Mudfish"
GetItemInfoIfNeeded("SMARTBUFF_CLAMBAR", 30155); --"Clam Bar"
GetItemInfoIfNeeded("SMARTBUFF_SAGEFISHDELIGHT", 21217); --"Sagefish Delight"
GetItemInfoIfNeeded("SMARTBUFF_SALTPEPPERSHANK", 133557); --"Salt & Pepper Shank"
GetItemInfoIfNeeded("SMARTBUFF_PICKLEDSTORMRAY", 133562); --"Pickled Stormray"
GetItemInfoIfNeeded("SMARTBUFF_DROGBARSTYLESALMON", 133569); --"Drogbar-Style Salmon"
GetItemInfoIfNeeded("SMARTBUFF_BARRACUDAMRGLGAGH", 133567); --"Barracuda Mrglgagh"
GetItemInfoIfNeeded("SMARTBUFF_FIGHTERCHOW", 133577); --"Fighter Chow"
GetItemInfoIfNeeded("SMARTBUFF_FARONAARFIZZ", 133563); --"Faronaar Fizz"
GetItemInfoIfNeeded("SMARTBUFF_BEARTARTARE", 133576); --"Bear Tartare"
GetItemInfoIfNeeded("SMARTBUFF_LEGIONCHILI", 118428); --"Legion Chili"
GetItemInfoIfNeeded("SMARTBUFF_DEEPFRIEDMOSSGILL", 133561); --"Deep-Fried Mossgill"
GetItemInfoIfNeeded("SMARTBUFF_MONDAZI", 154885); --"Mon'Dazi"
GetItemInfoIfNeeded("SMARTBUFF_KULTIRAMISU", 154881); --"Kul Tiramisu"
GetItemInfoIfNeeded("SMARTBUFF_GRILLEDCATFISH", 154889); --"Grilled Catfish"
GetItemInfoIfNeeded("SMARTBUFF_LOALOAF", 154887); --"Loa Loaf"
GetItemInfoIfNeeded("SMARTBUFF_HONEYHAUNCHES", 154882); --"Honey-Glazed Haunches"
GetItemInfoIfNeeded("SMARTBUFF_RAVENBERRYTARTS", 154883); --"Ravenberry Tarts"
GetItemInfoIfNeeded("SMARTBUFF_SWAMPFISHNCHIPS", 154884); --"Swamp Fish 'n Chips"
GetItemInfoIfNeeded("SMARTBUFF_SEASONEDLOINS", 154891); --"Seasoned Loins"
GetItemInfoIfNeeded("SMARTBUFF_SAILORSPIE", 154888); --"Sailor's Pie"
GetItemInfoIfNeeded("SMARTBUFF_SPICEDSNAPPER", 154886); --"Spiced Snapper"
--_,SMARTBUFF_HEARTSBANEHEXWURST = C_Item.GetItemInfo(163781); --"Heartsbane Hexwurst"
GetItemInfoIfNeeded("SMARTBUFF_ABYSSALFRIEDRISSOLE", 168311); --"Abyssal-Fried Rissole"
GetItemInfoIfNeeded("SMARTBUFF_BAKEDPORTTATO", 168313); --"Baked Port Tato"
GetItemInfoIfNeeded("SMARTBUFF_BILTONG", 168314); --"Bil'Tong"
GetItemInfoIfNeeded("SMARTBUFF_BIGMECH", 168310); --"Mech-Dowel's 'Big Mech'"
GetItemInfoIfNeeded("SMARTBUFF_FRAGRANTKAKAVIA", 168312); --"Fragrant Kakavia"
GetItemInfoIfNeeded("SMARTBUFF_BANANABEEFPUDDING", 172069); --"Banana Beef Pudding"
GetItemInfoIfNeeded("SMARTBUFF_BUTTERSCOTCHRIBS", 172040); --"Butterscotch Marinated Ribs"
GetItemInfoIfNeeded("SMARTBUFF_CINNAMONBONEFISH", 172044); --"Cinnamon Bonefish Stew"
GetItemInfoIfNeeded("SMARTBUFF_EXTRALEMONYFILET", 184682); --"Extra Lemony Herb Filet"
GetItemInfoIfNeeded("SMARTBUFF_FRIEDBONEFISH", 172063); --"Friedn Bonefish"
GetItemInfoIfNeeded("SMARTBUFF_IRIDESCENTRAVIOLI", 172049); --"Iridescent Ravioli with Apple Sauce"
GetItemInfoIfNeeded("SMARTBUFF_MEATYAPPLEDUMPLINGS", 172048); --"Meaty Apple Dumplings"
GetItemInfoIfNeeded("SMARTBUFF_PICKLEDMEATSMOOTHIE", 172068); --"Pickled Meat Smoothie"
GetItemInfoIfNeeded("SMARTBUFF_SERAPHTENDERS", 172061); --"Seraph Tenders"
GetItemInfoIfNeeded("SMARTBUFF_SPINEFISHSOUFFLE", 172041); --"Spinefish Souffle and Fries"
GetItemInfoIfNeeded("SMARTBUFF_STEAKALAMODE", 172051); --"Steak ala Mode"
GetItemInfoIfNeeded("SMARTBUFF_SWEETSILVERGILL", 172050); --"Sweet Silvergill Sausages"
GetItemInfoIfNeeded("SMARTBUFF_TENEBROUSCROWNROAST", 172045); --"Tenebrous Crown Roast Aspic"
-- Dragonflight
GetItemInfoIfNeeded("SMARTBUFF_TimelyDemise", 197778); -- Timely Demise (70 Haste)
GetItemInfoIfNeeded("SMARTBUFF_FiletOfFangs", 197779); -- Filet of Fangs (70 Crit)
GetItemInfoIfNeeded("SMARTBUFF_SeamothSurprise", 197780); -- Seamoth Surprise (70 Vers)
GetItemInfoIfNeeded("SMARTBUFF_SaltBakedFishcake", 197781); -- Salt-Baked Fishcake (70 Mastery)
GetItemInfoIfNeeded("SMARTBUFF_FeistyFishSticks", 197782); -- Feisty Fish Sticks (45 Haste/Crit)
GetItemInfoIfNeeded("SMARTBUFF_SeafoodPlatter", 197783); -- Aromatic Seafood Platter (45 Haste/Vers)
GetItemInfoIfNeeded("SMARTBUFF_SeafoodMedley", 197784); -- Sizzling Seafood Medley (45 Haste/Mastery)
GetItemInfoIfNeeded("SMARTBUFF_RevengeServedCold", 197785); -- Revenge, Served Cold (45 Crit/Verst)
GetItemInfoIfNeeded("SMARTBUFF_Tongueslicer", 197786); -- Thousandbone Tongueslicer (45 Crit/Mastery)
GetItemInfoIfNeeded("SMARTBUFF_GreatCeruleanSea", 197787); -- Great Cerulean Sea (45 Vers/Mastery)
GetItemInfoIfNeeded("SMARTBUFF_FatedFortuneCookie", 197792); -- Fated Fortune Cookie (76 primary stat)
GetItemInfoIfNeeded("SMARTBUFF_KaluakBanquet", 197794); -- Feast: Grand Banquet of the Kalu'ak (76 primary stat)
GetItemInfoIfNeeded("SMARTBUFF_HoardOfDelicacies", 197795); -- Feast: Hoard of Draconic Delicacies (76 primary stat)
GetItemInfoIfNeeded("SMARTBUFF_DeviouslyDeviledEgg", 204072); -- Deviously Deviled Eggs
-- Well-fed food: item ID list (S.FoodItems) for buff checks (TWW / Midnight focus; legacy IDs commented)
S.FoodItems = GetItems({
-- WotLK -- Deprecating
-- 39691, 34125, 42779, 42997, 42998, 42999, 43000, 34767, 42995, 34769, 34754, 34758, 34766, 42994, 42996, 34756, 34768, 42993, 34755, 43001, 34757, 34752, 34751, 34750, 34749, 34764, 34765, 34763, 34762, 42942, 43268, 34748,
-- CT -- Deprecating
-- 62651, 62652, 62653, 62654, 62655, 62656, 62657, 62658, 62659, 62660, 62661, 62662, 62663, 62664, 62665, 62666, 62667, 62668, 62669, 62670, 62671, 62649,
-- MoP -- Deprecating
-- 74645, 74646, 74647, 74648, 74649, 74650, 74652, 74653, 74655, 74656, 86069, 86070, 86073, 86074, 81400, 81401, 81402, 81403, 81404, 81405, 81406, 81408, 81409, 81410, 81411, 81412, 81413, 81414,
-- WoD -- Deprecating
-- 111431, 111432, 111433, 111434, 111435, 111436, 111437, 111438, 111439, 111440, 11441, 111442, 111443, 111444, 111445, 111446, 111447, 111448, 111449, 111450, 111451, 111452, 111453, 111454,127991, 111457, 111458, 118576,
-- TWW almost all food items
222733, 222728, 222732, 222720, 222735, 222731, 222721, 222730, 225855, 222729, 225592, 222736, 222726, 222718, 222724, 222745, 222725, 222703, 222715, 222710, 222712, 222704,
222727, 222722, 222711, 222705, 222708, 222707, 223968, 222713, 222723, 222714, 222702, 222709, 222719, 222717, 222716, 222706,
-- TWW adds hearty food version to 31 the above foods that make it persist through death
222781, 222766, 222776, 222780, 222778, 222768, 222783, 222779, 222751, 222773, 222753, 222774, 222752, 222758, 222770, 222775, 222777, 222759,
222760, 222765, 222763, 222769, 222761, 222772, 222757, 222762, 222754, 222755, 222756, 222767, 222750, 222764, 222771,
-- Midnight
241316, 241312, 241310, 241314, 241318,
});
-- Warlock healthstones
GetItemInfoIfNeeded("SMARTBUFF_HEALTHSTONE", 5512); --"Healthstone"
GetItemInfoIfNeeded("SMARTBUFF_DEMONICHEALTHSTONE", 224464); --"Demonic Healthstone"
S.StoneWarlock = GetItems({5512, 224464});
-- Conjured mage food IDs
GetItemInfoIfNeeded("SMARTBUFF_CONJUREDMANA", 113509); --"Conjured Mana Buns"
S.FoodMage = GetItems({113509, 80618, 80610, 65499, 43523, 43518, 34062, 65517, 65516, 65515, 65500, 42955});
--_,SMARTBUFF_BCPETFOOD1 = C_Item.GetItemInfo(33874); --"Kibler's Bits (Pet food)"
--_,SMARTBUFF_WOTLKPETFOOD1 = C_Item.GetItemInfo(43005); --"Spiced Mammoth Treats (Pet food)"
-- Scroll table: register scroll item vars, then build SMARTBUFF_SCROLL via AddItem(...) below
-- Scrolls: Agility, Intellect, Stamina, Spirit, Strength, Protection (I–IX)
GetItemInfoIfNeeded("SMARTBUFF_SOAGILITY1", 3012); --"Scroll of Agility I"
GetItemInfoIfNeeded("SMARTBUFF_SOAGILITY2", 1477); --"Scroll of Agility II"
GetItemInfoIfNeeded("SMARTBUFF_SOAGILITY3", 4425); --"Scroll of Agility III"
GetItemInfoIfNeeded("SMARTBUFF_SOAGILITY4", 10309); --"Scroll of Agility IV"
GetItemInfoIfNeeded("SMARTBUFF_SOAGILITY5", 27498); --"Scroll of Agility V"
GetItemInfoIfNeeded("SMARTBUFF_SOAGILITY6", 33457); --"Scroll of Agility VI"
GetItemInfoIfNeeded("SMARTBUFF_SOAGILITY7", 43463); --"Scroll of Agility VII"
GetItemInfoIfNeeded("SMARTBUFF_SOAGILITY8", 43464); --"Scroll of Agility VIII"
GetItemInfoIfNeeded("SMARTBUFF_SOAGILITY9", 63303); --"Scroll of Agility IX"
GetItemInfoIfNeeded("SMARTBUFF_SOINTELLECT1", 955); --"Scroll of Intellect I"
GetItemInfoIfNeeded("SMARTBUFF_SOINTELLECT2", 2290); --"Scroll of Intellect II"
GetItemInfoIfNeeded("SMARTBUFF_SOINTELLECT3", 4419); --"Scroll of Intellect III"
GetItemInfoIfNeeded("SMARTBUFF_SOINTELLECT4", 10308); --"Scroll of Intellect IV"
GetItemInfoIfNeeded("SMARTBUFF_SOINTELLECT5", 27499); --"Scroll of Intellect V"
GetItemInfoIfNeeded("SMARTBUFF_SOINTELLECT6", 33458); --"Scroll of Intellect VI"
GetItemInfoIfNeeded("SMARTBUFF_SOINTELLECT7", 37091); --"Scroll of Intellect VII"
GetItemInfoIfNeeded("SMARTBUFF_SOINTELLECT8", 37092); --"Scroll of Intellect VIII"
GetItemInfoIfNeeded("SMARTBUFF_SOINTELLECT9", 63305); --"Scroll of Intellect IX"
GetItemInfoIfNeeded("SMARTBUFF_SOSTAMINA1", 1180); --"Scroll of Stamina I"
GetItemInfoIfNeeded("SMARTBUFF_SOSTAMINA2", 1711); --"Scroll of Stamina II"
GetItemInfoIfNeeded("SMARTBUFF_SOSTAMINA3", 4422); --"Scroll of Stamina III"
GetItemInfoIfNeeded("SMARTBUFF_SOSTAMINA4", 10307); --"Scroll of Stamina IV"
GetItemInfoIfNeeded("SMARTBUFF_SOSTAMINA5", 27502); --"Scroll of Stamina V"
GetItemInfoIfNeeded("SMARTBUFF_SOSTAMINA6", 33461); --"Scroll of Stamina VI"
GetItemInfoIfNeeded("SMARTBUFF_SOSTAMINA7", 37093); --"Scroll of Stamina VII"
GetItemInfoIfNeeded("SMARTBUFF_SOSTAMINA8", 37094); --"Scroll of Stamina VIII"
GetItemInfoIfNeeded("SMARTBUFF_SOSTAMINA9", 63306); --"Scroll of Stamina IX"
GetItemInfoIfNeeded("SMARTBUFF_SOSPIRIT1", 1181); --"Scroll of Spirit I"
GetItemInfoIfNeeded("SMARTBUFF_SOSPIRIT2", 1712); --"Scroll of Spirit II"
GetItemInfoIfNeeded("SMARTBUFF_SOSPIRIT3", 4424); --"Scroll of Spirit III"
GetItemInfoIfNeeded("SMARTBUFF_SOSPIRIT4", 10306); --"Scroll of Spirit IV"
GetItemInfoIfNeeded("SMARTBUFF_SOSPIRIT5", 27501); --"Scroll of Spirit V"
GetItemInfoIfNeeded("SMARTBUFF_SOSPIRIT6", 33460); --"Scroll of Spirit VI"
GetItemInfoIfNeeded("SMARTBUFF_SOSPIRIT7", 37097); --"Scroll of Spirit VII"
GetItemInfoIfNeeded("SMARTBUFF_SOSPIRIT8", 37098); --"Scroll of Spirit VIII"
GetItemInfoIfNeeded("SMARTBUFF_SOSPIRIT9", 63307); --"Scroll of Spirit IX"
GetItemInfoIfNeeded("SMARTBUFF_SOSTRENGHT1", 954); --"Scroll of Strength I"
GetItemInfoIfNeeded("SMARTBUFF_SOSTRENGHT2", 2289); --"Scroll of Strength II"
GetItemInfoIfNeeded("SMARTBUFF_SOSTRENGHT3", 4426); --"Scroll of Strength III"
GetItemInfoIfNeeded("SMARTBUFF_SOSTRENGHT4", 10310); --"Scroll of Strength IV"
GetItemInfoIfNeeded("SMARTBUFF_SOSTRENGHT5", 27503); --"Scroll of Strength V"
GetItemInfoIfNeeded("SMARTBUFF_SOSTRENGHT6", 33462); --"Scroll of Strength VI"
GetItemInfoIfNeeded("SMARTBUFF_SOSTRENGHT7", 43465); --"Scroll of Strength VII"
GetItemInfoIfNeeded("SMARTBUFF_SOSTRENGHT8", 43466); --"Scroll of Strength VIII"
GetItemInfoIfNeeded("SMARTBUFF_SOSTRENGHT9", 63304); --"Scroll of Strength IX"
GetItemInfoIfNeeded("SMARTBUFF_SOPROTECTION9", 63308); --"Scroll of Protection IX"
-- Misc consumables and one-off items (augment runes, toys, etc.; some used in SMARTBUFF_SCROLL)
GetItemInfoIfNeeded("SMARTBUFF_MiscItem1", 178512); --"Celebration Package"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem2", 44986); --"Warts-B-Gone Lip Balm"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem3", 69775); --"Vrykul Drinking Horn"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem4", 86569); --"Crystal of Insanity"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem5", 85500); --"Anglers Fishing Raft"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem6", 85973); --"Ancient Pandaren Fishing Charm"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem7", 94604); --"Burning Seed"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem9", 92738); --"Safari Hat"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem10", 110424); --"Savage Safari Hat"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem11", 118922); --"Oralius' Whispering Crystal"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem12", 129192); --"Inquisitor's Menacing Eye"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem13", 129210); --"Fel Crystal Fragments"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem14", 128475); --"Empowered Augment Rune"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem15", 128482); --"Empowered Augment Rune"
GetItemInfoIfNeeded("SMARTBUFF_MiscItem17", 147707); --"Repurposed Fel Focuser"
--Shadowlands
GetItemInfoIfNeeded("SMARTBUFF_AugmentRune", 190384); --"Eternal Augment Rune"
GetItemInfoIfNeeded("SMARTBUFF_VieledAugment", 181468); --"Veiled Augment Rune"
GetItemInfoIfNeeded("SMARTBUFF_DreamAugmentRune", 211495); --"Dreambound Augment Rune"
--Dragonflight
GetItemInfoIfNeeded("SMARTBUFF_DraconicRune", 201325); -- Draconic Augment Rune
GetItemInfoIfNeeded("SMARTBUFF_VantusRune_VotI_q1", 198491); -- Vantus Rune: Vault of the Incarnates (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_VantusRune_VotI_q2", 198492); -- Vantus Rune: Vault of the Incarnates (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_VantusRune_VotI_q3", 198493); -- Vantus Rune: Vault of the Incarnates (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FLASKTBC1", 22854); --"Flask of Relentless Assault"
GetItemInfoIfNeeded("SMARTBUFF_FLASKTBC2", 22866); --"Flask of Pure Death"
GetItemInfoIfNeeded("SMARTBUFF_FLASKTBC3", 22851); --"Flask of Fortification"
GetItemInfoIfNeeded("SMARTBUFF_FLASKTBC4", 22861); --"Flask of Blinding Light"
GetItemInfoIfNeeded("SMARTBUFF_FLASKTBC5", 22853); --"Flask of Mighty Versatility"
GetItemInfoIfNeeded("SMARTBUFF_FLASK1", 46377); --"Flask of Endless Rage"
GetItemInfoIfNeeded("SMARTBUFF_FLASK2", 46376); --"Flask of the Frost Wyrm"
GetItemInfoIfNeeded("SMARTBUFF_FLASK3", 46379); --"Flask of Stoneblood"
GetItemInfoIfNeeded("SMARTBUFF_FLASK4", 46378); --"Flask of Pure Mojo"
GetItemInfoIfNeeded("SMARTBUFF_FLASKCT1", 58087); --"Flask of the Winds"
GetItemInfoIfNeeded("SMARTBUFF_FLASKCT2", 58088); --"Flask of Titanic Strength"
GetItemInfoIfNeeded("SMARTBUFF_FLASKCT3", 58086); --"Flask of the Draconic Mind"
GetItemInfoIfNeeded("SMARTBUFF_FLASKCT4", 58085); --"Flask of Steelskin"
GetItemInfoIfNeeded("SMARTBUFF_FLASKCT5", 67438); --"Flask of Flowing Water"
GetItemInfoIfNeeded("SMARTBUFF_FLASKCT7", 65455); --"Flask of Battle"
GetItemInfoIfNeeded("SMARTBUFF_FLASKMOP1", 75525); --"Alchemist's Flask"
GetItemInfoIfNeeded("SMARTBUFF_FLASKMOP2", 76087); --"Flask of the Earth"
GetItemInfoIfNeeded("SMARTBUFF_FLASKMOP3", 76086); --"Flask of Falling Leaves"
GetItemInfoIfNeeded("SMARTBUFF_FLASKMOP4", 76084); --"Flask of Spring Blossoms"
GetItemInfoIfNeeded("SMARTBUFF_FLASKMOP5", 76085); --"Flask of the Warm Sun"
GetItemInfoIfNeeded("SMARTBUFF_FLASKMOP6", 76088); --"Flask of Winter's Bite"
GetItemInfoIfNeeded("SMARTBUFF_FLASKWOD1", 109152); --"Draenic Stamina Flask"
GetItemInfoIfNeeded("SMARTBUFF_FLASKWOD2", 109148); --"Draenic Strength Flask"
GetItemInfoIfNeeded("SMARTBUFF_FLASKWOD3", 109147); --"Draenic Intellect Flask"
GetItemInfoIfNeeded("SMARTBUFF_FLASKWOD4", 109145); --"Draenic Agility Flask"
GetItemInfoIfNeeded("SMARTBUFF_GRFLASKWOD1", 109160); --"Greater Draenic Stamina Flask"
GetItemInfoIfNeeded("SMARTBUFF_GRFLASKWOD2", 109156); --"Greater Draenic Strength Flask"
GetItemInfoIfNeeded("SMARTBUFF_GRFLASKWOD3", 109155); --"Greater Draenic Intellect Flask"
GetItemInfoIfNeeded("SMARTBUFF_GRFLASKWOD4", 109153); --"Greater Draenic Agility Flask"
GetItemInfoIfNeeded("SMARTBUFF_FLASKLEG1", 127850); --"Flask of Ten Thousand Scars"
GetItemInfoIfNeeded("SMARTBUFF_FLASKLEG2", 127849); --"Flask of the Countless Armies"
GetItemInfoIfNeeded("SMARTBUFF_FLASKLEG3", 127847); --"Flask of the Whispered Pact"
GetItemInfoIfNeeded("SMARTBUFF_FLASKLEG4", 127848); --"Flask of the Seventh Demon"
GetItemInfoIfNeeded("SMARTBUFF_FLASKBFA1", 152639); --"Flask of Endless Fathoms"
GetItemInfoIfNeeded("SMARTBUFF_FLASKBFA2", 152638); --"Flask of the Currents"
GetItemInfoIfNeeded("SMARTBUFF_FLASKBFA3", 152641); --"Flask of the Undertow"
GetItemInfoIfNeeded("SMARTBUFF_FLASKBFA4", 152640); --"Flask of the Vast Horizon"
GetItemInfoIfNeeded("SMARTBUFF_GRFLASKBFA1", 168652); --"Greather Flask of Endless Fathoms"
GetItemInfoIfNeeded("SMARTBUFF_GRFLASKBFA2", 168651); --"Greater Flask of the Currents"
GetItemInfoIfNeeded("SMARTBUFF_GRFLASKBFA3", 168654); --"Greather Flask of teh Untertow"
GetItemInfoIfNeeded("SMARTBUFF_GRFLASKBFA4", 168653); --"Greater Flask of the Vast Horizon"
GetItemInfoIfNeeded("SMARTBUFF_FLASKSL1", 171276); --"Spectral Flask of Power"
GetItemInfoIfNeeded("SMARTBUFF_FLASKSL2", 171278); --"Spectral Flask of Stamina"
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF1_q1", 191318); -- Phial of the Eye in the Storm (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF1_q2", 191319); -- Phial of the Eye in the Storm (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF1_q3", 191320); -- Phial of the Eye in the Storm (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF2_q1", 191321); -- Phial of Still Air (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF2_q2", 191322); -- Phial of Still Air (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF2_q3", 191323); -- Phial of Still Air (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF3_q1", 191324); -- Phial of Icy Preservation (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF3_q2", 191325); -- Phial of Icy Preservation (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF3_q3", 191326); -- Phial of Icy Preservation (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF4_q1", 191327); -- Iced Phial of Corrupting Rage (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF4_q2", 191328); -- Iced Phial of Corrupting Rage (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF4_q3", 191329); -- Iced Phial of Corrupting Rage (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF5_q1", 191330); -- Phial of Charged Isolation (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF5_q2", 191331); -- Phial of Charged Isolation (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF5_q3", 191332); -- Phial of Charged Isolation (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF6_q1", 191333); -- Phial of Glacial Fury (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF6_q2", 191334); -- Phial of Glacial Fury (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF6_q3", 191335); -- Phial of Glacial Fury (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF7_q1", 191336); -- Phial of Static Empowerment (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF7_q2", 191337); -- Phial of Static Empowerment (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF7_q3", 191338); -- Phial of Static Empowerment (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF8_q1", 191339); -- Phial of Tepid Versatility (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF8_q2", 191340); -- Phial of Tepid Versatility (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF8_q3", 191341); -- Phial of Tepid Versatility (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF9_q1", 191342); -- Aerated Phial of Deftness (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF9_q2", 191343); -- Aerated Phial of Deftness (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF9_q3", 191344); -- Aerated Phial of Deftness (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF10_q1", 191345); -- Steaming Phial of Finesse (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF10_q2", 191346); -- Steaming Phial of Finesse (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF10_q3", 191347); -- Steaming Phial of Finesse (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF11_q1", 191348); -- Charged Phial of Alacrity (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF11_q2", 191349); -- Charged Phial of Alacrity (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF11_q3", 191350); -- Charged Phial of Alacrity (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF12_q1", 191354); -- Crystalline Phial of Perception (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF12_q2", 191355); -- Crystalline Phial of Perception (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF12_q3", 191356); -- Crystalline Phial of Perception (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF13_q1", 191357); -- Phial of Elemental Chaos (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF13_q2", 191358); -- Phial of Elemental Chaos (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF13_q3", 191359); -- Phial of Elemental Chaos (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF14_q1", 197720); -- Aerated Phial of Quick Hands (Quality 1)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF14_q2", 197721); -- Aerated Phial of Quick Hands (Quality 2)
GetItemInfoIfNeeded("SMARTBUFF_FlaskDF14_q3", 197722); -- Aerated Phial of Quick Hands (Quality 3)
GetItemInfoIfNeeded("SMARTBUFF_ELIXIRTBC1", 22831); --"Elixir of Major Agility"
GetItemInfoIfNeeded("SMARTBUFF_ELIXIRTBC2", 28104); --"Elixir of Mastery"
GetItemInfoIfNeeded("SMARTBUFF_ELIXIRTBC3", 22825); --"Elixir of Healing Power"