Skip to content

Commit

Permalink
fix #9
Browse files Browse the repository at this point in the history
  • Loading branch information
spromicky committed Jul 6, 2021
1 parent 5e6555d commit 147c4ee
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
##### v1.2.1 Fix errors in Skada

- fix [#9](https://github.com/spromicky/Details_Covenants/issues/9) errors for Skada

##### v1.2.0 Ignore nickmames in Details!

- now you can ignore nicknames from Details. Use command `/dc ignore on` [#6](https://github.com/spromicky/Details_Covenants/issues/6)
Expand Down
33 changes: 21 additions & 12 deletions Commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,40 @@ local function commandLineHandler(msg, editBox)
else
print("|CFFd77c7aError:|r Please enter one of value |CFF9fd78aleft|r or |CFF9fd78aright|r")
end
elseif string.match(msg, "ignore") then
local _, ignoreValue = dc.utils:splitCommand(msg)
if ignoreValue == "on" or ignoreValue == "off" then
if ignoreValue == "on" then
_G._detalhes.ignore_nicktag = false
DCovenant["detailsIgnoreNickname"] = true
elseif string.match(msg, "ignore") then
if _G._detalhes then
local _, ignoreValue = dc.utils:splitCommand(msg)
if ignoreValue == "on" or ignoreValue == "off" then
if ignoreValue == "on" then
_G._detalhes.ignore_nicktag = false
DCovenant["detailsIgnoreNickname"] = true
else
DCovenant["detailsIgnoreNickname"] = false
end

print(coloredName.." Details! nicknames ignore is "..colorOption(DCovenant["detailsIgnoreNickname"]))
else
DCovenant["detailsIgnoreNickname"] = false
print("|CFFd77c7aError:|r Please enter one of value "..colorOption(true).." or "..colorOption(false))
end

print(coloredName.." Details! nicknames ignore is "..colorOption(DCovenant["detailsIgnoreNickname"]))
else
print("|CFFd77c7aError:|r Please enter one of value "..colorOption(true).." or "..colorOption(false))
print("|CFFd77c7aError:|r You don't have Details!")
end
else
local coloredCommand = " |CFFc0a7c7/dc|r |CFFf3ce87"
local currentChatOption = colorOption(DCovenantLog)
local currentAlignOption = DCovenant["iconAlign"]
local currentNicknameOption = colorOption(DCovenant["detailsIgnoreNickname"])

if not currentAlignOption then
currentAlignOption = "left"
end

print(coloredName.." usage info:\n"..coloredCommand.."icon [number]:|r change size of icons (currently: |CFF9fd78a"..DCovenant["iconSize"].."|r)\n"..coloredCommand.."chat [on | off]:|r log a new character's covenant to chat (currently: "..currentChatOption..")\n"..coloredCommand.."log [all | group]:|r prints all collected data or just for your party/raid".."\n"..coloredCommand.."align [left | right]:|r change align of covenant icon (currently: |CFF9fd78a"..currentAlignOption.."|r)".."\n"..coloredCommand.."ignore [on | off]:|r ignore Details! nicknames (currently: "..currentNicknameOption..")")
local ignoreCommand = ""
if _G._detalhes then
local currentNicknameOption = colorOption(DCovenant["detailsIgnoreNickname"])
ignoreCommand = "\n"..coloredCommand.."ignore [on | off]:|r ignore Details! nicknames (currently: "..currentNicknameOption..")"
end

print(coloredName.." usage info:\n"..coloredCommand.."icon [number]:|r change size of icons (currently: |CFF9fd78a"..DCovenant["iconSize"].."|r)\n"..coloredCommand.."chat [on | off]:|r log a new character's covenant to chat (currently: "..currentChatOption..")\n"..coloredCommand.."log [all | group]:|r prints all collected data or just for your party/raid".."\n"..coloredCommand.."align [left | right]:|r change align of covenant icon (currently: |CFF9fd78a"..currentAlignOption.."|r)"..ignoreCommand)
end
end
SlashCmdList["DETAILSCOVENANT"] = commandLineHandler;
10 changes: 4 additions & 6 deletions Details.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
local _, dc = ...
local oribos = _G.Oribos
local detalhes = _G._detalhes
local old_ignore_nicktag = detalhes.ignore_nicktag

function dc:replaceDetailsImplmentation()
if DCovenant["detailsIgnoreNickname"] == true then
detalhes.ignore_nicktag = false
end


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 = ""
Expand Down
2 changes: 1 addition & 1 deletion Details_Covenants.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: Details!|Skada Covenants
## Notes: Show covenant icon
## Author: Toenak
## Version: 1.2.0
## Version: 1.2.1
## X-License: MIT
## X-Curse-Project-ID: 431558
## SavedVariablesPerCharacter: DCovenant, DCovenantLog
Expand Down

0 comments on commit 147c4ee

Please sign in to comment.