Commit da12370d authored by Simpy's avatar Simpy 🐹

move this one up 'cause

parent 092bee4f
......@@ -86,23 +86,7 @@ function M:COMBAT_LOG_EVENT_UNFILTERED()
end
do -- Auto Repair Functions
local TYPE, COST, POSS, STATUS
function M:AutoRepairOutput()
if TYPE == 'GUILD' then
if STATUS == "GUILD_REPAIR_FAILED" then
M:AttemptAutoRepair(true) --Try using player money instead
else
E:Print(L["Your items have been repaired using guild bank funds for: "]..E:FormatMoney(COST, "SMART", true)) --Amount, style, textOnly
end
elseif TYPE == "PLAYER" then
if STATUS == "PLAYER_REPAIR_FAILED" then
E:Print(L["You don't have enough money to repair."])
else
E:Print(L["Your items have been repaired for: "]..E:FormatMoney(COST, "SMART", true)) --Amount, style, textOnly
end
end
end
local STATUS, TYPE, COST, POSS
function M:AttemptAutoRepair(playerOverride)
STATUS, TYPE, COST, POSS = "", E.db.general.autoRepair, GetRepairAllCost()
......@@ -119,6 +103,22 @@ do -- Auto Repair Functions
end
end
function M:AutoRepairOutput()
if TYPE == 'GUILD' then
if STATUS == "GUILD_REPAIR_FAILED" then
M:AttemptAutoRepair(true) --Try using player money instead
else
E:Print(L["Your items have been repaired using guild bank funds for: "]..E:FormatMoney(COST, "SMART", true)) --Amount, style, textOnly
end
elseif TYPE == "PLAYER" then
if STATUS == "PLAYER_REPAIR_FAILED" then
E:Print(L["You don't have enough money to repair."])
else
E:Print(L["Your items have been repaired for: "]..E:FormatMoney(COST, "SMART", true)) --Amount, style, textOnly
end
end
end
function M:UI_ERROR_MESSAGE(_, messageType)
if messageType == LE_GAME_ERR_GUILD_NOT_ENOUGH_MONEY then
STATUS = "GUILD_REPAIR_FAILED"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment