mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[10692] Fixed some GCC warnings and code errors.
Thanks to freghar for provide cleaned list of warning messages.
This commit is contained in:
parent
349719e520
commit
10d3d3ce24
33 changed files with 363 additions and 306 deletions
|
|
@ -883,15 +883,15 @@ void World::SetInitialWorldSettings()
|
|||
LoadConfigSettings();
|
||||
|
||||
///- Check the existence of the map files for all races' startup areas.
|
||||
if( !MapManager::ExistMapAndVMap(0,-6240.32f, 331.033f)
|
||||
||!MapManager::ExistMapAndVMap(0,-8949.95f,-132.493f)
|
||||
||!MapManager::ExistMapAndVMap(0,-8949.95f,-132.493f)
|
||||
||!MapManager::ExistMapAndVMap(1,-618.518f,-4251.67f)
|
||||
||!MapManager::ExistMapAndVMap(0, 1676.35f, 1677.45f)
|
||||
||!MapManager::ExistMapAndVMap(1, 10311.3f, 832.463f)
|
||||
||!MapManager::ExistMapAndVMap(1,-2917.58f,-257.98f)
|
||||
||m_configUint32Values[CONFIG_UINT32_EXPANSION] && (
|
||||
!MapManager::ExistMapAndVMap(530,10349.6f,-6357.29f) || !MapManager::ExistMapAndVMap(530,-3961.64f,-13931.2f) ) )
|
||||
if (!MapManager::ExistMapAndVMap(0,-6240.32f, 331.033f) ||
|
||||
!MapManager::ExistMapAndVMap(0,-8949.95f,-132.493f) ||
|
||||
!MapManager::ExistMapAndVMap(0,-8949.95f,-132.493f) ||
|
||||
!MapManager::ExistMapAndVMap(1,-618.518f,-4251.67f) ||
|
||||
!MapManager::ExistMapAndVMap(0, 1676.35f, 1677.45f) ||
|
||||
!MapManager::ExistMapAndVMap(1, 10311.3f, 832.463f) ||
|
||||
!MapManager::ExistMapAndVMap(1,-2917.58f,-257.98f) ||
|
||||
(m_configUint32Values[CONFIG_UINT32_EXPANSION] &&
|
||||
(!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 *.vmtree/*.vmtile files in '%svmaps'. Please place *.map and vmap files in appropriate directories or correct the DataDir value in the mangosd.conf file.",m_dataPath.c_str(),m_dataPath.c_str());
|
||||
Log::WaitBeforeContinueIfNeed();
|
||||
|
|
@ -1338,7 +1338,7 @@ void World::DetectDBCLang()
|
|||
{
|
||||
uint32 m_lang_confid = sConfig.GetIntDefault("DBC.Locale", 255);
|
||||
|
||||
if(m_lang_confid != 255 && m_lang_confid >= MAX_LOCALE)
|
||||
if (m_lang_confid != 255 && m_lang_confid >= MAX_LOCALE)
|
||||
{
|
||||
sLog.outError("Incorrect DBC.Locale! Must be >= 0 and < %d (set to 0)",MAX_LOCALE);
|
||||
m_lang_confid = LOCALE_enUS;
|
||||
|
|
@ -1348,10 +1348,10 @@ void World::DetectDBCLang()
|
|||
|
||||
std::string availableLocalsStr;
|
||||
|
||||
int default_locale = MAX_LOCALE;
|
||||
uint32 default_locale = MAX_LOCALE;
|
||||
for (int i = MAX_LOCALE-1; i >= 0; --i)
|
||||
{
|
||||
if ( strlen(race->name[i]) > 0) // check by race names
|
||||
if (strlen(race->name[i]) > 0) // check by race names
|
||||
{
|
||||
default_locale = i;
|
||||
m_availableDbcLocaleMask |= (1 << i);
|
||||
|
|
@ -1360,13 +1360,13 @@ void World::DetectDBCLang()
|
|||
}
|
||||
}
|
||||
|
||||
if( default_locale != m_lang_confid && m_lang_confid < MAX_LOCALE &&
|
||||
if (default_locale != m_lang_confid && m_lang_confid < MAX_LOCALE &&
|
||||
(m_availableDbcLocaleMask & (1 << m_lang_confid)) )
|
||||
{
|
||||
default_locale = m_lang_confid;
|
||||
}
|
||||
|
||||
if(default_locale >= MAX_LOCALE)
|
||||
if (default_locale >= MAX_LOCALE)
|
||||
{
|
||||
sLog.outError("Unable to determine your DBC Locale! (corrupt DBC?)");
|
||||
Log::WaitBeforeContinueIfNeed();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue