Files
shootyepgp/migrations.lua
T
Road-block d39ee25cf3 Add support for Minimum EP (default 0)
Add alternative masterloot item detection to workaround detection fails when giving loot to players outside CHAT_MSG_LOOT range.
Modify loading logic to avoid comms error when options haven't initialized yet.
Class color menus for EP and GP assignments (admins).
Bids: Change sorter to handle PR ties better and take MinEP into account if enabled.
Standings: Change sorter to handle PR ties better and take MinEP into account if enabled.
2018-05-14 23:14:04 +03:00

24 lines
1.2 KiB
Lua

local L = AceLibrary("AceLocale-2.2"):new("shootyepgp")
function sepgp:v2tov3()
local count = 0
for i = 1, GetNumGuildMembers(1) do
local name, _, _, _, class, _, note, officernote, _, _ = GetGuildRosterInfo(i)
local epv2 = sepgp:get_ep_v2(name,note)
local gpv2 = sepgp:get_gp_v2(name,officernote)
local epv3 = sepgp:get_ep_v3(name,officernote)
local gpv3 = sepgp:get_gp_v3(name,officernote)
if (epv3 and gpv3) then
-- do nothing, we've migrated already
elseif (epv2 and gpv2) and (epv2 > 0 and gpv2 >= sepgp.VARS.basegp) then
count = count + 1
-- self:defaultPrint(string.format("epv2:%s,gpv2:%s,i:%s,n:%s,o:%s",epv2,gpv2,i,name,officernote))
sepgp:update_epgp_v3(epv2,gpv2,i,name,officernote)
end
end
self:defaultPrint(string.format(L["Updated %d members to v3 storage."],count))
sepgp_dbver = 3
end
-- GLOBALS: sepgp_saychannel,sepgp_groupbyclass,sepgp_groupbyarmor,sepgp_groupbyrole,sepgp_raidonly,sepgp_decay,sepgp_minep,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount,sepgp_log,sepgp_dbver,sepgp_looted
-- GLOBALS: sepgp,sepgp_prices,sepgp_standings,sepgp_bids,sepgp_loot,sepgp_reserves,sepgp_alts,sepgp_logs