mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Update build checks for mangosd/realmd.
This commit is contained in:
parent
0a01d2bc6e
commit
d81c9175d8
8 changed files with 37 additions and 12 deletions
|
|
@ -331,6 +331,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
sLog.outError("Found DBC files for build %u but mangosd expected DBC for one from builds: %s Please extract correct DBC files.", build, AcceptableClientBuildsListStr().c_str());
|
sLog.outError("Found DBC files for build %u but mangosd expected DBC for one from builds: %s Please extract correct DBC files.", build, AcceptableClientBuildsListStr().c_str());
|
||||||
else
|
else
|
||||||
sLog.outError("Incorrect DataDir value in mangosd.conf or not found build info (outdated DBC files). Required one from builds: %s Please extract correct DBC files.",AcceptableClientBuildsListStr().c_str());
|
sLog.outError("Incorrect DataDir value in mangosd.conf or not found build info (outdated DBC files). Required one from builds: %s Please extract correct DBC files.",AcceptableClientBuildsListStr().c_str());
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -617,31 +618,34 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldSafeLocsStore, dbcPath,"WorldSafeLocs.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldSafeLocsStore, dbcPath,"WorldSafeLocs.dbc");
|
||||||
|
|
||||||
// error checks
|
// error checks
|
||||||
if(bad_dbc_files.size() >= DBCFilesCount )
|
if (bad_dbc_files.size() >= DBCFilesCount )
|
||||||
{
|
{
|
||||||
sLog.outError("\nIncorrect DataDir value in mangosd.conf or ALL required *.dbc files (%d) not found by path: %sdbc",DBCFilesCount,dataPath.c_str());
|
sLog.outError("\nIncorrect DataDir value in mangosd.conf or ALL required *.dbc files (%d) not found by path: %sdbc",DBCFilesCount,dataPath.c_str());
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else if(!bad_dbc_files.empty() )
|
else if (!bad_dbc_files.empty() )
|
||||||
{
|
{
|
||||||
std::string str;
|
std::string str;
|
||||||
for(std::list<std::string>::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
|
for(std::list<std::string>::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
|
||||||
str += *i + "\n";
|
str += *i + "\n";
|
||||||
|
|
||||||
sLog.outError("\nSome required *.dbc files (%u from %d) not found or not compatible:\n%s",(uint32)bad_dbc_files.size(),DBCFilesCount,str.c_str());
|
sLog.outError("\nSome required *.dbc files (%u from %d) not found or not compatible:\n%s",(uint32)bad_dbc_files.size(),DBCFilesCount,str.c_str());
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check loaded DBC files proper version
|
// Check loaded DBC files proper version
|
||||||
if( !sAreaStore.LookupEntry(3617) || // last area (areaflag) added in 3.3.3a
|
if (!sAreaStore.LookupEntry(3617) || // last area (areaflag) added in 3.3.5a
|
||||||
!sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.3a
|
!sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.5a
|
||||||
!sGemPropertiesStore.LookupEntry(1629) || // last gem property added in 3.3.3a
|
!sGemPropertiesStore.LookupEntry(1629) || // last gem property added in 3.3.5a
|
||||||
!sItemStore.LookupEntry(54860) || // last client known item added in 3.3.3a
|
!sItemStore.LookupEntry(56806) || // last client known item added in 3.3.5a
|
||||||
!sItemExtendedCostStore.LookupEntry(2997) || // last item extended cost added in 3.3.3a
|
!sItemExtendedCostStore.LookupEntry(2997) || // last item extended cost added in 3.3.5a
|
||||||
!sMapStore.LookupEntry(724) || // last map added in 3.3.3a
|
!sMapStore.LookupEntry(724) || // last map added in 3.3.5a
|
||||||
!sSpellStore.LookupEntry(76567) ) // last added spell in 3.3.3a
|
!sSpellStore.LookupEntry(80864) ) // last added spell in 3.3.5a
|
||||||
{
|
{
|
||||||
sLog.outError("\nYou have mixed version DBC files. Please re-extract DBC files for one from client build: %s",AcceptableClientBuildsListStr().c_str());
|
sLog.outError("\nYou have mixed version DBC files. Please re-extract DBC files for one from client build: %s",AcceptableClientBuildsListStr().c_str());
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2434,6 +2434,7 @@ void ObjectMgr::LoadPetLevelInfo()
|
||||||
if(!pInfo || pInfo[0].health == 0 )
|
if(!pInfo || pInfo[0].health == 0 )
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Creature %u does not have pet stats data for Level 1!",itr->first);
|
sLog.outErrorDb("Creature %u does not have pet stats data for Level 1!",itr->first);
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2477,6 +2478,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outString( ">> Loaded %u player create definitions", count );
|
sLog.outString( ">> Loaded %u player create definitions", count );
|
||||||
sLog.outErrorDb( "Error loading `playercreateinfo` table or empty table.");
|
sLog.outErrorDb( "Error loading `playercreateinfo` table or empty table.");
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2756,6 +2758,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outString( ">> Loaded %u level health/mana definitions", count );
|
sLog.outString( ">> Loaded %u level health/mana definitions", count );
|
||||||
sLog.outErrorDb( "Error loading `player_classlevelstats` table or empty table.");
|
sLog.outErrorDb( "Error loading `player_classlevelstats` table or empty table.");
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2824,6 +2827,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||||
if(!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0 )
|
if(!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0 )
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Class %i Level 1 does not have health/mana data!",class_);
|
sLog.outErrorDb("Class %i Level 1 does not have health/mana data!",class_);
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2852,6 +2856,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outString( ">> Loaded %u level stats definitions", count );
|
sLog.outString( ">> Loaded %u level stats definitions", count );
|
||||||
sLog.outErrorDb( "Error loading `player_levelstats` table or empty table.");
|
sLog.outErrorDb( "Error loading `player_levelstats` table or empty table.");
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2942,6 +2947,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||||
if(!pInfo->levelInfo || pInfo->levelInfo[0].stats[0] == 0 )
|
if(!pInfo->levelInfo || pInfo->levelInfo[0].stats[0] == 0 )
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Race %i Class %i Level 1 does not have stats data!",race,class_);
|
sLog.outErrorDb("Race %i Class %i Level 1 does not have stats data!",race,class_);
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2975,6 +2981,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outString( ">> Loaded %u xp for level definitions", count );
|
sLog.outString( ">> Loaded %u xp for level definitions", count );
|
||||||
sLog.outErrorDb( "Error loading `player_xp_for_level` table or empty table.");
|
sLog.outErrorDb( "Error loading `player_xp_for_level` table or empty table.");
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2704,7 +2704,7 @@ enum TradeStatus
|
||||||
|
|
||||||
// we need to stick to 1 version or half of the stuff will work for someone
|
// we need to stick to 1 version or half of the stuff will work for someone
|
||||||
// others will not and opposite
|
// others will not and opposite
|
||||||
// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5 client build 12340...
|
// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5a client build 12340...
|
||||||
|
|
||||||
#define EXPECTED_MANGOSD_CLIENT_BUILD {12340, 0}
|
#define EXPECTED_MANGOSD_CLIENT_BUILD {12340, 0}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -888,6 +888,7 @@ void World::SetInitialWorldSettings()
|
||||||
!MapManager::ExistMapAndVMap(530,10349.6f,-6357.29f) || !MapManager::ExistMapAndVMap(530,-3961.64f,-13931.2f) ) )
|
!MapManager::ExistMapAndVMap(530,10349.6f,-6357.29f) || !MapManager::ExistMapAndVMap(530,-3961.64f,-13931.2f) ) )
|
||||||
{
|
{
|
||||||
sLog.outError("Correct *.map files not found in path '%smaps' or *.vmap/*vmdir files in '%svmaps'. Please place *.map/*.vmap/*.vmdir files in appropriate directories or correct the DataDir value in the mangosd.conf file.",m_dataPath.c_str(),m_dataPath.c_str());
|
sLog.outError("Correct *.map files not found in path '%smaps' or *.vmap/*vmdir files in '%svmaps'. Please place *.map/*.vmap/*.vmdir files in appropriate directories or correct the DataDir value in the mangosd.conf file.",m_dataPath.c_str(),m_dataPath.c_str());
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -895,7 +896,10 @@ void World::SetInitialWorldSettings()
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outString("Loading MaNGOS strings...");
|
sLog.outString("Loading MaNGOS strings...");
|
||||||
if (!sObjectMgr.LoadMangosStrings())
|
if (!sObjectMgr.LoadMangosStrings())
|
||||||
|
{
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1); // Error message displayed in function already
|
exit(1); // Error message displayed in function already
|
||||||
|
}
|
||||||
|
|
||||||
///- Update the realm entry in the database with the realm type from the config file
|
///- Update the realm entry in the database with the realm type from the config file
|
||||||
//No SQL injection as values are treated as integers
|
//No SQL injection as values are treated as integers
|
||||||
|
|
@ -1222,7 +1226,10 @@ void World::SetInitialWorldSettings()
|
||||||
|
|
||||||
sLog.outString( "Initializing Scripts..." );
|
sLog.outString( "Initializing Scripts..." );
|
||||||
if(!LoadScriptingModule())
|
if(!LoadScriptingModule())
|
||||||
exit(1);
|
{
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
|
exit(1); // Error message displayed in function already
|
||||||
|
}
|
||||||
|
|
||||||
///- Initialize game time and timers
|
///- Initialize game time and timers
|
||||||
sLog.outString( "DEBUG:: Initialize game time and timers" );
|
sLog.outString( "DEBUG:: Initialize game time and timers" );
|
||||||
|
|
@ -1334,6 +1341,7 @@ void World::DetectDBCLang()
|
||||||
if(default_locale >= MAX_LOCALE)
|
if(default_locale >= MAX_LOCALE)
|
||||||
{
|
{
|
||||||
sLog.outError("Unable to determine your DBC Locale! (corrupt DBC?)");
|
sLog.outError("Unable to determine your DBC Locale! (corrupt DBC?)");
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -291,6 +291,7 @@ void AuthSocket::SendProof(Sha1Hash sha)
|
||||||
case 11159: // 3.3.0a
|
case 11159: // 3.3.0a
|
||||||
case 11403: // 3.3.2
|
case 11403: // 3.3.2
|
||||||
case 11723: // 3.3.3a
|
case 11723: // 3.3.3a
|
||||||
|
case 12340: // 3.3.5a
|
||||||
default: // or later
|
default: // or later
|
||||||
{
|
{
|
||||||
sAuthLogonProof_S proof;
|
sAuthLogonProof_S proof;
|
||||||
|
|
@ -937,6 +938,7 @@ void AuthSocket::LoadRealmlist(ByteBuffer &pkt, uint32 acctid)
|
||||||
case 11159: // 3.3.0a
|
case 11159: // 3.3.0a
|
||||||
case 11403: // 3.3.2
|
case 11403: // 3.3.2
|
||||||
case 11723: // 3.3.3a
|
case 11723: // 3.3.3a
|
||||||
|
case 12340: // 3.3.5a
|
||||||
default: // and later
|
default: // and later
|
||||||
{
|
{
|
||||||
pkt << uint32(0);
|
pkt << uint32(0);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@ extern DatabaseType LoginDatabase;
|
||||||
// list sorted from high to low build and first build used as low bound for accepted by default range (any > it will accepted by realmd at least)
|
// list sorted from high to low build and first build used as low bound for accepted by default range (any > it will accepted by realmd at least)
|
||||||
|
|
||||||
static RealmBuildInfo ExpectedRealmdClientBuilds[] = {
|
static RealmBuildInfo ExpectedRealmdClientBuilds[] = {
|
||||||
{11723, 3, 3, 3, 'a'}, // highest supported build, also auto accept all above for simplify future supported builds testing
|
{12340, 3, 3, 5, 'a'}, // highest supported build, also auto accept all above for simplify future supported builds testing
|
||||||
|
{11723, 3, 3, 3, 'a'},
|
||||||
{11403, 3, 3, 2, ' '},
|
{11403, 3, 3, 2, ' '},
|
||||||
{11159, 3, 3, 0, 'a'},
|
{11159, 3, 3, 0, 'a'},
|
||||||
{10505, 3, 2, 2, 'a'},
|
{10505, 3, 2, 2, 'a'},
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ DatabaseMysql::DatabaseMysql() : Database(), mMysql(0)
|
||||||
if (!mysql_thread_safe())
|
if (!mysql_thread_safe())
|
||||||
{
|
{
|
||||||
sLog.outError("FATAL ERROR: Used MySQL library isn't thread-safe.");
|
sLog.outError("FATAL ERROR: Used MySQL library isn't thread-safe.");
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ void SQLStorageLoaderBase<T>::Load(SQLStorage &store)
|
||||||
if(!result)
|
if(!result)
|
||||||
{
|
{
|
||||||
sLog.outError("Error loading %s table (not exist?)\n", store.table);
|
sLog.outError("Error loading %s table (not exist?)\n", store.table);
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1); // Stop server at loading non exited table or not accessable table
|
exit(1); // Stop server at loading non exited table or not accessable table
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -159,6 +160,7 @@ void SQLStorageLoaderBase<T>::Load(SQLStorage &store)
|
||||||
store.RecordCount = 0;
|
store.RecordCount = 0;
|
||||||
sLog.outError("Error in %s table, probably sql file format was updated (there should be %d fields in sql).\n", store.table, store.iNumFields);
|
sLog.outError("Error in %s table, probably sql file format was updated (there should be %d fields in sql).\n", store.table, store.iNumFields);
|
||||||
delete result;
|
delete result;
|
||||||
|
Log::WaitBeforeContinueIfNeed();
|
||||||
exit(1); // Stop server at loading broken or non-compatible table.
|
exit(1); // Stop server at loading broken or non-compatible table.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue