Merge remote branch 'origin/master' into 330

This commit is contained in:
tomrus88 2010-04-03 11:33:45 +04:00
commit d131f137cc
44 changed files with 670 additions and 498 deletions

View file

@ -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