Add zone to note
This commit is contained in:
		@@ -39,7 +39,7 @@ function(allstates, e, prefix, msg, ...)
 | 
			
		||||
				local faction = UnitFactionGroup("nameplate" .. i)
 | 
			
		||||
				local _, race = UnitRace("nameplate" .. i)
 | 
			
		||||
				local raceFaction = aura_env.raceFactions[race]
 | 
			
		||||
				if not raceFaction then
 | 
			
		||||
				if not raceFaction and aura_env.config.debug then
 | 
			
		||||
					print("Unknown race faction", race)
 | 
			
		||||
				else
 | 
			
		||||
					faction = raceFaction
 | 
			
		||||
@@ -72,6 +72,11 @@ function(allstates, e, prefix, msg, ...)
 | 
			
		||||
		end
 | 
			
		||||
		return
 | 
			
		||||
	end
 | 
			
		||||
	if not note then
 | 
			
		||||
		if aura_env.config.debug then
 | 
			
		||||
			print(string.format("Could not get note for %s (%s) with deliminer '%s'", msg, note or "nil", aura_env.separator))
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	if threat < aura_env.config.threatThreshold then
 | 
			
		||||
		if aura_env.config.debug then
 | 
			
		||||
@@ -80,6 +85,9 @@ function(allstates, e, prefix, msg, ...)
 | 
			
		||||
		return
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	local stinky = aura_env.stinkies[name]
 | 
			
		||||
	if not stinky then return false end
 | 
			
		||||
 | 
			
		||||
	if not allstates[name] then
 | 
			
		||||
		PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master")
 | 
			
		||||
	end
 | 
			
		||||
@@ -87,7 +95,7 @@ function(allstates, e, prefix, msg, ...)
 | 
			
		||||
	allstates[name] = {
 | 
			
		||||
		show = true,
 | 
			
		||||
		changed = true,
 | 
			
		||||
		name = string.format("%-30s", name),
 | 
			
		||||
		name = string.format("%-20s%2d%35s", name, stinky.threat, note),
 | 
			
		||||
		progressType = "timed",
 | 
			
		||||
		duration = 60,
 | 
			
		||||
		expirationTime = GetTime() + aura_env.config.alertThrottle,
 | 
			
		||||
 
 | 
			
		||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -1,4 +1,5 @@
 | 
			
		||||
-- TODO: Add zone detection and all that shit so we're not always in orgrimmar
 | 
			
		||||
-- see GetSubZoneText() and GetZoneText()
 | 
			
		||||
 | 
			
		||||
---@type Message[]
 | 
			
		||||
aura_env.messageQueue = {}
 | 
			
		||||
@@ -158,12 +159,12 @@ Stinky = {
 | 
			
		||||
	---@param self Stinky
 | 
			
		||||
	---@return string
 | 
			
		||||
	FormMessage = function(self)
 | 
			
		||||
		return string.format("%s в Оргриммаре!", self.name)
 | 
			
		||||
		return string.format("%s in %s!", self.name, aura_env.GetZone())
 | 
			
		||||
	end,
 | 
			
		||||
	---@param self Stinky
 | 
			
		||||
	---@return string
 | 
			
		||||
	FormAddonMessage = function(self)
 | 
			
		||||
		return table.concat({ self.name, self.threat, self.note }, aura_env.separator)
 | 
			
		||||
		return table.concat({ self.name, self.threat, aura_env.GetZone() }, aura_env.separator)
 | 
			
		||||
	end,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -225,6 +226,10 @@ aura_env.raceFactions = {
 | 
			
		||||
	["Worgen"] = "Alliance",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
aura_env.GetZone = function()
 | 
			
		||||
	return string.format("%s (%s)", GetZoneText(), GetSubZoneText())
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local killSpamTime = 30
 | 
			
		||||
local recentlyKilled = {}
 | 
			
		||||
aura_env.RegisterKill = function(source, destination, spellName, overkill)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user