blob: c1d4279d17e6132f5ebbc5c6ecfd1c3fb1ecf007 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
# mail
[<-Back-to:Characters](database-characters.md)
**The \`mail\` table**
This table contains main data about all mails in the game.
**Structure**
| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
| ------------------- | -------- | ---------- | --- | ---- | ------- | ----- | ---------------------------------- |
| [id][1] | INT | UNSIGNED | PRI | NO | 0 | | Identifier |
| [messageType][2] | TINYINT | UNSIGNED | | NO | 0 | | |
| [stationery][3] | TINYINT | UNSIGNED | | NO | 41 | | |
| [mailTemplateId][4] | SMALLINT | UNSIGNED | | NO | 0 | | |
| [sender][5] | INT | UNSIGNED | | NO | 0 | | Character Global Unique Identifier |
| [receiver][6] | INT | UNSIGNED | | NO | 0 | | Character Global Unique Identifier |
| [subject][7] | LONGTEXT | SIGNED | | YES | | | |
| [body][8] | LONGTEXT | SIGNED | | YES | | | |
| [has_items][9] | TINYINT | UNSIGNED | | NO | 0 | | |
| [expire_time][10] | INT | UNSIGNED | | NO | 0 | | |
| [deliver_time][11] | INT | UNSIGNED | | NO | 0 | | |
| [money][12] | INT | UNSIGNED | | NO | 0 | | |
| [cod][13] | INT | UNSIGNED | | NO | 0 | | |
| [checked][14] | TINYINT | UNSIGNED | | NO | 0 | | |
| [auctionId][14] | INT | UNSIGNED | | NO | 0 | | |
[1]: #id
[2]: #messagetype
[3]: #stationery
[4]: #mailtemplateid
[5]: #sender
[6]: #receiver
[7]: #subject
[8]: #body
[9]: #hasitems
[10]: #expiretime
[11]: #delivertime
[12]: #money
[13]: #cod
[14]: #checked
[15]: #auctionid
**Description of the fields**
### id
This field contains unique ID of any messages.
Don't have autoincrement !!!
### messageType
- 0 = Normal
- 1 = doesn't exist
- 2 = Auction
- 3 = Creature
- 4 = Gameobject
- 5 = Item
### stationery
This field can contain these values:
- 1 = Test
- 41 = Normal mail layout
- 61 = GM (Blizzard)
- 62 = Auction
- 64 = VAL (???)
- 65 = CHR (???)
### mailTemplateId
Id from MailTemplate.dbc
### sender
In this field is entered sender [character.guid](character#guid).
### receiver
Here is receiver's [character.guid](character#guid).
### subject
Here is stored mail subject.
If [stationery][3] is 62, subject has formatted data:
`itemEntry:0:response:lotId:itemCount`
- **itemEntry**: entry field from item_template table
- 0: allways 0
- **response**: Flag from 0 to 6
| Flag | Comment |
| ---- | --------------------------- |
| 0 | AUCTION_OUTBIDDED |
| 1 | AUCTION_WON |
| 2 | AUCTION_SUCCESSFUL |
| 3 | AUCTION_EXPIRED |
| 4 | AUCTION_CANCELLED_TO_BIDDER |
| 5 | AUCTION_CANCELED |
| 6 | AUCTION_SALE_PENDING |
- **lotId**: id field from auctionhouse table
- **itemCount**: amount of item at this Lot
### body
The text contained in the mail. Max length is 8000 characters.
If [stationery][3] is 62, body has formatted data:
`hexID:bid:buyout:deposit:cut:delay:eta`
- **hexID**: hex value of itemowner's GUID (guid field from characters table)
- **bid**: ending bid for this lot
- **buyout**: buyout price of lot
- **deposit**: amount of money which will be taken by auctionhouse and returned then auction ends
- **cut**: Commission fee. Will be taken by auctionhouse then auction ends
- **delay**: time in seconds to delay mail with money for successfully solded lot
- **eta**: packed time to next mail whth money which appears in mail heder and body of notification mail
This formatted data seen only in mail with notification about successful auction or about pending mail with money.
### has_items
Default: 0,
When is set to 1, that mail can contain items.
For items look at [mail\_items](mail_items) table.
### expire\_time
Here is timestamp which stores date for auto-return mail to sender or delete if [stationery][3] is 62 (AuctionHouse).
### deliver\_time
Here is timestamp which stores date when mail must be delivered to receiver. Can be delayed mails from AuctionHouse.
### money
The ammout of money in mail, or money to pay when is COD.
### cod
Default: 0 - No COD,
when is set to 1, that field \`money\` stores gold for COD.
### checked
| Flag | Comment |
| ---- | --------------------------- |
| 0 | MAIL_CHECK_MASK_NONE |
| 1 | MAIL_CHECK_MASK_READ |
| 2 | MAIL_CHECK_MASK_RETURNED |
| 4 | MAIL_CHECK_MASK_COPIED |
| 8 | MAIL_CHECK_MASK_COD_PAYMENT |
| 16 | MAIL_CHECK_MASK_HAS_BODY |
### auctionId
Only if [stationery][3] is 62.
Lot id from AuctionHouse. Can be negative vector in case of delayed mail with money sended by Auction to Lot-owner.
For example:
[auctionId][14] = 777 : mail to Lot-owner, contains money for sended Lot id 777. Delivered money.
[auctionId][14] = -777 : mail contains info that Lot id 777 is sold. Money will be delivered in next mail, time of deliver is set in [`deliver_time`][11] field.
|