Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-26-09, 07:44 PM   #1
seebs
Premium Member
Premium Member
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 155
Mail API...

I would like to someday fix SimpleMail.

Here's the basic problem: As of the last time I looked at the API, there was only one event available to determine that Something Has Changed In The Mailbox. There was no way to find out what specifically happened.

So... Let's say I try to grab an item from a mailbox slot.

Have I succeeded? I don't know. I can't ask for "notify me when that item has been successfully grabbed." If I try to grab items without waiting for events, most of them never get grabbed. If I wait for events... Well, how many should I wait for? If I only wait for one, I get extra notifications later which I misinterpret as responses to later actions. If I wait for several, I sometimes guess wrong how many I was expecting. If the mailbox happens to decide to reload with additional items while I'm clearing stuff out, things get even more confused.

Is there a sane way to do this? The basic thing I want to do is "identify a list of matching messages, then grab all objects and money from them." The second part seems to be the hard part. I have something that works about 80% of the time, but sometimes you have to reset it and try again, and I don't know exactly why. I'm not sure whether there's a viable way to approach this.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Mail API...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off