mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-01-01 10:13:30 +00:00
Tabs? No ty.
This commit is contained in:
parent
46a25fd597
commit
7341613f21
@ -13,7 +13,7 @@ function Artemis:OnEnable()
|
|||||||
Artemis:RegisterEvent("PLAYER_ENTERING_WORLD")
|
Artemis:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||||
Artemis:RegisterEvent("PLAYER_LEVEL_UP")
|
Artemis:RegisterEvent("PLAYER_LEVEL_UP")
|
||||||
Artemis:RegisterEvent("ACHIEVEMENT_EARNED")
|
Artemis:RegisterEvent("ACHIEVEMENT_EARNED")
|
||||||
Artemis:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
|
Artemis:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
|
||||||
Artemis:RegisterEvent("UNIT_TARGET")
|
Artemis:RegisterEvent("UNIT_TARGET")
|
||||||
Artemis:RegisterEvent("UNIT_HEALTH")
|
Artemis:RegisterEvent("UNIT_HEALTH")
|
||||||
Artemis:RegisterEvent("UNIT_POWER")
|
Artemis:RegisterEvent("UNIT_POWER")
|
||||||
@ -63,10 +63,10 @@ function Artemis:Transmit(prefix, data, prio)
|
|||||||
lastTransmitTime = GetTime()
|
lastTransmitTime = GetTime()
|
||||||
|
|
||||||
if debugging == true then
|
if debugging == true then
|
||||||
if prefixCounts[prefix] == nill then
|
if prefixCounts[prefix] == nill then
|
||||||
prefixCounts[prefix] = 0
|
prefixCounts[prefix] = 0
|
||||||
end
|
end
|
||||||
prefixCounts[prefix] = prefixCounts[prefix] + 1
|
prefixCounts[prefix] = prefixCounts[prefix] + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if debugging == true then
|
if debugging == true then
|
||||||
@ -110,14 +110,14 @@ function Artemis:GetUnitDetails(unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Artemis:GetPlayerDetails()
|
function Artemis:GetPlayerDetails()
|
||||||
local details = Artemis:GetUnitDetails("player")
|
local details = Artemis:GetUnitDetails("player")
|
||||||
local id, name, _, _, role = GetSpecializationInfo(GetSpecialization())
|
local id, name, _, _, role = GetSpecializationInfo(GetSpecialization())
|
||||||
|
|
||||||
details.realm = GetRealmName()
|
details.realm = GetRealmName()
|
||||||
details.achievementPoints = GetTotalAchievementPoints(false)
|
details.achievementPoints = GetTotalAchievementPoints(false)
|
||||||
details.s = {id = id, n = name, r = role}
|
details.s = {id = id, n = name, r = role}
|
||||||
|
|
||||||
return details
|
return details
|
||||||
end
|
end
|
||||||
|
|
||||||
function Artemis:GetUnitAuras(unit, filter)
|
function Artemis:GetUnitAuras(unit, filter)
|
||||||
@ -198,17 +198,17 @@ function Artemis:UNIT_AURA(...)
|
|||||||
local buffs = Artemis:GetUnitAuras(source, "PLAYER|HELPFUL")
|
local buffs = Artemis:GetUnitAuras(source, "PLAYER|HELPFUL")
|
||||||
local debuffs = Artemis:GetUnitAuras(source, "PLAYER|HARMFUL")
|
local debuffs = Artemis:GetUnitAuras(source, "PLAYER|HARMFUL")
|
||||||
|
|
||||||
local newBuffs = json.encode(buffs)
|
local newBuffs = json.encode(buffs)
|
||||||
local newDebuffs = json.encode(debuffs)
|
local newDebuffs = json.encode(debuffs)
|
||||||
|
|
||||||
if not (lastBuffs == newBuffs) then
|
if not (lastBuffs == newBuffs) then
|
||||||
Artemis:Transmit("buffs", buffs)
|
Artemis:Transmit("buffs", buffs)
|
||||||
end
|
end
|
||||||
if not (lastDebuffs == newDebuffs) then
|
if not (lastDebuffs == newDebuffs) then
|
||||||
Artemis:Transmit("debuffs", debuffs)
|
Artemis:Transmit("debuffs", debuffs)
|
||||||
end
|
end
|
||||||
|
|
||||||
lastBuffs = newBuffs
|
lastBuffs = newBuffs
|
||||||
lastDebuffs = newDebuffs
|
lastDebuffs = newDebuffs
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user