mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8616] Some cleanups in WorldSession::SendMailTo
This commit is contained in:
parent
29e6601335
commit
f5db4fc163
2 changed files with 16 additions and 19 deletions
|
|
@ -818,19 +818,16 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station
|
||||||
|
|
||||||
time_t deliver_time = time(NULL) + deliver_delay;
|
time_t deliver_time = time(NULL) + deliver_delay;
|
||||||
|
|
||||||
// expire time if COD 3 days, if no COD 30 days, if auction sale pending 1 hour
|
|
||||||
uint32 expire_delay;
|
uint32 expire_delay;
|
||||||
if(messageType == MAIL_AUCTION && !mi && !money) // auction mail without any items and money
|
// auction mail without any items and money (auction sale note) pending 1 hour
|
||||||
|
if (messageType == MAIL_AUCTION && !mi && !money)
|
||||||
expire_delay = HOUR;
|
expire_delay = HOUR;
|
||||||
|
// mail from battlemaster (rewardmarks) should last only one day
|
||||||
|
else if (messageType == MAIL_CREATURE && sBattleGroundMgr.GetBattleMasterBG(sender_guidlow_or_entry) != BATTLEGROUND_TYPE_NONE)
|
||||||
|
expire_delay = DAY;
|
||||||
|
// default case: expire time if COD 3 days, if no COD 30 days
|
||||||
else
|
else
|
||||||
expire_delay = (COD > 0) ? 3 * DAY : 30 * DAY;
|
expire_delay = (COD > 0) ? 3 * DAY : 30 * DAY;
|
||||||
if (messageType == MAIL_CREATURE)
|
|
||||||
{
|
|
||||||
// mail from battlemaster (rewardmarks) should last only one day
|
|
||||||
BattleGroundTypeId bgTypeId = sBattleGroundMgr.GetBattleMasterBG(sender_guidlow_or_entry);
|
|
||||||
if (bgTypeId != BATTLEGROUND_TYPE_NONE)
|
|
||||||
expire_delay = DAY;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8615"
|
#define REVISION_NR "8616"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue