* Remove useless CheckDB functionality. This does not belong in core in any shape or form.
--HG-- branch : trunk
This commit is contained in:
@@ -9014,28 +9014,3 @@ void ObjectMgr::LoadCreatureClassLevelStats()
|
|||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outString( ">> Loaded %u creature base stats.", counter);
|
sLog.outString( ">> Loaded %u creature base stats.", counter);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ObjectMgr::CheckDB() const
|
|
||||||
{
|
|
||||||
CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(28511);
|
|
||||||
if(!cInfo || cInfo->spells[4] != 51890)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(30068);
|
|
||||||
if(!cInfo || cInfo->faction_A != 21)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(28768); // Dark Rider of Acherus
|
|
||||||
if(!cInfo || !cInfo->ScriptID)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(32627); // Wintergrasp Siege Engine
|
|
||||||
if(!cInfo || !cInfo->spells[0] || cInfo->VehicleId != 117)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(33114); // Flame Leviathan Seat
|
|
||||||
if(!cInfo || cInfo->VehicleId != 341)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -934,8 +934,6 @@ class ObjectMgr
|
|||||||
GmTicketList m_GMTicketList;
|
GmTicketList m_GMTicketList;
|
||||||
uint64 GenerateGMTicketId();
|
uint64 GenerateGMTicketId();
|
||||||
|
|
||||||
bool CheckDB() const;
|
|
||||||
|
|
||||||
// for wintergrasp only
|
// for wintergrasp only
|
||||||
GraveYardMap mGraveYardMap;
|
GraveYardMap mGraveYardMap;
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -3982,12 +3982,3 @@ void SpellMgr::LoadSpellLinked()
|
|||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outString( ">> Loaded %u linked spells", count );
|
sLog.outString( ">> Loaded %u linked spells", count );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SpellMgr::CheckDB() const
|
|
||||||
{
|
|
||||||
SpellScriptTargetBounds bounds = spellmgr.GetSpellScriptTargetBounds(30531);
|
|
||||||
if(bounds.first == bounds.second || bounds.first->second.targetEntry != 17256)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1202,8 +1202,6 @@ class SpellMgr
|
|||||||
void LoadPetDefaultSpells();
|
void LoadPetDefaultSpells();
|
||||||
void LoadSpellAreas();
|
void LoadSpellAreas();
|
||||||
|
|
||||||
bool CheckDB() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _isPositiveSpell(uint32 spellId, bool deep) const;
|
bool _isPositiveSpell(uint32 spellId, bool deep) const;
|
||||||
bool _isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) const;
|
bool _isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) const;
|
||||||
|
|||||||
@@ -1203,7 +1203,6 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
m_configs[CONFIG_SHOW_KICK_IN_WORLD] = sConfig.GetBoolDefault("ShowKickInWorld", false);
|
m_configs[CONFIG_SHOW_KICK_IN_WORLD] = sConfig.GetBoolDefault("ShowKickInWorld", false);
|
||||||
m_configs[CONFIG_INTERVAL_LOG_UPDATE] = sConfig.GetIntDefault("RecordUpdateTimeDiffInterval", 60000);
|
m_configs[CONFIG_INTERVAL_LOG_UPDATE] = sConfig.GetIntDefault("RecordUpdateTimeDiffInterval", 60000);
|
||||||
m_configs[CONFIG_MIN_LOG_UPDATE] = sConfig.GetIntDefault("MinRecordUpdateTimeDiff", 10);
|
m_configs[CONFIG_MIN_LOG_UPDATE] = sConfig.GetIntDefault("MinRecordUpdateTimeDiff", 10);
|
||||||
m_configs[CONFIG_CHECK_DB] = sConfig.GetBoolDefault("CheckDB", true);
|
|
||||||
m_configs[CONFIG_NUMTHREADS] = sConfig.GetIntDefault("MapUpdate.Threads", 1);
|
m_configs[CONFIG_NUMTHREADS] = sConfig.GetIntDefault("MapUpdate.Threads", 1);
|
||||||
|
|
||||||
std::string forbiddenmaps = sConfig.GetStringDefault("ForbiddenMaps", "");
|
std::string forbiddenmaps = sConfig.GetStringDefault("ForbiddenMaps", "");
|
||||||
@@ -1612,19 +1611,6 @@ void World::SetInitialWorldSettings()
|
|||||||
if (!LoadScriptingModule())
|
if (!LoadScriptingModule())
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
/// Check db
|
|
||||||
if (m_configs[CONFIG_CHECK_DB])
|
|
||||||
{
|
|
||||||
sLog.outString("Checking DB...");
|
|
||||||
if (!objmgr.CheckDB() || !spellmgr.CheckDB())
|
|
||||||
{
|
|
||||||
sLog.outError("Your world DB is outdated. Please reapply sqls in sql\\FULL folder, or disable CheckDB option in config file (not recommended).");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
sLog.outError("You have disabled DB check. We strongly recommend you to enable it to prevent unpredictable bugs and crashes.");
|
|
||||||
|
|
||||||
///- Initialize game time and timers
|
///- Initialize game time and timers
|
||||||
sLog.outDebug("DEBUG:: Initialize game time and timers");
|
sLog.outDebug("DEBUG:: Initialize game time and timers");
|
||||||
m_gameTime = time(NULL);
|
m_gameTime = time(NULL);
|
||||||
|
|||||||
@@ -263,7 +263,6 @@ enum WorldConfigs
|
|||||||
CONFIG_SHOW_KICK_IN_WORLD,
|
CONFIG_SHOW_KICK_IN_WORLD,
|
||||||
CONFIG_INTERVAL_LOG_UPDATE,
|
CONFIG_INTERVAL_LOG_UPDATE,
|
||||||
CONFIG_MIN_LOG_UPDATE,
|
CONFIG_MIN_LOG_UPDATE,
|
||||||
CONFIG_CHECK_DB,
|
|
||||||
CONFIG_ENABLE_SINFO_LOGIN,
|
CONFIG_ENABLE_SINFO_LOGIN,
|
||||||
CONFIG_PLAYER_ALLOW_COMMANDS,
|
CONFIG_PLAYER_ALLOW_COMMANDS,
|
||||||
CONFIG_PET_LOS,
|
CONFIG_PET_LOS,
|
||||||
|
|||||||
@@ -2017,4 +2017,3 @@ ShowKickInWorld = 0
|
|||||||
RecordUpdateTimeDiffInterval = 60000
|
RecordUpdateTimeDiffInterval = 60000
|
||||||
MinRecordUpdateTimeDiff = 10
|
MinRecordUpdateTimeDiff = 10
|
||||||
PlayerStart.String = ""
|
PlayerStart.String = ""
|
||||||
CheckDB = 1
|
|
||||||
|
|||||||
Reference in New Issue
Block a user