-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMigration.lua
More file actions
24 lines (20 loc) · 819 Bytes
/
Migration.lua
File metadata and controls
24 lines (20 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---@class Migration
local Migration = ECSLoader:CreateModule("Migration")
---@type Profile
local Profile = ECSLoader:ImportModule("Profile")
---@type i18n
local i18n = ECSLoader:ImportModule("i18n")
---@param profileVersion number
function Migration:ToLatestProfileVersion(profileVersion)
if profileVersion < 23 then
---@class ECSProfile
Profile:Reset()
ECS:Print(i18n("Profile has been reset due to a major update.")) -- because of TBC anniversary
return
end
local defaultProfile = Profile:GetDefaultProfile()
if profileVersion < 26 then
ExtendedCharacterStats.profile.defense.resilience = defaultProfile.profile.defense.resilience
ExtendedCharacterStats.profile.defense.resilienceRating = defaultProfile.profile.defense.resilienceRating
end
end