Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-19-17, 12:11 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Storing placeholder value to SV

Hi all,

I would venture to say that my project is on its track.

The one thing that I am concerned is storing spell id into SV.

For my case, the spell id is being a key of the table and it would have some data within its table as well.

Here's a brief example.

Lua Code:
  1. MyAuraTracker = { -- SavedVariable
  2.     ["auraIDList"] = {
  3.         ["*"] = { -- Spec
  4.             ["buffs"] = {
  5.                 [2983] = {
  6.                     -- no filter or unit
  7.                 },
  8.                 [1784] = {
  9.                     ["unit"] = "player",
  10.                 },
  11.                 [1966] = {
  12.                     ["filter"] = "RAID|GROUP",
  13.                 },
  14.             },
  15.             ["debuffs"] = {
  16.                 -- same for debuffs
  17.             },
  18.         },
  19.     },
  20. };

Each spell id could have some data like "filter" and "unit" or it could also have none.
(Those data will be used for querying UnitAura).

Well... tbh, most of auras will have no data.

For 2983 I tried to assign nil, but it wasn't possible to do so .

So, after all, I've resulted in making sub table for it which I think is a waste of resources.

Could anyone please suggest me a better solution?

Thank you!

Last edited by Layback_ : 05-19-17 at 12:44 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Storing placeholder value to SV

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off