Skip to content

Commit

Permalink
v1.6.2 (#117)
Browse files Browse the repository at this point in the history
* Close #106: Thanks @byezero! (#116)

* Close #101: Only show Welcome message once per version (#108)
  • Loading branch information
Mctalian committed Sep 12, 2024
1 parent 4e8acb2 commit 6929aed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions RPGLootFeed.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function RLF:SlashCommand(msg, editBox)
end)
end

local currentVersion = "@project-version@"
function RLF:PLAYER_ENTERING_WORLD(event, isLogin, isReload)
if self.optionsFrame == nil then
self.optionsFrame = acd:AddToBlizOptions(addonName, addonName)
Expand All @@ -44,8 +45,10 @@ function RLF:PLAYER_ENTERING_WORLD(event, isLogin, isReload)
self:LootToastHook()
self:BossBannerHook()
end)
if isLogin and isReload == false then
self:Print(G_RLF.L["Welcome"])
local isNewVersion = currentVersion ~= G_RLF.db.global.lastVersionLoaded
if isLogin and isReload == false and isNewVersion then
G_RLF.db.global.lastVersionLoaded = currentVersion
self:Print(G_RLF.L["Welcome"] .. " (" .. currentVersion .. ")")
if G_RLF.db.global.enableAutoLoot then
C_CVar.SetCVar("autoLootDefault", "1")
end
Expand Down
1 change: 1 addition & 0 deletions config/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ G_RLF.defaults = {
sessionsLogged = 0,
logs = {},
},
lastVersionLoaded = "v1.0.0",
},
}

Expand Down
2 changes: 2 additions & 0 deletions locale/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,5 @@ L["UIParent"] = true
L["PlayerFrame"] = "玩家框架"
L["Minimap"] = "小地图"
L["BagBar"] = "背包栏"
L["Disable Row Highlight"] = "禁用行高亮"
L["DisableRowHighlightDesc"] = "如果选中,当你再次拾取相同的物品并且数量更新时,不再高亮显示该行。"

0 comments on commit 6929aed

Please sign in to comment.