Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GroupsByGUID = {};
- local Frame = CreateFrame("Frame");
- Frame:SetScript("OnEvent",
- function (self, Event, ...)
- if Event == "GROUP_ROSTER_UPDATE" then
- GroupsByGUID = {};
- if IsInRaid() then
- for Index = 1, GetNumGroupMembers() do
- local Subgroup = select(3, GetRaidRosterInfo(Index));
- GroupsByGUID[UnitGUID("Raid" .. Index)] = Subgroup;
- end
- else
- for Index = 1, GetNumGroupMembers() - 1 do
- GroupsByGUID[UnitGUID("Party" .. Index)] = 1;
- end
- end
- end
- end
- );
- Frame:RegisterEvent("GROUP_ROSTER_UPDATE");
- function UnitGroupNumber (Unit)
- return GroupsByGUID[UnitGUID(Unit)];
- end
- function DispelUnits()
- local dispeltbl = {143446, 144351, 143791}
- if IsInGroup() then
- for i = 1, GetNumGroupMembers() do
- if IsInRaid() then Unit = "raid" .. i
- else Unit = "party" .. i end
- for i = 1, #dispeltbl do
- if UnitDebuffID(Unit, dispeltbl[i]) and Soapbox.validHealingTarget(Unit) then
- SoapboxRotations.dsl.parsedTarget = Unit
- return true
- end
- end
- end
- end
- return false
- end
- SoapboxRotations.condition.register("bubbleunits", function(target)
- local Results = {};
- for Index = 1, GetUnitCount() do
- local Unit3 = GetUnitByIndex(Index);
- if UnitExists(target) and UnitExists(Unit3) then
- if not UnitIsUnit(target, Unit3) aand not tContains(Results, UnitGUID(Unit3)) and UnitIsPlayer(Unit3) == 1
- and ((IsInRaid("player") and UnitGroupNumber(Unit3) == UnitGroupNumber(target))
- or (not IsInRaid("player") and UnitInParty(Unit3) == 1))
- and not UnitIsDeadOrGhost(Unit3) and not SoapboxRotations.dsl.get("buff")(Unit3, 114908)
- and GetDistanceBetweenUnits(UnitGUID(Unit3), UnitGUID(target)) <= 30 then
- table.insert(Results, Unit3);
- end
- end
- end
- return #Results;
- end)
- function advancedspiritlogic5()
- for i = 1, GetNumGroupMembers() do
- if IsInRaid("player") then
- Unit4 = "raid" ..i
- else Unit4 = "party" ..i
- end
- if (not IsInRaid("player") or UnitGroupNumber(Unit4) ~= LastParty) then
- if Unit4 ~= LastTarget then
- if not SoapboxRotations.dsl.get("buff")(Unit4, 114908) and SoapboxRotations.dsl.get("bubbleunits")(Unit4) > 3
- and SoapboxRotations.dsl.get("los")(Unit4) and SoapboxRotations.dsl.get("spell.range")(Unit4, 17) then
- SoapboxRotations.dsl.parsedTarget = Unit4
- LastTarget = Unit4
- Spirit = true
- Trt = Unit4
- return true
- end
- end
- end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement