This commit is contained in:
Bunny67
2020-06-06 14:01:23 +03:00
parent 3d6fecf039
commit 9f330fb563
3 changed files with 18 additions and 50 deletions
@@ -490,28 +490,6 @@ local function Show_DropIndicator(id)
end
end
-- WORKAROUND
-- Blizzard in its infinite wisdom did:
-- * Force enable the profanity filter for the chinese region
-- * Add a realm name's part to the profanity filter
function WeakAuras.ObsfuscateName(name)
if (GetCurrentRegion() == 5) then
local result = ""
for i = 1, #name do
local b = name:byte(i)
if (b >= 196 and i ~= 1) then
-- UTF8 Start byte
result = result .. string.char(46, b)
else
result = result .. string.char(b)
end
end
return result
else
return name
end
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
@@ -537,9 +515,9 @@ local methods = {
local editbox = GetCurrentKeyBoardFocus();
if(editbox) then
if (not fullName) then
local name, realm = UnitFullName("player")
local name, realm = UnitName("player")
if realm then
fullName = name.."-".. WeakAuras.ObsfuscateName(realm)
fullName = name.."-"..realm
else
fullName = name
end