mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9650] Some corpse related clean ups.
Old bones remove code anyway was dead, so remove it. Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
8b87c7ec97
commit
6750ce9185
19 changed files with 34 additions and 207 deletions
|
|
@ -51,7 +51,6 @@
|
|||
#include "BattleGroundMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "GlobalEvents.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "PoolManager.h"
|
||||
#include "Database/DatabaseImpl.h"
|
||||
|
|
@ -894,8 +893,8 @@ void World::SetInitialWorldSettings()
|
|||
uint32 realm_zone = getConfig(CONFIG_UINT32_REALM_ZONE);
|
||||
loginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%d'", server_type, realm_zone, realmID);
|
||||
|
||||
///- Remove the bones after a restart
|
||||
CharacterDatabase.Execute("DELETE FROM corpse WHERE corpse_type = '0'");
|
||||
///- Remove the bones (they should not exist in DB though) and old corpses after a restart
|
||||
CharacterDatabase.PExecute("DELETE FROM corpse WHERE corpse_type = '0' OR time < (UNIX_TIMESTAMP()-'%u')", 3*DAY);
|
||||
|
||||
///- Load the DBC files
|
||||
sLog.outString("Initialize data stores...");
|
||||
|
|
@ -1233,8 +1232,7 @@ void World::SetInitialWorldSettings()
|
|||
m_timers[WUPDATE_AUCTIONS].SetInterval(MINUTE*IN_MILLISECONDS);
|
||||
m_timers[WUPDATE_UPTIME].SetInterval(m_configUint32Values[CONFIG_UINT32_UPTIME_UPDATE]*MINUTE*IN_MILLISECONDS);
|
||||
//Update "uptime" table based on configuration entry in minutes.
|
||||
m_timers[WUPDATE_CORPSES].SetInterval(20*MINUTE*IN_MILLISECONDS);
|
||||
//erase corpses every 20 minutes
|
||||
m_timers[WUPDATE_CORPSES].SetInterval(3*HOUR*IN_MILLISECONDS);
|
||||
|
||||
//to set mailtimer to return mails every day between 4 and 5 am
|
||||
//mailtimer is increased when updating auctions
|
||||
|
|
@ -1417,7 +1415,7 @@ void World::Update(uint32 diff)
|
|||
{
|
||||
m_timers[WUPDATE_CORPSES].Reset();
|
||||
|
||||
CorpsesErase();
|
||||
sObjectAccessor.RemoveOldCorpses();
|
||||
}
|
||||
|
||||
///- Process Game events when necessary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue