Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#syntax=docker/dockerfile:1.2

FROM akorn/luarocks:lua5.4-alpine AS builder

RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
dumb-init gcc libc-dev

RUN luarocks install bit32
RUN luarocks install busted
69 changes: 42 additions & 27 deletions Hardcore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ along with the Hardcore AddOn. If not, see <http://www.gnu.org/licenses/>.
--[[ Const variables ]]
--
-- ERR_CHAT_PLAYER_NOT_FOUND_S = nil -- Disables warning when pinging non-hc player -- This clashes with other addons
local _, addon = ...

StaticPopupDialogs["CHAT_CHANNEL_PASSWORD"] = nil
--CHAT_WRONG_PASSWORD_NOTICE = nil
local DEATH_ALERT_COOLDOWN = 1800
Expand Down Expand Up @@ -73,6 +75,8 @@ Hardcore_Settings = {
ignore_xguild_chat = false,
ignore_xguild_alerts = false,
global_custom_pronoun = false,
deathlog_require_verification = true,
deathlog_log_size = 1000,
}

WARNING = ""
Expand Down Expand Up @@ -212,7 +216,6 @@ local GENDER_POSSESSIVE_PRONOUN = { "Their", "His", "Her" }
local recent_levelup = nil
local recent_msg = {}
local Last_Attack_Source = nil
DeathLog_Last_Attack_Source = nil
local PICTURE_DELAY = 0.65
local HIDE_RTP_CHAT_MSG_BUFFER = 0 -- number of messages in queue
local HIDE_RTP_CHAT_MSG_BUFFER_MAX = 2 -- number of maximum messages to wait for
Expand Down Expand Up @@ -954,6 +957,8 @@ local settings_saved_variable_meta = {
["use_alternative_menu"] = false,
["ignore_xguild_chat"] = false,
["ignore_xguild_alerts"] = false,
["deathlog_require_verification"] = true,
["deathlog_log_size"] = 1000,
}

--[[ Post-utility functions]]
Expand Down Expand Up @@ -986,7 +991,9 @@ function Hardcore:InitializeSettingsSavedVariables()
end

for k, v in pairs(settings_saved_variable_meta) do
Hardcore_Settings[k] = Hardcore_Settings[k] or v
if Hardcore_Settings[k] == nil then
Hardcore_Settings[k] = v
end
end

if Hardcore_Settings["alert_frame_scale"] <= 0 then
Expand Down Expand Up @@ -1694,11 +1701,11 @@ function Hardcore:PLAYER_ENTERING_WORLD()
end

C_Timer.After(1.0, function()
deathlogApplySettings(Hardcore_Settings)
addon.deathlog:ApplySettings(Hardcore_Settings)
end)

C_Timer.After(5.0, function()
deathlogJoinChannel()
addon.deathlog:JoinChannel()
end)
end

Expand Down Expand Up @@ -1817,9 +1824,6 @@ function Hardcore:PLAYER_DEAD()
end

-- Send broadcast text messages to guild and greenwall
selfDeathAlert(DeathLog_Last_Attack_Source)
selfDeathAlertLastWords(recent_msg["text"])

SendChatMessage(messageString, "GUILD")
startXGuildChatMsgRelay(messageString)
startXGuildDeathMsgRelay()
Expand Down Expand Up @@ -2575,27 +2579,9 @@ function Hardcore:COMBAT_LOG_EVENT_UNFILTERED(...)
if not (source_name == nil) then
if string.find(ev, "DAMAGE") ~= nil then
Last_Attack_Source = source_name
DeathLog_Last_Attack_Source = source_name
end
end
end
if ev == "ENVIRONMENTAL_DAMAGE" then
if target_guid == UnitGUID("player") then
if environmental_type == "Drowning" then
DeathLog_Last_Attack_Source = -2
elseif environmental_type == "Falling" then
DeathLog_Last_Attack_Source = -3
elseif environmental_type == "Fatigue" then
DeathLog_Last_Attack_Source = -4
elseif environmental_type == "Fire" then
DeathLog_Last_Attack_Source = -5
elseif environmental_type == "Lava" then
DeathLog_Last_Attack_Source = -6
elseif environmental_type == "Slime" then
DeathLog_Last_Attack_Source = -7
end
end
end
end

function Hardcore:CHAT_MSG_SAY(...)
Expand Down Expand Up @@ -3926,7 +3912,7 @@ local options = {
Hardcore_Settings.death_log_show = true
end
Hardcore_Settings.death_log_show = not Hardcore_Settings.death_log_show
deathlogApplySettings(Hardcore_Settings)
addon.deathlog:ApplySettings(Hardcore_Settings)
end,
order = 1,
},
Expand Down Expand Up @@ -4031,7 +4017,7 @@ local options = {
desc = "Reset the death log pos.",
func = function(info, value)
hardcore_settings["death_log_pos"] = {['x'] = 0, ['y'] = 0}
deathlogApplySettings(Hardcore_Settings)
addon.deathlog:ApplySettings(Hardcore_Settings)
end,
order = 5,
},
Expand Down Expand Up @@ -4282,6 +4268,33 @@ local options = {
end,
order = 13,
},
deathlog_require_verification = {
type = "toggle",
name = "Only verified deaths",
desc = "Only show deaths that have been verified by the player's guildmates",
get = function()
return Hardcore_Settings.deathlog_require_verification
end,
set = function(info, value)
Hardcore_Settings.deathlog_require_verification = value
end,
order = 14,
},
deathlog_log_size = {
type = "range",
name = "Log Size",
desc = "How many deaths to store, increasing this limit can increase load time.",
min = 0,
max = 100000,
step = 1,
get = function()
return Hardcore_Settings.deathlog_log_size
end,
set = function(info, value)
Hardcore_Settings.deathlog_log_size = value
end,
order = 15,
},
},
},
cross_guild_header = {
Expand Down Expand Up @@ -4335,6 +4348,8 @@ local options = {
Hardcore_Settings.show_minimap_mailbox_icon = false
Hardcore_Settings.ignore_xguild_alerts = false
Hardcore_Settings.ignore_xguild_chat = false
Hardcore_Settings.deathlog_require_verification = true
Hardcore_Settings.deathlog_log_size = 1000
Hardcore:ApplyAlertFrameSettings()
end,
order = 20,
Expand Down
3 changes: 2 additions & 1 deletion Hardcore_Classic.toc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ TextureInfo.lua
AchievementAlertFrame.lua
id_to_npc_classic.lua
npc_to_id_classic.lua
DeathLog.lua
Modules/deathlog/deathlog.lua
Modules/deathlog/ui.lua
Hardcore.lua

Libs/GreenWall/Constants.lua
Expand Down
Loading