added pvp status for for load auras
This commit is contained in:
@@ -1202,6 +1202,7 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...)
|
||||
|
||||
local inCombat = UnitAffectingCombat("player") -- or UnitAffectingCombat("pet");
|
||||
local alive = not UnitIsDeadOrGhost('player')
|
||||
local pvp = UnitIsPVPFreeForAll("player") or UnitIsPVP("player")
|
||||
local vehicle = UnitInVehicle("player") or UnitOnTaxi("player")
|
||||
local vehicleUi = UnitHasVehicleUI("player")
|
||||
|
||||
@@ -1218,8 +1219,8 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...)
|
||||
if (data and not data.controlledChildren) then
|
||||
local loadFunc = loadFuncs[id];
|
||||
local loadOpt = loadFuncsForOptions[id];
|
||||
shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, vehicle, vehicleUi, group, player, realm, class, faction, playerLevel, zone, zoneId, size, difficulty);
|
||||
couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, vehicle, vehicleUi, group, player, realm, class, faction, playerLevel, zone, zoneId, size, difficulty);
|
||||
shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, group, player, realm, class, faction, playerLevel, zone, zoneId, size, difficulty);
|
||||
couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, group, player, realm, class, faction, playerLevel, zone, zoneId, size, difficulty);
|
||||
|
||||
if(shouldBeLoaded and not loaded[id]) then
|
||||
changed = changed + 1;
|
||||
@@ -1299,6 +1300,7 @@ loadFrame:RegisterEvent("PLAYER_EQUIPMENT_CHANGED")
|
||||
loadFrame:RegisterEvent("PLAYER_DEAD")
|
||||
loadFrame:RegisterEvent("PLAYER_ALIVE")
|
||||
loadFrame:RegisterEvent("PLAYER_UNGHOST")
|
||||
loadFrame:RegisterEvent("PLAYER_FLAGS_CHANGED")
|
||||
|
||||
local unitLoadFrame = CreateFrame("FRAME");
|
||||
WeakAuras.unitLoadFrame = unitLoadFrame;
|
||||
@@ -1307,6 +1309,7 @@ WeakAuras.frames["Display Load Handling 2"] = unitLoadFrame;
|
||||
unitLoadFrame:RegisterEvent("UNIT_FLAGS");
|
||||
unitLoadFrame:RegisterEvent("UNIT_ENTERED_VEHICLE");
|
||||
unitLoadFrame:RegisterEvent("UNIT_EXITED_VEHICLE");
|
||||
unitLoadFrame:RegisterEvent("UNIT_FACTION");
|
||||
|
||||
function Private.RegisterLoadEvents()
|
||||
loadFrame:SetScript("OnEvent", function(frame, ...)
|
||||
|
||||
Reference in New Issue
Block a user