Improving code

Leandro Silva [10-05-18 - 20:44]
Improving code
Filename
LeoAltholic.lua
diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index 962676b..afef42c 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -561,7 +561,12 @@ local function onResearchCompleted(eventCode, craft, line, trait)
     local lineName = GetSmithingResearchLineInfo(craft, line)
     local traitType = GetSmithingResearchLineTraitInfo(craft, line, trait)

-    local msg = formatMessage(zo_strformat(SI_FINISHED_SMITHING_TRAIT_RESEARCH, GetString("SI_ITEMTRAITTYPE", traitType), lineName))
+    local msg = formatMessage(zo_strformat(
+            '<<C:1>> has finished a research: |c00FF00<<C:2>> <<C:3>>|r',
+            LeoAltholic.CharName,
+            GetString('SI_ITEMTRAITTYPE',traitType),
+            lineName
+    ))

     if LeoAltholic.savedVariables.settings.completedResearch.screen == true then
         local messageParams = CENTER_SCREEN_ANNOUNCE:CreateMessageParams(CSA_CATEGORY_SMALL_TEXT, SOUNDS.SMITHING_FINISH_RESEARCH)