Postman

From WowAce Wiki

Jump to: navigation, search
Summary
Postman
Building a Better Mailbox
TOC 2.3 (20300)
Category Mail Addons
Author Bima
Details
Version 2.0
Credits MailTo by Vincent of Blackhand and CT_MailMod by CTMod Team
Embeds Ace2
OptionalDeps Abacus, CharacterProfiler
Links
Betas Ace SVN Zip
Changelog FishEye
  • WARNING: A bug in versions prior to 2.0.24188 could result in items being accidentally deleted when a message summary was right clicked in the inbox. Be sure to use 2.0.24188 or later. This would happen when the TakeInboxItem() API failed; the function itself doesn't provide direct feedback about failure. Now Postman doublechecks that the item is no longer attached before attempting deletion.


Contents

Overview

Postman is a mail mod based around features of both MailTo, by Vincent of Blackhand, and CT_MailMod, by Cide and the CTMod Team. It is a ground-up, but not clean room, rewrite of those features in the Ace2 framework.

The following features are currently implemented, and credited to their respective source:

  • Memorized recipient list for drop down selection. (MailTo)
  • Remembers last recipient to fill in for next message. (MailTo)
  • Drop down list added to autocompletion list.
  • Alt-LeftClick to attach item to mail, place in AH, add to trade or initiate trade. (CT_MailMod and MailTo)
  • Alt-LeftClick with "/postman autosend" toggled on will automatically send the item to the recipient in the To: field. (MailTo)
  • Right click on message summary in inbox collects item and money. (MailTo)
  • Reports when an item has been delivered. (MailTo)
  • "/postman track" reports how long til items are delivered. (MailTo)
  • /pm and /pman are aliases for /postman

Notes

I've made some design decisions which some people might think should have been made differently, so as issues come up I'll put them here.

  • Messages that have body text will never be autodeleted; right click will just open the message so you can delete it manually. I did not want to risk accidental deletion of messages, because unlike the items or money you take from a message, once the message is deleted, the text is just gone. (Unless you took the text as an attachment, which causes the message to be deleted anyway.)

Because of aspects of how the Blizzard mail UI works, several things don't work quite the way I would like them to. Here are some of them. If you're curious for more information, the code usually has a lengthy comment explaining the issue.

  • TakeInboxMoney() and TakeInboxItem() seem to be subject to the UI action rules; right click doesn't seem to be able to collect both money and an item at once. A message that has both will need at least two clicks to collect them, the first for the money and the second for the item.
  • DeleteInboxItem() doesn't always delete an item, there seems to be some sort of synchronicity issue with the server. So though autodeletion of the message will usually work when you right click to retrieve an item from a message which has no money, it often doesn't when you collect money. So a message with no body but with an item and money can take up to three clicks to fully process, one to get the money, one for the item, and possibly one more to actually delete it.
  • GetInboxText() is weird. The first time a message is read, it returns nil, but subsequent times, even after relogging (not sure about after server restarts) it will return the actual body. This is a magic nil, which acquires a valid string value later, but too late for Postman to make use of it. To keep messages with body text from being autodeleted, I check the "wasread" attribute of the header as well. This means a message with no items/money/body will not be autodeleted on the first right click, but will on the second.
  • Currently the item strings of mailed items are not noted, only their names and stack counts. WoW patch 2.0.3 has blissfully provided APIs to allow me to get the item string information so this will be able to be added without going through the convoluted measures I had in development.

TODO

These features are not yet implemented, but are coming soon. They are listed in the order I expect to add them. I will probably be doing the MailTo features first since it means that MailTo users who desire to switch to just Postman could then convert sooner.

  • Modularize.

MailTo-inspired features

  • Auction House invoice reporting in chat when item is collected.
  • Tracking mail expiry.
    • Also remember messages past the 50 item Blizzard display limit. As far as I know, no mod does this.
  • Right click to add items to send/trade/auction.
    • Not doable with the default bags because of the annoying way in which right click is protected?
    • Might do this in a way like MailToNext, by devilcat, which made right clicking work again by using a custom frame. One advantage of this custom frame is that it can list only non-soulbound items.

CT_MailMod-inspired features

  • Open all messages on inbox frame.
  • Forward button on message frame.
  • Select messages to group open/return/forward on inbox frame.
  • Mass mailing on separate tab.

Other

  • FuBar support.
  • Option to turn off the ding sound for mail delivery.
  • Store item strings instead of names.

TODONT

These ideas are not likely to be implemented, but have been considered. I might put them in if there is sufficient demand, so just because they're in TODONT doesn't mean they're totally ruled out.

MailTo features:

  • Mailbox item viewer when away from mailbox.
    • Rummage provides a simple chat command for finding what items you have in your mailboxes.
  • Report sum of money collected from mailbox.
  • Auction searching or and stack splitting.
    • It just doesn't belong in a mail mod.

CT_MailMod features:

  • Block trades while at mailbox.
  • Changing the pushable frame attributes.
  • Attempt to grey out bag items that are in trade window.
    • It is a nice idea, but as near as I can tell, this doesn't even fully work in CT_MailMod and I'm not convinced the added code is worth it.
  • Autofills subject with form "Stack Item xN".
    • The default Blizzard client now autofills subject with "Stack Item (N)".

Other ideas:

  • Add submenu to drop down list for people recently sent to, suggested by Eric S.
  • Autofill Subject with money sent. (I might end up doing this one anyway.)
  • FuBar_MailFu-like reporting of how many new messages you have waiting, requested by StormFX.

Development Notes

  • Will need to store information on items that is in the process of being delivered, and then update CharacterProfiler's myProfile when it has reached the destination.
  • Will probably also want to remember mailbox contents in its own db, rather than requiring CharacterProfiler for this data.
  • Should note specially when an item is expiring that is not returnable to a known alt.
    • Such as when it came from the Auction House.
    • Or from someone not a known alt.
    • Or is itself a return bounce from a known alt.
  • In theory could maintain memory of items past the 50 item limit that the Blizzard UI provides (and thus that CharacterProfiler is limited by) but this is complicated because messages do not have unique IDs so it is difficult to tell exactly what's what.
    • Consider this example:
      • Alice and Bob are two characters on your account, both on the same server and faction.
      • Alice has exactly 10 items in her mailbox:
        • 1-3 are full stacks of Iron Ore
        • 4 is a full stack of Solid Stone
        • 5-8 are full stack of Mithril Ore
        • 9-10 are full stacks of Heavy Stone
      • From Bob, you send Alice two full stacks of Thorium Ore.
      • After 1 hour, Postman dutifully notes the delivery and updates myProfile for CharacterProfiler.
      • You log in to Alice and check mail.
      • Unbeknownst to Postman, your friend Charlie has also sent you three stacks of Dense Stone.
      • You open your inbox on Alice and without taking anything out you close it again.
      • CharacterProfiler now observes that you have:
        • 1-2 are Thorium Ore
        • 3-5 are Dense Stone
        • 6-8 are Iron Ore
        • 9 is Solid Stone
        • 10 is Mithril Ore
      • Hidden within the bowels of Blizzard's server are:
        • 11-12 are Mithril Ore
        • 13-14 are Heavy Stone
      • CharacterProfiler no longer knows about items 11-14, so as they get closer to expiring, Postman won't be able to report on them.
    • Postman could put that data back into myProfile. This is where the tricky bit is, maintaining the data structure appropriately as messages are opened.
      • Postman would need to remember the state of myProfile before the mailbox was opened and CharacterProfiler resets everything.
      • Keeping track of messages by their specific expiry time could help. The sender/item/count/expiry tuple should be as near to unique as can be hoped.
      • If myProfile gets out of sync with what's really in the mailbox, such as because you use more than one computer, you're pretty much hosed if there are 50 or more items in the mail. Fewer than 50 and you could presumably trust the CharacterProfiler data as being accurate, but then there also seems to be an issue with a delay between when you take items out of your mailbox and when Blizzard starts letting you know about the ones that were beyond the ones you took out.
        • Probably need some sort of resync timer to be able to trust that the mailbox really is under 50 items if it had more than 50 items.

--Tale/Bima

Bold text

Personal tools
Support the Site