WoWInterface SVN OpenRDX

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/RDX/Designs/Variables/Checks
    from Rev 585 to Rev 645
    Reverse comparison

Rev 585 → Rev 645

IsEvenGroup.lua
4,6 → 4,7
name = "var_isEven";
title = VFLI.i18n("Var IsEvenGroup?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,16
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local isEven = true;
]]);
else
code:AppendCode([[
local isEven = (unit:GetGroup() % 2 == 0);
]]);
end
end);
end;
UIFromDescriptor = VFL.Nil;
IsTargetExisted.lua
3,6 → 3,7
name = "var_targetexisted";
title = VFLI.i18n("Var IsTargetExisted?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,10 → 14,16
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local targetexisted = true;
]]);
else
code:AppendCode([[
local targetexisted = UnitExists("target");
if targetexisted then targetexisted = true; else targetexisted = false; end
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("TARGET");
IsTapped.lua
3,6 → 3,7
name = "var_tapped";
title = VFLI.i18n("Var IsTapped?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,15
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local tapped = true;
]]);
else
code:AppendCode([[
local tapped = UnitIsTapped(uid) and (not UnitIsTappedByPlayer(uid));
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("FLAGS");
IsEnemy.lua
4,6 → 4,7
name = "var_isEnemy";
title = VFLI.i18n("Var IsEnemy?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,16
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local isEnemy = true;
]]);
else
code:AppendCode([[
local isEnemy = UnitIsEnemy(uid,"player");
]]);
end
end);
end;
UIFromDescriptor = VFL.Nil;
IsMaxLevel.lua
4,6 → 4,7
name = "var_isMaxLevel";
title = VFLI.i18n("Var IsMaxLevel?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,10 → 14,17
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local ismaxlevel = true;
]]);
else
code:AppendCode([[
local ismaxlevel = false;
if UnitLevel(uid) == 80 then ismaxlevel = true; end;
if UnitLevel(uid) == 85 then ismaxlevel = true; end;
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("XP_UPDATE");
IsNPC.lua
3,6 → 3,7
name = "var_isnpc";
title = VFLI.i18n("Var IsNPC?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,15
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local isnpc = true;
]]);
else
code:AppendCode([[
local isnpc = (not UnitIsPlayer(uid));
]]);
end
end);
end;
UIFromDescriptor = VFL.Nil;
IsSolarDirection.lua
3,6 → 3,7
name = "var_issolar";
title = VFLI.i18n("Var EclipseDirection?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,15
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local eclipsedirection = true;
]]);
else
code:AppendCode([[
local eclipsedirection = GetEclipseDirection();
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("FLAGS");
IsRaidInRange.lua
3,6 → 3,7
name = "var_inrange";
title = VFLI.i18n("Var IsRaidInRange?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,15
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local inRange = true;
]]);
else
code:AppendCode([[
local inRange = UnitInRange(uid);
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("RANGED");
IsGhost.lua
3,6 → 3,7
name = "var_isGhost";
title = VFLI.i18n("Var IsGhost?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,15
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local isGhost = true;
]]);
else
code:AppendCode([[
local isGhost = UnitIsGhost(uid);
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("FLAGS");
IsInn.lua
3,6 → 3,7
name = "var_ininn";
title = VFLI.i18n("Var IsInn?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,15
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local ininn = true;
]]);
else
code:AppendCode([[
local ininn = IsResting();
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("FLAGS");
IsDeath.lua
3,6 → 3,7
name = "var_isDeath";
title = VFLI.i18n("Var IsDeath?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,15
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local isDeath = true;
]]);
else
code:AppendCode([[
local isDeath = UnitIsDead(uid);
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("FLAGS");
IsExhaustion.lua
3,6 → 3,7
name = "var_isExhaustion";
title = VFLI.i18n("Var IsExhaustion?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,10 → 14,16
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local isExhaustion = true;
]]);
else
code:AppendCode([[
local nbexh, isExhaustion = GetXPExhaustion(), false;
if nbexh then isExhaustion = true; end
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("XP_UPDATE");
IsMaxHealthPower.lua
4,6 → 4,7
name = "var_IsMaxHealthPower";
title = VFLI.i18n("Var IsMaxHealthPower?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,7 → 14,13
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local ismaxhealthpower = true;
]]);
else
code:AppendCode([[
local ismaxhealthpower = false;
local pt = unit:PowerType();
if unit:Health() == unit:MaxHealth() then
24,6 → 31,7
end
end
]]);
end
end);
local mux, mask = state:GetContainingWindowState():GetSlotValue("Multiplexer"), 0;
mask = mux:GetPaintMask("POWER");
IsInInstance.lua
3,6 → 3,7
name = "var_inInstance";
title = VFLI.i18n("Var IsInInstance?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,11 → 14,17
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local inInstance = true;
]]);
else
code:AppendCode([[
local inInstance = true;
local posX = GetPlayerMapPosition(uid);
if posX and (posX > 0) then inInstance = false; end
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("FLAGS");
IsLeader.lua
4,6 → 4,7
name = "var_israidpartyleader";
title = VFLI.i18n("Var IsLeader?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
14,7 → 15,12
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local israidpartyleader = true;
]]);
else
code:AppendCode([[
local israidpartyleader = nil;
if GetNumRaidMembers() > 0 then
_,israidpartyleader = GetRaidRosterInfo(RDXDAL.UIDToNumber(uid));
23,6 → 29,7
israidpartyleader = UnitIsPartyLeader(uid);
end
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("FLAGS");
IsInCombat.lua
3,6 → 3,7
name = "var_incombat";
title = VFLI.i18n("Var IsInCombat?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,9 → 14,15
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local incombat = true;
]]);
else
code:AppendCode([[
local incombat = UnitAffectingCombat(uid);
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("FLAGS");
IsElite.lua
3,6 → 3,7
name = "var_isElite";
title = VFLI.i18n("Var IsElite?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
14,11 → 15,17
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local isElite, isNotElite = true, false;
]]);
else
code:AppendCode([[
local isElite, isNotElite = false, true;
local strclasstype = UnitClassification(uid);
if (strclasstype ~= "normal") then isElite = true; isNotElite = false; end
]]);
end
end);
end;
UIFromDescriptor = VFL.Nil;
IsMaxPower.lua
3,6 → 3,7
name = "var_isMaxPower";
title = VFLI.i18n("Var IsMaxPower?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
12,10 → 13,17
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local ismaxpower = true;
]]);
else
code:AppendCode([[
local ismaxpower = false;
if unit:Power() == unit:MaxPower() then ismaxpower = true end;
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("POWER");
IsExisted.lua
3,6 → 3,7
name = "var_existed";
title = VFLI.i18n("Var IsExisted?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
13,10 → 14,15
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local existed = true;
]]);
else
code:AppendCode([[
local existed = UnitExists(uid);
if existed then existed = true; else existed = false; end
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("FLAGS");
IsShiftDown.lua
3,6 → 3,7
name = "var_isShiftDown";
title = VFLI.i18n("Var IsShiftHeldDown?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
12,9 → 13,16
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local isShiftDown = true;
]]);
else
code:AppendCode([[
local isShiftDown = IsShiftKeyDown();
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("HARDWARE");
IsAltDown.lua
3,6 → 3,7
name = "var_isAltDown";
title = VFLI.i18n("Var IsAltHeldDown?");
category = VFLI.i18n("Variables Check");
test = true;
IsPossible = function(state)
if not state:Slot("EmitPaintPreamble") then return nil; end
return true;
12,9 → 13,16
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local isAltDown = true;
]]);
else
code:AppendCode([[
local isAltDown = IsAltKeyDown();
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("HARDWARE");