HandleSendMailResultPacket
function · ui · orchestration
- Address
0x4ad050· 299 bytes, up to0x4ad17a- Signature
uint32_t __fastcall (void *param, uint32_t opcode, uint32_t time, CDataStore *msg)- Meaning
- Reads mail id, action and error; shows the error or runs the action; clears the flags, signals MAIL_FAILED
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/mail#mail-results
Finding: Mail results in ui: the mailbox and the inbox
SMSG_SEND_MAIL_RESULT (0x239, 0x4ad050) is three u32: the mail id, the action and the error; an error of 1 adds
a u32 inventory result. Only error 0 runs the action; every other error shows its text. Errors map to texts:
1 the inventory result's error, 2 ERR_MAIL_TO_SELF, 3 ERR_NOT_ENOUGH_MONEY, 4 ERR_MAIL_TARGET_NOT_FOUND,
5 ERR_PLAYER_WRONG_FACTION, 14 ERR_RESTRICTED_ACCOUNT, 15 ERR_MAIL_REACHED_CAP, and 6 to 13 and above 15
ERR_MAIL_DATABASE_ERROR. Action 0 shows ERR_MAIL_SENT and resets the compose state with events; 1 and 2 update
the stored mail (below); 3 and 4 remove it; 5 sets the text-created flag. After any result the pending flag is
cleared, an action 0 also clears the send-in-flight flag, and MAIL_FAILED fires.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 9
- CDataStore::GetInt32 base
- CGGameUI::DisplayError ui
- ResetCompose ui
- MailMoneyTaken ui
- MailItemTaken ui
- MailTextMadePermanent ui
- RemoveMail ui
- InventoryResultToError objectlayer
- FrameScript_SignalEvent ui
Calls and jumps by a bare address, from tables/calls.tsv.