Thread: Scripted vars
View Single Post
04-27-11, 03:17 PM   #1
Narinka
A Chromatic Dragonspawn
Join Date: Oct 2008
Posts: 165
Unhappy Scripted vars

Just migrated from 7.4.9 (don't laugh) and from what can see features now use more strict conditions when using vars. If var was not "declared" you can't use it. Quite logical, but I'm sad panda now T T.

Before I had self made "feature" for tracking raid buffs, it used one scripted var, where I declared many at once and then used them. Worked fine

Code:
local function CheckBuffs(buffs)
  n = #buffs;
  varsc = true;
  for i = 1,n do
    if  UnitBuff("player", buffs[i]) then varsc = false end;
  end;
  return varsc;
end

varsc_bok = CheckBuffs({"Знак дикой природы", "Благословение королей"});
varsc_bom = CheckBuffs({"Благословение могущества", "Сила поганища", "Высвобожденная ярость", "Аура меткого выстрела"});
varsc_wf = CheckBuffs({"Цепкие ледяные когти", "Тотем неистовства ветра", "Групповая охота"});
varsc_stam = CheckBuffs({"Слово силы: Стойкость", "Кровавый союз", "Командирский крик"});
varsc_armor = CheckBuffs({"Аура благочестия", "Totem"});
varsc_flask = CheckBuffs({"Настой стальной кожи", "Настой силы титанов"});
varsc_food = CheckBuffs({"Сытость"});
Sorry for locale, I hope you catch an idea, there are names of buffs.

Now the only way to do the same is to declare 7 scripted vars one by one?
  Reply With Quote