-
Notifications
You must be signed in to change notification settings - Fork 0
/
Details.lua
58 lines (48 loc) · 2.04 KB
/
Details.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
local _, dc = ...
local oribos = _G.Oribos
local detalhes = _G._detalhes
function dc:replaceDetailsImplmentation()
if _G.NickTag and detalhes then
if DCovenant["detailsIgnoreNickname"] == true then
detalhes.ignore_nicktag = false
end
detalhes.GetNickname = function(self, playerName, default, silent)
local covenantPrefix = ""
local covenantSuffix = ""
if default == false then
if DCovenant["iconAlign"] == "right" then
covenantSuffix = " "..oribos:getCovenantIconForPlayer(playerName)
else
covenantPrefix = oribos:getCovenantIconForPlayer(playerName).." "
end
end
if DCovenant["detailsIgnoreNickname"] == true then
local name_without_nicktag = playerName
if (detalhes.remove_realm_from_name) then
name_without_nicktag = name_without_nicktag:gsub (("%-.*"), "")
end
return covenantPrefix..name_without_nicktag..covenantSuffix
end
if (not silent) then
assert (type (playerName) == "string", "NickTag 'GetNickname' expects a string or string on #1 argument.")
end
local _table = NickTag:GetNicknameTable (playerName)
if (not _table) then
if (detalhes.remove_realm_from_name) then
playerName = playerName:gsub (("%-.*"), "")
end
return covenantPrefix..playerName..covenantSuffix or nil
end
local nickName = _table[1]
if nickName then
if TemniUgolok_SetEmojiToDetails then
return covenantPrefix..TemniUgolok_SetEmojiToDetails(_table[1])..covenantSuffix
else
return covenantPrefix.._table[1]..covenantSuffix
end
else
return default or nil
end
end
end
end