Mercurial > wow > ouroloot
diff core.lua @ 68:3bed6d51e077
Make sure subgroup field is always set to non-nil. ("Belt *and* suspenders." Handle a previously-set nil field during text creation.)
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Wed, 09 May 2012 09:38:14 +0000 |
parents | c01875b275ca |
children | 8442272a8418 |
line wrap: on
line diff
--- 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))