mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[8613] mail from battlemasters should be deleted after one day
This commit is contained in:
parent
caf4732e38
commit
21de4570dc
2 changed files with 11 additions and 1 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include "Unit.h"
|
||||
#include "Language.h"
|
||||
#include "DBCStores.h"
|
||||
#include "BattleGroundMgr.h"
|
||||
|
||||
enum MailShowFlags
|
||||
{
|
||||
|
|
@ -823,6 +824,15 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station
|
|||
expire_delay = HOUR;
|
||||
else
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
time_t expire_time = deliver_time + expire_delay;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8612"
|
||||
#define REVISION_NR "8613"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue