NeedToKnowLoader.Reset() |
end |
|
local maxKey = 0 |
for iS,vS in pairs(NeedToKnow_Globals.Profiles) do |
if vS.bUncompressed then |
NeedToKnow.CompressProfile(vS) |
end |
|
local cur = tonumber(iS:sub(2)) |
if ( cur > maxKey ) then maxKey = cur end |
NeedToKnow_Profiles[iS] = vS |
end |
if NeedToKnow_CharSettings.Profiles then |
for iS,vS in pairs(NeedToKnow_CharSettings.Profiles) do |
if ( NeedToKnow_Profiles[iS] ) then |
print("NeedToKnow error encountered, both", vS.name, "and", NeedToKnow_Profiles[iS].name, "collided. Some specs may be mapped to one that should have been mapped to the other."); |
iS = NeedToKnow.AllocateProfileKey(); |
end |
local cur = tonumber(iS:sub(2)) |
if ( cur > maxKey ) then maxKey = cur end |
NeedToKnow_Profiles[iS] = vS |
end |
end |
|
if ( not NeedToKnow_Globals.NextProfile or maxKey > NeedToKnow_Globals.NextProfile ) then |
print("Warning, NeedToKnow forgot how many profiles it had allocated. New account profiles may hiccup when switching characters.") |
NeedToKnow_Globals.NextProfile = maxKey + 1 |
end |
|
-- TODO: check the required members for existence and delete any corrupted profiles |
end |
|