Replace colors with Blizzard defaults. Remove manual hostility coloring, GetZonePVPInfo already covers this
This commit is contained in:
parent
77a852053e
commit
08a7819fcb
16
core.lua
16
core.lua
|
@ -27,19 +27,23 @@ local function setPlayerCoords()
|
||||||
child['playerCoords'] = playerCoords
|
child['playerCoords'] = playerCoords
|
||||||
end
|
end
|
||||||
local colorlist = {
|
local colorlist = {
|
||||||
['friendly'] = "00ff00",
|
['arena'] = "ff1919",
|
||||||
['arena'] = "ffff00",
|
['combat'] = "ff1919",
|
||||||
['sanctuary'] = "9999ff",
|
['hostile'] = "ff1919",
|
||||||
|
['friendly'] = "19ff19",
|
||||||
|
['sanctuary'] = "68ccef",
|
||||||
|
['contested'] = "ffb200",
|
||||||
}
|
}
|
||||||
local function pvpColor(txt)
|
local function pvpColor(txt)
|
||||||
local col
|
local col
|
||||||
local pvpType, isFFA, faction = GetZonePVPInfo()
|
local pvpType, isFFA, faction = GetZonePVPInfo()
|
||||||
if(colorlist[pvpType]) then
|
if(colorlist[pvpType]) then
|
||||||
col = colorlist[pvpType]
|
col = colorlist[pvpType]
|
||||||
elseif(pvpType == "hostile" or pvpType == "combat" or pvpType=="contested") then
|
|
||||||
col = faction == select(2,UnitFactionGroup('player')) and "886600" or "ff0000"
|
|
||||||
else
|
else
|
||||||
return txt
|
col = "ffd100"
|
||||||
|
--ffecc1 from ZoneText.lua, the one in the middle of the screen when changing areas
|
||||||
|
--ffd100 from MiniMap.lua, which uses NORMAL_FONT_COLOR
|
||||||
|
--Which one is "more correct"?
|
||||||
end
|
end
|
||||||
return child:colorize(txt, col)
|
return child:colorize(txt, col)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue