Mercurial > wow > mailopener
comparison Core.lua @ 1:6f17035de058
MO will now request a server refresh when mail opening has finished, ignoring the timer.
(Collected Module) Fixed the time spent to only be displayed if it is being tracked.
The inventory full sound will properly be played again when your bags change.
| author | Zerotorescue |
|---|---|
| date | Sun, 05 Sep 2010 17:02:19 +0200 |
| parents | 823e33465b6e |
| children | 57ba1593ac42 |
comparison
equal
deleted
inserted
replaced
| 0:823e33465b6e | 1:6f17035de058 |
|---|---|
| 191 -- Refresh the frame to instantly show the right options | 191 -- Refresh the frame to instantly show the right options |
| 192 InterfaceOptionsFrame_OpenToCategory(self.name) | 192 InterfaceOptionsFrame_OpenToCategory(self.name) |
| 193 end); | 193 end); |
| 194 -- And add it to the interface options | 194 -- And add it to the interface options |
| 195 InterfaceOptions_AddCategory(frame); | 195 InterfaceOptions_AddCategory(frame); |
| 196 | |
| 197 -- If the above becomes impossible this is another way to load the config module when required due to Interface/AddOns options | |
| 198 --InterfaceOptionsFrameTab2:HookScript("OnClick", function() | |
| 199 -- -- Load the config module | |
| 200 -- MailOpener:EnableConfigModule(); | |
| 201 | |
| 202 -- -- Load the options and add it to the blizzard interface list | |
| 203 -- MailOpenerConfig:Load(); | |
| 204 --end); | |
| 205 end | 196 end |
| 206 | 197 |
| 207 function MailOpener:OnEnable() | 198 function MailOpener:OnEnable() |
| 208 self:RegisterEvent("MAIL_SHOW"); | 199 self:RegisterEvent("MAIL_SHOW"); |
| 209 self:RegisterEvent("PLAYER_ENTERING_WORLD"); | 200 self:RegisterEvent("PLAYER_ENTERING_WORLD"); |
| 419 end | 410 end |
| 420 end | 411 end |
| 421 | 412 |
| 422 function MailOpener:MO_OPEN_COMPLETE() | 413 function MailOpener:MO_OPEN_COMPLETE() |
| 423 opening = false; | 414 opening = false; |
| 424 | 415 |
| 416 -- Try a recheck | |
| 417 self:Recheck(); | |
| 418 | |
| 425 local current, total = GetInboxNumItems(); | 419 local current, total = GetInboxNumItems(); |
| 426 | 420 |
| 427 if (total - current) == 0 then | 421 if (total - current) == 0 then |
| 428 -- Play the sound | 422 -- Play the sound |
| 429 if self.db.profile.notifications.mailboxEmptySound and (not MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce or not mailboxEmptySoundPlayed) then | 423 if self.db.profile.notifications.mailboxEmptySound and (not MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce or not mailboxEmptySoundPlayed) then |
| 613 end, | 607 end, |
| 614 timeout = 0, | 608 timeout = 0, |
| 615 whileDead = 1, | 609 whileDead = 1, |
| 616 hideOnEscape = 1, | 610 hideOnEscape = 1, |
| 617 maxLetters = 1024, | 611 maxLetters = 1024, |
| 618 } | 612 }; |
| 613 | |
| 614 -- The below either has to be removed or changed when releasing | |
| 619 | 615 |
| 620 function MailOpener:ShowBetaPopup() | 616 function MailOpener:ShowBetaPopup() |
| 621 function TableDump(key, val, jumps) | 617 function TableDump(key, val, jumps) |
| 622 local cache = ""; | 618 local cache = ""; |
| 623 | 619 |
