# HG changeset patch # User Farmbuyer of US-Kilrogg # Date 1336556294 0 # Node ID 3bed6d51e0770ab43f0da62f16b3f7cb37708226 # Parent c01875b275ca6d798e1da99dfddf88118eb7d1fe Make sure subgroup field is always set to non-nil. ("Belt *and* suspenders." Handle a previously-set nil field during text creation.) diff -r c01875b275ca -r 3bed6d51e077 core.lua --- a/core.lua Tue May 08 02:41:23 2012 +0000 +++ b/core.lua Wed May 09 09:38:14 2012 +0000 @@ -9,7 +9,7 @@ - raiders accumulating raid roster data as we see raid members; indexed by player name with subtable fields: - class capitalized English codename ("WARRIOR", "DEATHKNIGHT", etc) -- subgroup 1-8 +- subgroup 1-8 (NUM_RAID_GROUPS), NRG+1 if something's wrong - race English codename ("BloodElf", etc) - sex 1 = unknown/error, 2 = male, 3 = female - level can be 0 if player was offline at the time @@ -909,7 +909,7 @@ g_loot.raiders[name] = { needinfo=true } end local r = g_loot.raiders[name] - r.subgroup = subgroup + r.subgroup = subgroup or (NUM_RAID_GROUPS+1) if r.needinfo and UnitIsVisible(unit) then r.needinfo = nil r.class = class --select(2,UnitClass(unit)) diff -r c01875b275ca -r 3bed6d51e077 text_tabs.lua --- a/text_tabs.lua Tue May 08 02:41:23 2012 +0000 +++ b/text_tabs.lua Wed May 09 09:38:14 2012 +0000 @@ -148,7 +148,7 @@ -- Assumption: everybody is packed into the first N groups. if raidertable then for name,info in pairs(raidertable) do if info.online ~= 3 then -- 3 == left the raid - if info.subgroup <= max_group_number then + if (info.subgroup or (NUM_RAID_GROUPS+1)) <= max_group_number then tins (ingroups, name) else tins (outgroups, name)