Jump to content

begemot

Members
  • Posts

    21
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

About begemot

  • Birthday 01/01/1970

begemot's Achievements

Member

Member (2/3)

0

Reputation

  1. Small patch, just print to output wright number of dbc files. For master branch, commit [d2ae28b9165a17cfa6047c2be496081dda2e8bba]. diff --git a/contrib/extractor/System.cpp b/contrib/extractor/System.cpp index 3a9650c..b0cff97 100644 --- a/contrib/extractor/System.cpp +++ b/contrib/extractor/System.cpp @@ -974,10 +974,11 @@ void ExtractDBCFiles(int locale, bool basicLocale) string filename = path; filename += (iter->c_str() + strlen("DBFilesClient\\\\")); - if(ExtractFile(iter->c_str(), filename)) + if (ExtractFile(iter->c_str(), filename)) { ++count; + } } - printf("Extracted %u DBC files\\n\\n", count); + printf("Extracted %u DBC files\\n\\n", count + 1); } void LoadLocaleMPQFiles(int const locale)
  2. And I thought that it was so because close to Bliz. data structures... And because in case of split field "data" into several fields - there will be too many fields... may be it will bring DB to slower work and some other problems... If you have to do some DB just make to "work" will you do it such hard way ?
  3. Which disadvantages do you see in current position of patch object ? And why current system was done in such way ?
  4. But as you can see I use "\\t" in string literals... And one post above I wrote that changed tabs in code to for spaces each.
  5. Each tab in code changed to 4 spaces. diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp index 140aa78..4fa4121 100644 --- a/src/game/GameEventMgr.cpp +++ b/src/game/GameEventMgr.cpp @@ -95,7 +95,7 @@ void GameEventMgr::LoadFromDB() QueryResult *result = WorldDatabase.Query("SELECT MAX(entry) FROM game_event"); if( !result ) { - sLog.outString(">> Table game_event is empty."); + sLog.outString(">> Table game_event is empty!"); sLog.outString(); return; } diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp index 2db0c49..7d76e05 100644 --- a/src/game/InstanceSaveMgr.cpp +++ b/src/game/InstanceSaveMgr.cpp @@ -342,30 +342,28 @@ void InstanceSaveManager::PackInstances() delete result; } - barGoLink bar( InstanceSet.size() + 1); - bar.step(); - uint32 InstanceNumber = 1; - // we do assume std::set is sorted properly on integer value - for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i) - { - if (*i != InstanceNumber) - { - // remap instance id - WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i); - CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - } - - ++InstanceNumber; - bar.step(); - } - + if (!(InstanceSet.size())) { + barGoLink bar(1); + bar.step(); + } else { + barGoLink bar(InstanceSet.size()); + // we do assume std::set is sorted properly on integer value + for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i) { + if (*i != InstanceNumber) { + // remap instance id + WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i); + CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + } + ++InstanceNumber; + bar.step(); + } + } sLog.outString( ">> Instance numbers remapped, next instance id is %u", InstanceNumber ); - sLog.outString(); } void InstanceSaveManager::LoadResetTimes() diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp index 44c6cab..3699598 100644 --- a/src/game/PoolHandler.cpp +++ b/src/game/PoolHandler.cpp @@ -378,25 +378,20 @@ void PoolHandler::LoadFromDB() } uint32 count = 0; - - barGoLink bar(result->GetRowCount()); - do - { - ++count; - Field *fields = result->Fetch(); - - bar.step(); - - uint16 pool_id = fields[0].GetUInt16(); - - PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id]; - pPoolTemplate.MaxLimit = fields[1].GetUInt32(); - - } while (result->NextRow()); - - sLog.outString(); - sLog.outString( ">> Loaded %u objects pools", count ); - delete result; + { + barGoLink bar(result->GetRowCount()); + do { + ++count; + Field *fields = result->Fetch(); + bar.step(); + uint16 pool_id = fields[0].GetUInt16(); + PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id]; + pPoolTemplate.MaxLimit = fields[1].GetUInt32(); + } while (result->NextRow()); + sLog.outString(); + sLog.outString(">> Loaded %u objects pools", count); + delete result; + } // Creatures @@ -412,7 +407,7 @@ void PoolHandler::LoadFromDB() bar2.step(); sLog.outString(); - sLog.outString(">> Loaded %u creatures in pools", count ); + sLog.outString(">> Loaded 0 creatures in pools" ); } else { @@ -540,8 +535,8 @@ void PoolHandler::LoadFromDB() barGoLink bar2(1); bar2.step(); - sLog.outString(); - sLog.outString(">> Loaded %u pools in pools", count ); + sLog.outString(); + sLog.outString(">> Loaded %u pools in mother pools", count); } else { @@ -612,9 +607,9 @@ void PoolHandler::LoadFromDB() } } } - sLog.outString(); - sLog.outString( ">> Loaded %u pools in mother pools", count ); delete result; + sLog.outString(); + sLog.outString(">> Loaded %u pools in mother pools", count); } } diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 75e07ff..ce9fb92 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2356,8 +2356,11 @@ void SpellMgr::LoadPetLevelupSpellMap() uint32 count = 0; uint32 family_count = 0; + barGoLink bar(sCreatureFamilyStore.GetNumRows()); + for (uint32 i = 0; i < sCreatureFamilyStore.GetNumRows(); ++i) { + bar.step(); CreatureFamilyEntry const *creatureFamily = sCreatureFamilyStore.LookupEntry(i); if(!creatureFamily) // not exist continue; @@ -2387,7 +2390,6 @@ void SpellMgr::LoadPetLevelupSpellMap() count++; } } - sLog.outString(); sLog.outString( ">> Loaded %u pet levelup and default spells for %u families", count, family_count ); } @@ -2512,8 +2514,10 @@ void SpellMgr::LoadPetDefaultSpells() } } } + barGoLink bar(1); + bar.step(); - sLog.outString(); + sLog.outString(); sLog.outString( ">> Loaded addition spells for %u pet spell data entries and %u summonable creature templates", countData, countCreature ); } diff --git a/src/game/World.cpp b/src/game/World.cpp index 8efd7bf..7538de0 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1078,13 +1078,13 @@ void World::LoadConfigSettings(bool reload) if(reload) { - if(dataPath!=m_dataPath) - sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).",m_dataPath.c_str()); + if(dataPath != m_dataPath) + sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).", m_dataPath.c_str()); } else { m_dataPath = dataPath; - sLog.outString("Using DataDir %s",m_dataPath.c_str()); + sLog.outString("Using DataDir: \\t\\t%s", m_dataPath.c_str()); } bool enableLOS = sConfig.GetBoolDefault("vmap.enableLOS", false); @@ -1095,9 +1095,11 @@ void World::LoadConfigSettings(bool reload) VMAP::VMapFactory::createOrGetVMapManager()->setEnableHeightCalc(enableHeight); VMAP::VMapFactory::createOrGetVMapManager()->preventMapsFromBeingUsed(ignoreMapIds.c_str()); VMAP::VMapFactory::PreventSpellsFromBeingTestedForLoS(ignoreSpellIds.c_str()); - sLog.outString( "WORLD: VMap support included. LineOfSight:%i, getHeight:%i",enableLOS, enableHeight); - sLog.outString( "WORLD: VMap data directory is: %svmaps",m_dataPath.c_str()); - sLog.outString( "WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds"); + sLog.outString("VMap support included."); + sLog.outString("LineOfSight: \\t\\t%i", enableLOS); + sLog.outString("getHeight: \\t\\t%i", enableHeight); + sLog.outString("VMap data directory is: \\t\\t%svmaps", m_dataPath.c_str()); + sLog.outString("VMap config keys are: \\t\\tvmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds"); } /// Initialize the World @@ -1269,8 +1271,11 @@ void World::SetInitialWorldSettings() sLog.outString( "Loading Gameobject Respawn Data..." ); // must be after PackInstances() objmgr.LoadGameobjectRespawnTimes(); - sLog.outString( "Loading Objects Pooling Data..."); + sLog.outString( "Loading Pooling Data..."); + sLog.outString(); poolhandler.LoadFromDB(); + sLog.outString( ">>> Pooling Data loaded"); + sLog.outString(); sLog.outString( "Loading Game Event Data..."); sLog.outString(); @@ -1558,8 +1563,9 @@ void World::DetectDBCLang() } m_defaultDbcLocale = LocaleConstant(default_locale); - - sLog.outString("Using %s DBC Locale as default. All available DBC locales: %s",localeNames[m_defaultDbcLocale],availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str()); + const char *available_locales = availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str(); + sLog.outString("Default DBC Locale: \\t\\t%s", localeNames[m_defaultDbcLocale]); + sLog.outString("Available DBC locales: \\t\\t%s", available_locales); sLog.outString(); } diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp index 24c372b..eb5d0ef 100644 --- a/src/mangosd/Main.cpp +++ b/src/mangosd/Main.cpp @@ -158,9 +158,9 @@ extern int main(int argc, char **argv) sLog.outTitle( " MM MMM http://getmangos.eu"); sLog.outTitle( " MMMMMM\\n\\n"); - sLog.outString("Using configuration file %s.", cfg_file); + sLog.outString("Configuration file: \\t\\t%s.", cfg_file); - sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); + sLog.outDetail("SSL info: \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); if (SSLeay() < 0x009080bfL ) { sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!"); diff --git a/src/mangosd/Master.cpp b/src/mangosd/Master.cpp index 56dd504..8c90da5 100644 --- a/src/mangosd/Master.cpp +++ b/src/mangosd/Master.cpp @@ -404,7 +404,7 @@ bool Master::_StartDB() sLog.outError("Database not specified in configuration file"); return false; } - sLog.outString("World Database: %s", dbstring.c_str()); + sLog.outString("World Database: \\t\\t%s", dbstring.c_str()); ///- Initialise the world database if(!WorldDatabase.Initialize(dbstring.c_str())) @@ -422,7 +422,7 @@ bool Master::_StartDB() sLog.outError("Character Database not specified in configuration file"); return false; } - sLog.outString("Character Database: %s", dbstring.c_str()); + sLog.outString("Character Database: \\t\\t%s", dbstring.c_str()); ///- Initialise the Character database if(!CharacterDatabase.Initialize(dbstring.c_str())) @@ -443,7 +443,7 @@ bool Master::_StartDB() } ///- Initialise the login database - sLog.outString("Login Database: %s", dbstring.c_str() ); + sLog.outString("Login Database: \\t\\t%s", dbstring.c_str()); if(!loginDatabase.Initialize(dbstring.c_str())) { sLog.outError("Cannot connect to login database %s",dbstring.c_str()); @@ -461,15 +461,15 @@ bool Master::_StartDB() return false; } - sLog.outString("Realm running as realm ID %d", realmID); + sLog.outString("Running realm ID: \\t\\t%d", realmID); ///- Clean the database before starting clearOnlineAccounts(); sWorld.LoadDBVersion(); - sLog.outString("Using World DB: %s", sWorld.GetDBVersion()); - sLog.outString("Using creature EventAI: %s", sWorld.GetCreatureEventAIVersion()); + sLog.outString("Using World DB version: \\t\\t%s", sWorld.GetDBVersion()); + sLog.outString("Using creature EventAI: \\t\\t%s", sWorld.GetCreatureEventAIVersion()); return true; } diff --git a/src/realmd/Main.cpp b/src/realmd/Main.cpp index 13fdc57..b982abb 100644 --- a/src/realmd/Main.cpp +++ b/src/realmd/Main.cpp @@ -149,7 +149,7 @@ extern int main(int argc, char **argv) sLog.outString( "%s [realm-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) ); sLog.outString( "<Ctrl-C> to stop.\\n" ); - sLog.outString("Using configuration file %s.", cfg_file); + sLog.outString("Configuration file: \\t\\t%s.", cfg_file); ///- Check the version of the configuration file uint32 confVersion = sConfig.GetIntDefault("ConfVersion", 0); @@ -165,7 +165,7 @@ extern int main(int argc, char **argv) while (pause > clock()) {} } - sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); + sLog.outDetail("SSL info: \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); if (SSLeay() < 0x009080bfL ) { sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!"); @@ -320,8 +320,8 @@ bool StartDB() return false; } - sLog.outString("Database: %s", dbstring.c_str() ); - if(!loginDatabase.Initialize(dbstring.c_str())) + sLog.outString("Login Database: \\t\\t%s", dbstring.c_str()); + if (!loginDatabase.Initialize(dbstring.c_str())) { sLog.outError("Cannot connect to database"); return false; diff --git a/src/realmd/RealmList.cpp b/src/realmd/RealmList.cpp index 1bb0a97..73ff2f5 100644 --- a/src/realmd/RealmList.cpp +++ b/src/realmd/RealmList.cpp @@ -75,25 +75,20 @@ void RealmList::UpdateIfNeed() UpdateRealms(false); } -void RealmList::UpdateRealms(bool init) -{ - sLog.outDetail("Updating Realm List..."); - +void RealmList::UpdateRealms(bool init) { + sLog.outString("Updating List of Realms..."); QueryResult *result = loginDatabase.Query( "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population FROM realmlist WHERE color <> 3 ORDER BY name" ); ///- Circle through results and add them to the realm map - if(result) - { - do - { - Field *fields = result->Fetch(); - + if (result) { + do { + Field *fields = result->Fetch(); uint8 allowedSecurityLevel = fields[7].GetUInt8(); - - UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(),fields[2].GetCppString(),fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat() ); - if(init) - sLog.outString("Added realm \\"%s\\".", fields[1].GetString()); - } while( result->NextRow() ); + UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(), fields[2].GetCppString(), fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat()); + if (init) { + sLog.outString("\\tAdded realm \\"%s\\" on host %s:%s.", fields[1].GetString(), fields[2].GetString(), fields[3].GetString()); + } + } while (result->NextRow()); delete result; } } diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp index 9696172..31c800f 100644 --- a/src/shared/Database/DatabaseMysql.cpp +++ b/src/shared/Database/DatabaseMysql.cpp @@ -141,10 +141,9 @@ bool DatabaseMysql::Initialize(const char *infoString) if (mMysql) { - sLog.outDetail( "Connected to MySQL database at %s", - host.c_str()); - sLog.outString( "MySQL client library: %s", mysql_get_client_info()); - sLog.outString( "MySQL server ver: %s ", mysql_get_server_info( mMysql)); + sLog.outDetail( "\\tConnected to MySQL DB at:\\t%s:%u", host.c_str(), port); + sLog.outString( "\\tMySQL client library: \\t%s", mysql_get_client_info()); + sLog.outString( "\\tMySQL server ver: \\t%s", mysql_get_server_info( mMysql)); /*----------SET AUTOCOMMIT ON---------*/ // It seems mysql 5.0.x have enabled this feature @@ -155,9 +154,9 @@ bool DatabaseMysql::Initialize(const char *infoString) // autocommit is turned of during it. // Setting it to on makes atomic updates work if (!mysql_autocommit(mMysql, 1)) - sLog.outDetail("AUTOCOMMIT SUCCESSFULLY SET TO 1"); + sLog.outDetail("\\tAUTOCOMMIT SUCCESSFULLY SET TO 1"); else - sLog.outDetail("AUTOCOMMIT NOT SET TO 1"); + sLog.outDetail("\\tAUTOCOMMIT NOT SET TO 1"); /*-------------------------------------*/ // set connection properties to UTF8 to properly handle locales for different
  6. Which tabs are talking about ? Tabs in patch code style or tabs in strings constants in code ?
  7. For master branch. Commit: de76ec75bf63bd2e4592cb8e4f8cb9ca155c8598 Change startup log readability. Change startup log to correspond to version of commit 57ab444e63c61b7a18eeef2896961932a736dd45. Add some missing log loading bars. How can I attach files to thread ? Patch text. diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp index 140aa78..4fa4121 100644 --- a/src/game/GameEventMgr.cpp +++ b/src/game/GameEventMgr.cpp @@ -95,7 +95,7 @@ void GameEventMgr::LoadFromDB() QueryResult *result = WorldDatabase.Query("SELECT MAX(entry) FROM game_event"); if( !result ) { - sLog.outString(">> Table game_event is empty."); + sLog.outString(">> Table game_event is empty!"); sLog.outString(); return; } diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp index 2db0c49..7d76e05 100644 --- a/src/game/InstanceSaveMgr.cpp +++ b/src/game/InstanceSaveMgr.cpp @@ -342,30 +342,28 @@ void InstanceSaveManager::PackInstances() delete result; } - barGoLink bar( InstanceSet.size() + 1); - bar.step(); - uint32 InstanceNumber = 1; - // we do assume std::set is sorted properly on integer value - for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i) - { - if (*i != InstanceNumber) - { - // remap instance id - WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i); - CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); - } - - ++InstanceNumber; - bar.step(); - } - + if (!(InstanceSet.size())) { + barGoLink bar(1); + bar.step(); + } else { + barGoLink bar(InstanceSet.size()); + // we do assume std::set is sorted properly on integer value + for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i) { + if (*i != InstanceNumber) { + // remap instance id + WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i); + CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i); + } + ++InstanceNumber; + bar.step(); + } + } sLog.outString( ">> Instance numbers remapped, next instance id is %u", InstanceNumber ); - sLog.outString(); } void InstanceSaveManager::LoadResetTimes() diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp index 44c6cab..3699598 100644 --- a/src/game/PoolHandler.cpp +++ b/src/game/PoolHandler.cpp @@ -378,25 +378,20 @@ void PoolHandler::LoadFromDB() } uint32 count = 0; - - barGoLink bar(result->GetRowCount()); - do - { - ++count; - Field *fields = result->Fetch(); - - bar.step(); - - uint16 pool_id = fields[0].GetUInt16(); - - PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id]; - pPoolTemplate.MaxLimit = fields[1].GetUInt32(); - - } while (result->NextRow()); - - sLog.outString(); - sLog.outString( ">> Loaded %u objects pools", count ); - delete result; + { + barGoLink bar(result->GetRowCount()); + do { + ++count; + Field *fields = result->Fetch(); + bar.step(); + uint16 pool_id = fields[0].GetUInt16(); + PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id]; + pPoolTemplate.MaxLimit = fields[1].GetUInt32(); + } while (result->NextRow()); + sLog.outString(); + sLog.outString(">> Loaded %u objects pools", count); + delete result; + } // Creatures @@ -412,7 +407,7 @@ void PoolHandler::LoadFromDB() bar2.step(); sLog.outString(); - sLog.outString(">> Loaded %u creatures in pools", count ); + sLog.outString(">> Loaded 0 creatures in pools" ); } else { @@ -540,8 +535,8 @@ void PoolHandler::LoadFromDB() barGoLink bar2(1); bar2.step(); - sLog.outString(); - sLog.outString(">> Loaded %u pools in pools", count ); + sLog.outString(); + sLog.outString(">> Loaded %u pools in mother pools", count); } else { @@ -612,9 +607,9 @@ void PoolHandler::LoadFromDB() } } } - sLog.outString(); - sLog.outString( ">> Loaded %u pools in mother pools", count ); delete result; + sLog.outString(); + sLog.outString(">> Loaded %u pools in mother pools", count); } } diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 75e07ff..ce9fb92 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2356,8 +2356,11 @@ void SpellMgr::LoadPetLevelupSpellMap() uint32 count = 0; uint32 family_count = 0; + barGoLink bar(sCreatureFamilyStore.GetNumRows()); + for (uint32 i = 0; i < sCreatureFamilyStore.GetNumRows(); ++i) { + bar.step(); CreatureFamilyEntry const *creatureFamily = sCreatureFamilyStore.LookupEntry(i); if(!creatureFamily) // not exist continue; @@ -2387,7 +2390,6 @@ void SpellMgr::LoadPetLevelupSpellMap() count++; } } - sLog.outString(); sLog.outString( ">> Loaded %u pet levelup and default spells for %u families", count, family_count ); } @@ -2512,8 +2514,10 @@ void SpellMgr::LoadPetDefaultSpells() } } } + barGoLink bar(1); + bar.step(); - sLog.outString(); + sLog.outString(); sLog.outString( ">> Loaded addition spells for %u pet spell data entries and %u summonable creature templates", countData, countCreature ); } diff --git a/src/game/World.cpp b/src/game/World.cpp index 8efd7bf..7538de0 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1078,13 +1078,13 @@ void World::LoadConfigSettings(bool reload) if(reload) { - if(dataPath!=m_dataPath) - sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).",m_dataPath.c_str()); + if(dataPath != m_dataPath) + sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).", m_dataPath.c_str()); } else { m_dataPath = dataPath; - sLog.outString("Using DataDir %s",m_dataPath.c_str()); + sLog.outString("Using DataDir: \\t\\t%s", m_dataPath.c_str()); } bool enableLOS = sConfig.GetBoolDefault("vmap.enableLOS", false); @@ -1095,9 +1095,11 @@ void World::LoadConfigSettings(bool reload) VMAP::VMapFactory::createOrGetVMapManager()->setEnableHeightCalc(enableHeight); VMAP::VMapFactory::createOrGetVMapManager()->preventMapsFromBeingUsed(ignoreMapIds.c_str()); VMAP::VMapFactory::PreventSpellsFromBeingTestedForLoS(ignoreSpellIds.c_str()); - sLog.outString( "WORLD: VMap support included. LineOfSight:%i, getHeight:%i",enableLOS, enableHeight); - sLog.outString( "WORLD: VMap data directory is: %svmaps",m_dataPath.c_str()); - sLog.outString( "WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds"); + sLog.outString("VMap support included."); + sLog.outString("LineOfSight: \\t\\t%i", enableLOS); + sLog.outString("getHeight: \\t\\t%i", enableHeight); + sLog.outString("VMap data directory is: \\t\\t%svmaps", m_dataPath.c_str()); + sLog.outString("VMap config keys are: \\t\\tvmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds"); } /// Initialize the World @@ -1269,8 +1271,11 @@ void World::SetInitialWorldSettings() sLog.outString( "Loading Gameobject Respawn Data..." ); // must be after PackInstances() objmgr.LoadGameobjectRespawnTimes(); - sLog.outString( "Loading Objects Pooling Data..."); + sLog.outString( "Loading Pooling Data..."); + sLog.outString(); poolhandler.LoadFromDB(); + sLog.outString( ">>> Pooling Data loaded"); + sLog.outString(); sLog.outString( "Loading Game Event Data..."); sLog.outString(); @@ -1558,8 +1563,9 @@ void World::DetectDBCLang() } m_defaultDbcLocale = LocaleConstant(default_locale); - - sLog.outString("Using %s DBC Locale as default. All available DBC locales: %s",localeNames[m_defaultDbcLocale],availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str()); + const char *available_locales = availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str(); + sLog.outString("Default DBC Locale: \\t\\t%s", localeNames[m_defaultDbcLocale]); + sLog.outString("Available DBC locales: \\t\\t%s", available_locales); sLog.outString(); } diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp index 24c372b..eb5d0ef 100644 --- a/src/mangosd/Main.cpp +++ b/src/mangosd/Main.cpp @@ -158,9 +158,9 @@ extern int main(int argc, char **argv) sLog.outTitle( " MM MMM http://getmangos.eu"); sLog.outTitle( " MMMMMM\\n\\n"); - sLog.outString("Using configuration file %s.", cfg_file); + sLog.outString("Configuration file: \\t\\t%s.", cfg_file); - sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); + sLog.outDetail("SSL info: \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); if (SSLeay() < 0x009080bfL ) { sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!"); diff --git a/src/mangosd/Master.cpp b/src/mangosd/Master.cpp index 56dd504..8c90da5 100644 --- a/src/mangosd/Master.cpp +++ b/src/mangosd/Master.cpp @@ -404,7 +404,7 @@ bool Master::_StartDB() sLog.outError("Database not specified in configuration file"); return false; } - sLog.outString("World Database: %s", dbstring.c_str()); + sLog.outString("World Database: \\t\\t%s", dbstring.c_str()); ///- Initialise the world database if(!WorldDatabase.Initialize(dbstring.c_str())) @@ -422,7 +422,7 @@ bool Master::_StartDB() sLog.outError("Character Database not specified in configuration file"); return false; } - sLog.outString("Character Database: %s", dbstring.c_str()); + sLog.outString("Character Database: \\t\\t%s", dbstring.c_str()); ///- Initialise the Character database if(!CharacterDatabase.Initialize(dbstring.c_str())) @@ -443,7 +443,7 @@ bool Master::_StartDB() } ///- Initialise the login database - sLog.outString("Login Database: %s", dbstring.c_str() ); + sLog.outString("Login Database: \\t\\t%s", dbstring.c_str()); if(!loginDatabase.Initialize(dbstring.c_str())) { sLog.outError("Cannot connect to login database %s",dbstring.c_str()); @@ -461,15 +461,15 @@ bool Master::_StartDB() return false; } - sLog.outString("Realm running as realm ID %d", realmID); + sLog.outString("Running realm ID: \\t\\t%d", realmID); ///- Clean the database before starting clearOnlineAccounts(); sWorld.LoadDBVersion(); - sLog.outString("Using World DB: %s", sWorld.GetDBVersion()); - sLog.outString("Using creature EventAI: %s", sWorld.GetCreatureEventAIVersion()); + sLog.outString("Using World DB version: \\t\\t%s", sWorld.GetDBVersion()); + sLog.outString("Using creature EventAI: \\t\\t%s", sWorld.GetCreatureEventAIVersion()); return true; } diff --git a/src/realmd/Main.cpp b/src/realmd/Main.cpp index 13fdc57..b982abb 100644 --- a/src/realmd/Main.cpp +++ b/src/realmd/Main.cpp @@ -149,7 +149,7 @@ extern int main(int argc, char **argv) sLog.outString( "%s [realm-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) ); sLog.outString( "<Ctrl-C> to stop.\\n" ); - sLog.outString("Using configuration file %s.", cfg_file); + sLog.outString("Configuration file: \\t\\t%s.", cfg_file); ///- Check the version of the configuration file uint32 confVersion = sConfig.GetIntDefault("ConfVersion", 0); @@ -165,7 +165,7 @@ extern int main(int argc, char **argv) while (pause > clock()) {} } - sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); + sLog.outDetail("SSL info: \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); if (SSLeay() < 0x009080bfL ) { sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!"); @@ -320,8 +320,8 @@ bool StartDB() return false; } - sLog.outString("Database: %s", dbstring.c_str() ); - if(!loginDatabase.Initialize(dbstring.c_str())) + sLog.outString("Login Database: \\t\\t%s", dbstring.c_str()); + if (!loginDatabase.Initialize(dbstring.c_str())) { sLog.outError("Cannot connect to database"); return false; diff --git a/src/realmd/RealmList.cpp b/src/realmd/RealmList.cpp index 1bb0a97..73ff2f5 100644 --- a/src/realmd/RealmList.cpp +++ b/src/realmd/RealmList.cpp @@ -75,25 +75,20 @@ void RealmList::UpdateIfNeed() UpdateRealms(false); } -void RealmList::UpdateRealms(bool init) -{ - sLog.outDetail("Updating Realm List..."); - +void RealmList::UpdateRealms(bool init) { + sLog.outString("Updating List of Realms..."); QueryResult *result = loginDatabase.Query( "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population FROM realmlist WHERE color <> 3 ORDER BY name" ); ///- Circle through results and add them to the realm map - if(result) - { - do - { - Field *fields = result->Fetch(); - + if (result) { + do { + Field *fields = result->Fetch(); uint8 allowedSecurityLevel = fields[7].GetUInt8(); - - UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(),fields[2].GetCppString(),fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat() ); - if(init) - sLog.outString("Added realm \\"%s\\".", fields[1].GetString()); - } while( result->NextRow() ); + UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(), fields[2].GetCppString(), fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat()); + if (init) { + sLog.outString("\\tAdded realm \\"%s\\" on host %s:%s.", fields[1].GetString(), fields[2].GetString(), fields[3].GetString()); + } + } while (result->NextRow()); delete result; } } diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp index 9696172..31c800f 100644 --- a/src/shared/Database/DatabaseMysql.cpp +++ b/src/shared/Database/DatabaseMysql.cpp @@ -141,10 +141,9 @@ bool DatabaseMysql::Initialize(const char *infoString) if (mMysql) { - sLog.outDetail( "Connected to MySQL database at %s", - host.c_str()); - sLog.outString( "MySQL client library: %s", mysql_get_client_info()); - sLog.outString( "MySQL server ver: %s ", mysql_get_server_info( mMysql)); + sLog.outDetail( "\\tConnected to MySQL DB at:\\t%s:%u", host.c_str(), port); + sLog.outString( "\\tMySQL client library: \\t%s", mysql_get_client_info()); + sLog.outString( "\\tMySQL server ver: \\t%s", mysql_get_server_info( mMysql)); /*----------SET AUTOCOMMIT ON---------*/ // It seems mysql 5.0.x have enabled this feature @@ -155,9 +154,9 @@ bool DatabaseMysql::Initialize(const char *infoString) // autocommit is turned of during it. // Setting it to on makes atomic updates work if (!mysql_autocommit(mMysql, 1)) - sLog.outDetail("AUTOCOMMIT SUCCESSFULLY SET TO 1"); + sLog.outDetail("\\tAUTOCOMMIT SUCCESSFULLY SET TO 1"); else - sLog.outDetail("AUTOCOMMIT NOT SET TO 1"); + sLog.outDetail("\\tAUTOCOMMIT NOT SET TO 1"); /*-------------------------------------*/ // set connection properties to UTF8 to properly handle locales for different
  8. >git clone http://github.com/mangos/mangos.git Initialized empty Git repository in D:/source/m/mangos/.git/ got 40cde0ff369262a54691e1660882d0c4f99eb8d8 walk 40cde0ff369262a54691e1660882d0c4f99eb8d8 got a88aee18e86334de9168da9ca63b4244d6a421e6 walk a88aee18e86334de9168da9ca63b4244d6a421e6 got 140aebbdd27b81a15c0c701299b08324fb6eb304 walk 140aebbdd27b81a15c0c701299b08324fb6eb304 Getting alternates list for http://github.com/mangos/mangos.git Getting pack list for http://github.com/mangos/mangos.git Getting index for pack 69e69e44777b1b7ead3e67e7c9437425a66f241b got 377fdb576f6841259556da413de1842bfd07f58a got b94ffd16ae8b2b49cbbc5ffc157b020a30d42b45 got 8323e80e8393dd993902297ba5449803defcaa1f got 9e3fa52dd0a83007ac4e038e256d160f33b7d83a got d336e3e19287103a6d1498b03205dda59ae7f3c9 got b3e8d3c02b58d0be4ecab8600e90dc62457d1aaf Getting pack 69e69e44777b1b7ead3e67e7c9437425a66f241b which contains 7367b1e2d9179b9969979c10f8fa739bc126669a error: Unable to get pack file http://github.com/mangos/mangos.git/objects/pack/pack-69e69e44777b1b7ead3e67e7c9437425a66f241b.pack The requested URL returned error: 502 error: Unable to find 7367b1e2d9179b9969979c10f8fa739bc126669a under http://github.com/mangos/mangos.git Cannot obtain needed object 7367b1e2d9179b9969979c10f8fa739bc126669a while processing commit 140aebbdd27b81a15c0c701299b08324fb6eb304. fatal: Fetch failed. There is the same problem
  9. commit 17b36ebb8daa2bc051f66c5d86c2eb30c5db0f8e Insert progress bar step function. diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 35556d8..8ce3056 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1909,6 +1909,7 @@ void ObjectMgr::LoadPetLevelInfo() if (!result) { barGoLink bar( 1 ); + bar.step(); sLog.outString(); sLog.outString( ">> Loaded %u level pet stats definitions", count );
  10. commit 17b36ebb8daa2bc051f66c5d86c2eb30c5db0f8e In sql script mangos.sql change ';' to ','. diff --git a/sql/mangos.sql b/sql/mangos.sql index 2cd0ff6..0365b0e 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -206,7 +206,7 @@ INSERT INTO battleground_events (map, event1, event2, description) VALUES (572, 253, 0, 'buffs'), (572, 254, 0, 'doors'), (562, 253, 0, 'buffs'), -(562, 254, 0, 'doors'); +(562, 254, 0, 'doors'), -- alterac valley (30, 254, 0, 'Doors'),
  11. I think that main porblem is - client sends password's SHA key and there is NO simple password from client. It mean that for saving open passwords in DB you must hack SHA key .
  12. For more strong code offer to rename function. In Creature.cpp -- bool Creature::isCanIneractWithBattleMaster(Player* pPlayer, bool msg) const ++ bool Creature::isCanInteractWithBattleMaster(Player* pPlayer, bool msg) const That's all
  13. Q. Does on server npcs exist always after server up ? Or they are spawned only if there are players near ? Q. Let Creature C follows waypoints. If there are no players near C does it follow waypoints or has server to remove it from map and to free memory ? Are coordinates of C at time point t1 the same for players near C and far from C?
  14. Solution was already found by myself. There was only gcc on computer. For ACE you must install also g++ (for example). After installation of g++ configure finished work without errors.
  15. During configure step there are some errors... === Configuring in dep/ACE_wrappers === ............. ... Checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables configure: error: ...dep/ACE_wrapper/configure failed for dep/ACE_wrappers Please, any ideas... Perhaps, there are some ruses for compiling ACE...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use