Mailbox

From ArcEmu-Wiki
Revision as of 12:32, 24 April 2012 by Magnifikator (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

message_id

Unique message id. Every new message gets a new auto incremented id.

message_type

        NORMAL  = 0
        COD     = 1
        AUCTION = 2

player_guid

Guid of the character who receives the mail.

sender_guid

Guid of the character who sends the mail.

subject

Subject of the mail.

body

Body of the mail. It's the actual message.

money

Amount of money sent.

If you wanna send 100 gold 55 silver 33 copper then its 1005533

attached_item_guids

The Guids of the attached items.

cod

Amount of money needed (COD).

stationary

(Background ID):

1 = plain + purple scroll icon
41 = Normal Mail
61 = Customer Service
62 = Auction House
64 = Valentine's Day
65 = Christmas
There's a least 3 more. You can find them in World of Warcraft\Data\enUS\locale-enUS.MPQ\Interface\Stationery\

expiry_time

Current Unix Time + Unix Time till expiry.

Example:

current unix time + 86400 (seconds for one day) = expiry date

In this example the mail would expire after one day.

delivery_time

Current Unix Time + Unix Time till delivery.

Example:

current unix time + 86400 (seconds for one day) = delivery date

In this example the mail would be delivered after one day.

checked_flag

Flag Mask (According to MailSystem.h):

MAIL_CHECK_MASK_NONE 0x00 0 0000 0000
MAIL_CHECK_MASK_READ 0x01 1 0000 0001
MAIL_CHECK_MASK_RETURNED 0x02 2 0000 0010
MAIL_CHECK_MASK_COPIED (?) 0x04 4 0000 0100
MAIL_CHECK_MASK_COD_PAYMENT 0x08 8 0000 1000
MAIL_CHECK_MASK_HAS_BODY 0x10 16 0001 0000

Common values:
4 = Mail has no body (subject only) [TODO: check this behaviour]
16 = Mail was not read
17 = Mail was read

deleted_flag

Flags:
1 = Mail was deleted
0 = Mail was not deleted

SQL Structure

CREATE TABLE `mailbox` (
  `message_id` int(30) NOT NULL DEFAULT '0',
  `message_type` int(30) NOT NULL DEFAULT '0',
  `player_guid` int(30) NOT NULL DEFAULT '0',
  `sender_guid` int(30) NOT NULL DEFAULT '0',
  `subject` varchar(255) NOT NULL DEFAULT '',
  `body` longtext NOT NULL,
  `money` int(30) NOT NULL DEFAULT '0',
  `attached_item_guids` varchar(200) NOT NULL DEFAULT '',
  `cod` int(30) NOT NULL DEFAULT '0',
  `stationary` int(30) NOT NULL DEFAULT '0',
  `expiry_time` int(30) NOT NULL DEFAULT '0',
  `delivery_time` int(30) NOT NULL DEFAULT '0',
  `checked_flag` int(30) NOT NULL DEFAULT '0',
  `deleted_flag` int(30) NOT NULL DEFAULT '0',
  PRIMARY KEY (`message_id`),
  KEY `b` (`player_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Personal tools