Mercurial > wow > ouroloot
comparison core.lua @ 15:d8fee518ce5d
Avoid key binding errors, correct BoT tag.
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Sun, 17 Jul 2011 17:40:00 +0000 |
| parents | a91cd74d8df9 |
| children | 5ee4edd24c13 |
comparison
equal
deleted
inserted
replaced
| 14:a91cd74d8df9 | 15:d8fee518ce5d |
|---|---|
| 371 end | 371 end |
| 372 end | 372 end |
| 373 end | 373 end |
| 374 | 374 |
| 375 if opts.keybinding then | 375 if opts.keybinding then |
| 376 KeyBindingFrame_LoadUI() | |
| 376 local btn = CreateFrame("Button", "OuroLootBindingOpen", nil, "SecureActionButtonTemplate") | 377 local btn = CreateFrame("Button", "OuroLootBindingOpen", nil, "SecureActionButtonTemplate") |
| 377 btn:SetAttribute("type", "macro") | 378 btn:SetAttribute("type", "macro") |
| 378 btn:SetAttribute("macrotext", "/ouroloot toggle") | 379 btn:SetAttribute("macrotext", "/ouroloot toggle") |
| 379 if SetBindingClick(opts.keybinding_text, "OuroLootBindingOpen") then | 380 if SetBindingClick(opts.keybinding_text, "OuroLootBindingOpen") then |
| 380 SaveBindings(GetCurrentBindingSet()) | 381 -- a simple SaveBindings(GetCurrentBindingSet()) occasionally fails when GCBS |
| 382 -- decides to return neither 1 nor 2 during load | |
| 383 local c = GetCurrentBindingSet() | |
| 384 if c == ACCOUNT_BINDINGS or c == CHARACTER_BINDINGS then | |
| 385 SaveBindings(c) | |
| 386 end | |
| 381 else | 387 else |
| 382 self:Print("Error registering '%s' as a keybinding, check spelling!", opts.keybinding_text) | 388 self:Print("Error registering '%s' as a keybinding, check spelling!", opts.keybinding_text) |
| 383 end | 389 end |
| 384 end | 390 end |
| 385 | 391 |
| 901 self.hist_clean = nil | 907 self.hist_clean = nil |
| 902 if g_restore_p then | 908 if g_restore_p then |
| 903 g_loot = OuroLootSV | 909 g_loot = OuroLootSV |
| 904 self.popped = true | 910 self.popped = true |
| 905 self.dprint('flow', "restoring", #g_loot, "entries") | 911 self.dprint('flow', "restoring", #g_loot, "entries") |
| 906 self:ScheduleTimer("Activate", 8, g_loot.threshold) | 912 self:ScheduleTimer("Activate", 12, g_loot.threshold) |
| 907 -- FIXME printed could be too large if entries were deleted, how much do we care? | 913 -- FIXME printed could be too large if entries were deleted, how much do we care? |
| 908 self.sharder = g_loot.autoshard | 914 self.sharder = g_loot.autoshard |
| 909 else | 915 else |
| 910 g_loot = { printed = {}, raiders = {} } | 916 g_loot = { printed = {}, raiders = {} } |
| 911 g_loot.saved = g_saved_tmp; g_saved_tmp = nil -- potentially restore across a clear | 917 g_loot.saved = g_saved_tmp; g_saved_tmp = nil -- potentially restore across a clear |
| 1099 do | 1105 do |
| 1100 -- This shouldn't be required. /sadface | 1106 -- This shouldn't be required. /sadface |
| 1101 local loot_entry_mt = { | 1107 local loot_entry_mt = { |
| 1102 __index = function (e,key) | 1108 __index = function (e,key) |
| 1103 if key == 'cols' then | 1109 if key == 'cols' then |
| 1104 pprint('mt', e.kind) | 1110 pprint('mt', e.kind, "key is", key) |
| 1105 --tabledump(e) -- not actually that useful | 1111 --tabledump(e) -- not actually that useful |
| 1106 addon:_fill_out_eoi_data(1) | 1112 addon:_fill_out_eoi_data(1) |
| 1107 end | 1113 end |
| 1108 return rawget(e,key) | 1114 return rawget(e,key) |
| 1109 end | 1115 end |
