Mercurial > wow > ouroloot
comparison core.lua @ 8:30ba1f35e164
Minor tweaks, fold in reload
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Fri, 17 Jun 2011 00:13:35 +0000 |
parents | df3e27edbd60 |
children | 67b8537e8432 |
comparison
equal
deleted
inserted
replaced
7:9a37bd40eb5e | 8:30ba1f35e164 |
---|---|
353 _init(self) | 353 _init(self) |
354 self.OnInitialize = nil | 354 self.OnInitialize = nil |
355 end | 355 end |
356 | 356 |
357 function addon:OnEnable() | 357 function addon:OnEnable() |
358 --if not OuroLootSV_hist.PLAYER_LOGOUT then print"did not safely logout?" end; OuroLootSV_hist.PLAYER_LOGOUT = nil | |
359 self:RegisterEvent "PLAYER_LOGOUT" | 358 self:RegisterEvent "PLAYER_LOGOUT" |
360 self:RegisterEvent "RAID_ROSTER_UPDATE" | 359 self:RegisterEvent "RAID_ROSTER_UPDATE" |
361 | 360 |
362 -- Cribbed from Talented. I like the way jerry thinks: the first argument | 361 -- Cribbed from Talented. I like the way jerry thinks: the first argument |
363 -- can be a format spec for the remainder of the arguments. (The new | 362 -- can be a format spec for the remainder of the arguments. (The new |
396 function addon:_clear_SVs() | 395 function addon:_clear_SVs() |
397 g_loot = {} -- not saved, just fooling PLAYER_LOGOUT tests | 396 g_loot = {} -- not saved, just fooling PLAYER_LOGOUT tests |
398 OuroLootSV = nil | 397 OuroLootSV = nil |
399 OuroLootSV_opts = nil | 398 OuroLootSV_opts = nil |
400 OuroLootSV_hist = nil | 399 OuroLootSV_hist = nil |
400 ReloadUI() | |
401 end | 401 end |
402 function addon:PLAYER_LOGOUT() | 402 function addon:PLAYER_LOGOUT() |
403 if (#g_loot > 0) or g_loot.saved | 403 if (#g_loot > 0) or g_loot.saved |
404 or (g_loot.forum and g_loot.forum ~= "") | 404 or (g_loot.forum and g_loot.forum ~= "") |
405 or (g_loot.attend and g_loot.attend ~= "") | 405 or (g_loot.attend and g_loot.attend ~= "") |
410 e.cols = nil | 410 e.cols = nil |
411 end | 411 end |
412 OuroLootSV = g_loot | 412 OuroLootSV = g_loot |
413 end | 413 end |
414 for r,t in pairs(self.history_all) do if type(t) == 'table' then | 414 for r,t in pairs(self.history_all) do if type(t) == 'table' then |
415 t.realm = nil | 415 if #t == 0 then |
416 t.st = nil | 416 self.history_all[r] = nil |
417 t.byname = nil | 417 else |
418 t.realm = nil | |
419 t.st = nil | |
420 t.byname = nil | |
421 end | |
418 end end | 422 end end |
419 OuroLootSV_hist = self.history_all | 423 OuroLootSV_hist = self.history_all |
420 --OuroLootSV_hist.PLAYER_LOGOUT = true | |
421 end | 424 end |
422 | 425 |
423 function addon:RAID_ROSTER_UPDATE (event) | 426 function addon:RAID_ROSTER_UPDATE (event) |
424 if GetNumRaidMembers() > 0 then | 427 if GetNumRaidMembers() > 0 then |
425 local inside,whatkind = IsInInstance() | 428 local inside,whatkind = IsInInstance() |