* Implementing database logging:
** LogTime and LogColors config options removed due to incompatibility. ** Old file logging still available. ** Totally redone the Log class. ** Config options added: EnableLogDB, DBLogLevel, LogDB.Char, LogDB.RA, LogDB.GM -- remember to update config file. ** SQL updates attached. --HG-- branch : trunk
This commit is contained in:
@@ -104,6 +104,27 @@ LOCK TABLES `ip_banned` WRITE;
|
||||
/*!40000 ALTER TABLE `ip_banned` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `logs`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `logs`;
|
||||
CREATE TABLE `logs` (
|
||||
`time` int(14) NOT NULL,
|
||||
`realm` int(4) NOT NULL,
|
||||
`type` int(4) NOT NULL,
|
||||
`string` text
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `logs`
|
||||
--
|
||||
|
||||
LOCK TABLES `logs` WRITE;
|
||||
/*!40000 ALTER TABLE `logs` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `logs` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `realmcharacters`
|
||||
--
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
DROP TABLE IF EXISTS `logs`;
|
||||
-- create logs table
|
||||
CREATE TABLE `logs` (
|
||||
`time` int(14) NOT NULL,
|
||||
`realm` int(4) NOT NULL,
|
||||
`type` int(4) NOT NULL,
|
||||
`string` text
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
@@ -55,7 +55,7 @@
|
||||
PrecompiledHeaderThrough="precompiled.h"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -102,6 +102,90 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="..\..\..\..\bin\$(PlatformName)_$(ConfigurationName)"
|
||||
IntermediateDirectory=".\ScriptDev2__$(PlatformName)_$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\..\..\..\dep\ACE_wrappers"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_WINDOWS;_USRDLL;SCRIPT"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="precompiled.h"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="trinitycore.lib zthread.lib"
|
||||
OutputFile="$(OutDir)/TrinityScript.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\..\win\VC90\zthread__$(PlatformName)_$(ConfigurationName);..\..\..\..\win\VC90\trinitycore__$(PlatformName)_$(ConfigurationName)"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/MaNGOSScript.pdb"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary="$(OutDir)/TrinityScript.lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="..\..\..\..\bin\$(PlatformName)_$(ConfigurationName)"
|
||||
@@ -187,87 +271,6 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="..\..\..\..\bin\$(PlatformName)_$(ConfigurationName)"
|
||||
IntermediateDirectory=".\ScriptDev2__$(PlatformName)_$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\..\..\..\dep\ACE_wrappers"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_WINDOWS;_USRDLL;SCRIPT"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="precompiled.h"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="trinitycore.lib zthread.lib"
|
||||
OutputFile="$(OutDir)/TrinityScript.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\..\win\VC90\zthread__$(PlatformName)_$(ConfigurationName);..\..\..\..\win\VC90\trinitycore__$(PlatformName)_$(ConfigurationName)"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/MaNGOSScript.pdb"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary="$(OutDir)/TrinityScript.lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="..\..\..\..\bin\$(PlatformName)_$(ConfigurationName)"
|
||||
@@ -348,6 +351,9 @@
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
@@ -2492,7 +2498,7 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
@@ -2500,7 +2506,7 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
|
||||
@@ -1291,7 +1291,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded 0 achievement criteria.");
|
||||
return;
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
|
||||
m_AchievementCriteriasByType[criteria->requiredType].push_back(criteria);
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u achievement criteria.",m_AchievementCriteriasByType->size());
|
||||
}
|
||||
|
||||
@@ -1322,7 +1322,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 realm completed achievements . DB table `character_achievement` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -1337,7 +1337,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u realm completed achievements.",m_allCompletedAchievements.size());
|
||||
}
|
||||
|
||||
@@ -1354,7 +1354,7 @@ void AchievementGlobalMgr::LoadRewards()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -1447,7 +1447,7 @@ void AchievementGlobalMgr::LoadRewards()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u achievement reward locale strings", m_achievementRewardLocales.size() );
|
||||
}
|
||||
|
||||
@@ -1463,7 +1463,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -1516,6 +1516,6 @@ void AchievementGlobalMgr::LoadRewardLocales()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u achievement reward locale strings", m_achievementRewardLocales.size() );
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 auction items");
|
||||
return;
|
||||
}
|
||||
@@ -325,7 +325,7 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
while( result->NextRow() );
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u auction items", count );
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ void AuctionHouseMgr::LoadAuctions()
|
||||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -349,7 +349,7 @@ void AuctionHouseMgr::LoadAuctions()
|
||||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ void AuctionHouseMgr::LoadAuctions()
|
||||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -430,7 +430,7 @@ void AuctionHouseMgr::LoadAuctions()
|
||||
} while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u auctions", AuctionCount );
|
||||
}
|
||||
|
||||
|
||||
@@ -1719,7 +1719,7 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -1815,7 +1815,7 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u battlegrounds", count );
|
||||
}
|
||||
|
||||
@@ -2097,7 +2097,7 @@ void BattleGroundMgr::LoadBattleMastersEntry()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded 0 battlemaster entries - table is empty!" );
|
||||
return;
|
||||
}
|
||||
@@ -2125,6 +2125,6 @@ void BattleGroundMgr::LoadBattleMastersEntry()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u battlemaster entries", count );
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@ void CreatureGroupManager::LoadCreatureFormations()
|
||||
}
|
||||
while(result->NextRow()) ;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u creatures in formations", total_records );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
//Free some heap
|
||||
delete result;
|
||||
}
|
||||
|
||||
+33
-33
@@ -175,7 +175,7 @@ void GameEventMgr::LoadFromDB()
|
||||
if( !result )
|
||||
{
|
||||
sLog.outString(">> Table game_event is empty.");
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ void GameEventMgr::LoadFromDB()
|
||||
{
|
||||
mGameEvent.clear();
|
||||
sLog.outString(">> Table game_event is empty!");
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ void GameEventMgr::LoadFromDB()
|
||||
} while( result->NextRow() );
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u game events", count );
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar2(1);
|
||||
bar2.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u game event saves in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -295,7 +295,7 @@ void GameEventMgr::LoadFromDB()
|
||||
++count;
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u game event saves in game events", count );
|
||||
delete result;
|
||||
}
|
||||
@@ -307,7 +307,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar2(1);
|
||||
bar2.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u game event prerequisites in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -348,7 +348,7 @@ void GameEventMgr::LoadFromDB()
|
||||
++count;
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u game event prerequisites in game events", count );
|
||||
delete result;
|
||||
}
|
||||
@@ -364,7 +364,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u creatures in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -395,7 +395,7 @@ void GameEventMgr::LoadFromDB()
|
||||
} while( result->NextRow() );
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u creatures in game events", count );
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u gameobjects in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -441,7 +441,7 @@ void GameEventMgr::LoadFromDB()
|
||||
} while( result->NextRow() );
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u gameobjects in game events", count );
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u model/equipment changes in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -501,7 +501,7 @@ void GameEventMgr::LoadFromDB()
|
||||
} while( result->NextRow() );
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u model/equipment changes in game events", count );
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u quests additions in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -542,7 +542,7 @@ void GameEventMgr::LoadFromDB()
|
||||
questlist.push_back(QuestRelation(id, quest));
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u quests additions in game events", count );
|
||||
|
||||
delete result;
|
||||
@@ -558,7 +558,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar3(1);
|
||||
bar3.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u go quests additions in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -587,7 +587,7 @@ void GameEventMgr::LoadFromDB()
|
||||
} while( result->NextRow() );
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u quests additions in game events", count );
|
||||
}
|
||||
|
||||
@@ -601,7 +601,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar3(1);
|
||||
bar3.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u quest event conditions in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -630,7 +630,7 @@ void GameEventMgr::LoadFromDB()
|
||||
mQuestToEventConditions[quest].num = num;
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u quest event conditions in game events", count );
|
||||
|
||||
delete result;
|
||||
@@ -646,7 +646,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar3(1);
|
||||
bar3.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u conditions in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -675,7 +675,7 @@ void GameEventMgr::LoadFromDB()
|
||||
++count;
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u conditions in game events", count );
|
||||
|
||||
delete result;
|
||||
@@ -691,7 +691,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar3(1);
|
||||
bar3.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u condition saves in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -726,7 +726,7 @@ void GameEventMgr::LoadFromDB()
|
||||
++count;
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u condition saves in game events", count );
|
||||
|
||||
delete result;
|
||||
@@ -743,7 +743,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar3(1);
|
||||
bar3.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u npcflags in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -770,7 +770,7 @@ void GameEventMgr::LoadFromDB()
|
||||
++count;
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u npcflags in game events", count );
|
||||
|
||||
delete result;
|
||||
@@ -786,7 +786,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar3(1);
|
||||
bar3.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u vendor additions in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -837,7 +837,7 @@ void GameEventMgr::LoadFromDB()
|
||||
vendors.push_back(newEntry);
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u vendor additions in game events", count );
|
||||
|
||||
delete result;
|
||||
@@ -853,7 +853,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar3(1);
|
||||
bar3.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u npc gossip textids in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -880,7 +880,7 @@ void GameEventMgr::LoadFromDB()
|
||||
++count;
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u npc gossip textids in game events", count );
|
||||
|
||||
delete result;
|
||||
@@ -898,7 +898,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar3(1);
|
||||
bar3.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u battleground holidays in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -924,7 +924,7 @@ void GameEventMgr::LoadFromDB()
|
||||
mGameEventBattleGroundHolidays[event_id] = fields[1].GetUInt32();
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u battleground holidays in game events", count );
|
||||
|
||||
delete result;
|
||||
@@ -945,7 +945,7 @@ void GameEventMgr::LoadFromDB()
|
||||
barGoLink bar2(1);
|
||||
bar2.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u pools in game events", count );
|
||||
}
|
||||
else
|
||||
@@ -980,7 +980,7 @@ void GameEventMgr::LoadFromDB()
|
||||
poollist.push_back(entry);
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u pools in game events", count );
|
||||
delete result;
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ void InstanceSaveManager::CleanupInstances()
|
||||
}
|
||||
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Initialized %u instances", (uint32)InstanceSet.size());
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ void InstanceSaveManager::PackInstances()
|
||||
}
|
||||
|
||||
sLog.outString( ">> Instance numbers remapped, next instance id is %u", InstanceNumber );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
|
||||
void InstanceSaveManager::LoadResetTimes()
|
||||
|
||||
@@ -78,12 +78,12 @@ void LoadRandomEnchantmentsTable()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u Item Enchantment definitions", count );
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb( ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,12 +168,12 @@ void LootStore::LoadLootTable()
|
||||
|
||||
Verify(); // Checks validity of the loot store
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u loot definitions (%d templates)", count, m_LootTemplates.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb( ">> Loaded 0 loot definitions. DB table `%s` is empty.",GetName() );
|
||||
}
|
||||
}
|
||||
|
||||
+119
-119
@@ -213,7 +213,7 @@ void ObjectMgr::LoadPlayerInfoInCache()
|
||||
while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded info about %d players", m_mPlayerInfoMap.size());
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ void ObjectMgr::LoadCreatureLocales()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 creature locale strings. DB table `locales_creature` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -383,7 +383,7 @@ void ObjectMgr::LoadCreatureLocales()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u creature locale strings", mCreatureLocaleMap.size() );
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ void ObjectMgr::LoadNpcOptionLocales()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 npc_option locale strings. DB table `locales_npc_option` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -451,7 +451,7 @@ void ObjectMgr::LoadNpcOptionLocales()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u npc_option locale strings", mNpcOptionLocaleMap.size() );
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 points_of_interest locale strings. DB table `locales_points_of_interest` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -502,7 +502,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u points_of_interest locale strings", mPointOfInterestLocaleMap.size() );
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ void ObjectMgr::LoadCreatureTemplates()
|
||||
loader.Load(sCreatureStorage);
|
||||
|
||||
sLog.outString( ">> Loaded %u creature definitions", sCreatureStorage.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
std::set<uint32> heroicEntries; // already loaded heroic value in creatures
|
||||
std::set<uint32> hasHeroicEntries; // already loaded creatures with heroic entry values
|
||||
@@ -779,7 +779,7 @@ void ObjectMgr::LoadCreatureAddons()
|
||||
sCreatureInfoAddonStorage.Load();
|
||||
|
||||
sLog.outString( ">> Loaded %u creature template addons", sCreatureInfoAddonStorage.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
// check data correctness and convert 'auras'
|
||||
for(uint32 i = 1; i < sCreatureInfoAddonStorage.MaxEntry; ++i)
|
||||
@@ -797,7 +797,7 @@ void ObjectMgr::LoadCreatureAddons()
|
||||
sCreatureDataAddonStorage.Load();
|
||||
|
||||
sLog.outString( ">> Loaded %u creature addons", sCreatureDataAddonStorage.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
// check data correctness and convert 'auras'
|
||||
for(uint32 i = 1; i < sCreatureDataAddonStorage.MaxEntry; ++i)
|
||||
@@ -859,7 +859,7 @@ void ObjectMgr::LoadEquipmentTemplates()
|
||||
}
|
||||
}
|
||||
sLog.outString( ">> Loaded %u equipment template", sEquipmentStorage.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
// This DBC is currently only used for item templates and creature equipments checks.
|
||||
sItemStore.Clear();
|
||||
@@ -910,7 +910,7 @@ void ObjectMgr::LoadCreatureModelInfo()
|
||||
sCreatureModelStorage.Load();
|
||||
|
||||
sLog.outString( ">> Loaded %u creature model based info", sCreatureModelStorage.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
// check if combat_reach is valid
|
||||
for(uint32 i = 1; i < sCreatureModelStorage.MaxEntry; ++i)
|
||||
@@ -945,7 +945,7 @@ void ObjectMgr::LoadCreatures()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded 0 creature. DB table `creature` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -1067,7 +1067,7 @@ void ObjectMgr::LoadCreatures()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u creatures", mCreatureDataMap.size() );
|
||||
}
|
||||
|
||||
@@ -1120,7 +1120,7 @@ void ObjectMgr::LoadGameobjects()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded 0 gameobjects. DB table `gameobject` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -1195,7 +1195,7 @@ void ObjectMgr::LoadGameobjects()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u gameobjects", mGameObjectDataMap.size());
|
||||
}
|
||||
|
||||
@@ -1246,7 +1246,7 @@ void ObjectMgr::LoadCreatureRespawnTimes()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 creature respawn time.");
|
||||
return;
|
||||
}
|
||||
@@ -1270,7 +1270,7 @@ void ObjectMgr::LoadCreatureRespawnTimes()
|
||||
delete result;
|
||||
|
||||
sLog.outString( ">> Loaded %u creature respawn times", mCreatureRespawnTimes.size() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadGameobjectRespawnTimes()
|
||||
@@ -1288,7 +1288,7 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 gameobject respawn time.");
|
||||
return;
|
||||
}
|
||||
@@ -1312,7 +1312,7 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
|
||||
delete result;
|
||||
|
||||
sLog.outString( ">> Loaded %u gameobject respawn times", mGORespawnTimes.size() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
|
||||
// name must be checked to correctness (if received) before call this function
|
||||
@@ -1414,7 +1414,7 @@ void ObjectMgr::LoadItemLocales()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 Item locale strings. DB table `locales_item` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -1462,7 +1462,7 @@ void ObjectMgr::LoadItemLocales()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u Item locale strings", mItemLocaleMap.size() );
|
||||
}
|
||||
|
||||
@@ -1480,7 +1480,7 @@ void ObjectMgr::LoadItemPrototypes()
|
||||
SQLItemLoader loader;
|
||||
loader.Load(sItemStorage);
|
||||
sLog.outString( ">> Loaded %u item prototypes", sItemStorage.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
// check data correctness
|
||||
for(uint32 i = 1; i < sItemStorage.MaxEntry; ++i)
|
||||
@@ -1852,7 +1852,7 @@ void ObjectMgr::LoadPetLevelInfo()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u level pet stats definitions", count );
|
||||
sLog.outErrorDb( "Error loading `pet_levelstats` table or empty table.");
|
||||
return;
|
||||
@@ -1913,7 +1913,7 @@ void ObjectMgr::LoadPetLevelInfo()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u level pet stats definitions", count );
|
||||
}
|
||||
|
||||
@@ -1966,7 +1966,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u player create definitions", count );
|
||||
sLog.outErrorDb( "Error loading `playercreateinfo` table or empty table.");
|
||||
exit(1);
|
||||
@@ -2042,7 +2042,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u player create definitions", count );
|
||||
}
|
||||
|
||||
@@ -2059,7 +2059,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u custom player create items", count );
|
||||
}
|
||||
else
|
||||
@@ -2111,7 +2111,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u custom player create items", count );
|
||||
}
|
||||
}
|
||||
@@ -2131,7 +2131,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u player create spells", count );
|
||||
sLog.outErrorDb( "Error loading player starting spells or empty table.");
|
||||
}
|
||||
@@ -2167,7 +2167,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u player create spells", count );
|
||||
}
|
||||
}
|
||||
@@ -2183,7 +2183,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u player create actions", count );
|
||||
sLog.outErrorDb( "Error loading `playercreateinfo_action` table or empty table.");
|
||||
}
|
||||
@@ -2222,7 +2222,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u player create actions", count );
|
||||
}
|
||||
}
|
||||
@@ -2238,7 +2238,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u level health/mana definitions", count );
|
||||
sLog.outErrorDb( "Error loading `player_classlevelstats` table or empty table.");
|
||||
exit(1);
|
||||
@@ -2287,7 +2287,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u level health/mana definitions", count );
|
||||
}
|
||||
|
||||
@@ -2329,7 +2329,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u level stats definitions", count );
|
||||
sLog.outErrorDb( "Error loading `player_levelstats` table or empty table.");
|
||||
exit(1);
|
||||
@@ -2387,7 +2387,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u level stats definitions", count );
|
||||
}
|
||||
|
||||
@@ -2452,7 +2452,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u xp for level definitions", count );
|
||||
sLog.outErrorDb( "Error loading `player_xp_for_level` table or empty table.");
|
||||
exit(1);
|
||||
@@ -2487,7 +2487,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u xp for level definitions", count );
|
||||
}
|
||||
|
||||
@@ -2619,7 +2619,7 @@ void ObjectMgr::LoadGuilds()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u guild definitions", count );
|
||||
return;
|
||||
}
|
||||
@@ -2646,7 +2646,7 @@ void ObjectMgr::LoadGuilds()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u guild definitions", count );
|
||||
}
|
||||
|
||||
@@ -2663,7 +2663,7 @@ void ObjectMgr::LoadArenaTeams()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u arenateam definitions", count );
|
||||
return;
|
||||
}
|
||||
@@ -2688,7 +2688,7 @@ void ObjectMgr::LoadArenaTeams()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u arenateam definitions", count );
|
||||
}
|
||||
|
||||
@@ -2707,7 +2707,7 @@ void ObjectMgr::LoadGroups()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u group definitions", count );
|
||||
return;
|
||||
}
|
||||
@@ -2733,7 +2733,7 @@ void ObjectMgr::LoadGroups()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u group definitions", count );
|
||||
|
||||
// -- loading members --
|
||||
@@ -2839,10 +2839,10 @@ void ObjectMgr::LoadGroups()
|
||||
delete result;
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u group-instance binds total", count );
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u group members total", count );
|
||||
}
|
||||
|
||||
@@ -2891,7 +2891,7 @@ void ObjectMgr::LoadQuests()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded 0 quests definitions" );
|
||||
sLog.outErrorDb("`quest_template` table is empty!");
|
||||
return;
|
||||
@@ -3480,7 +3480,7 @@ void ObjectMgr::LoadQuests()
|
||||
}
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u quests definitions", mQuestTemplates.size() );
|
||||
}
|
||||
|
||||
@@ -3506,7 +3506,7 @@ void ObjectMgr::LoadQuestLocales()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 Quest locale strings. DB table `locales_quest` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -3616,7 +3616,7 @@ void ObjectMgr::LoadQuestLocales()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u Quest locale strings", mQuestLocaleMap.size() );
|
||||
}
|
||||
|
||||
@@ -3628,7 +3628,7 @@ void ObjectMgr::LoadPetCreateSpells()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded 0 pet create spells" );
|
||||
sLog.outErrorDb("`petcreateinfo_spell` table is empty!");
|
||||
return;
|
||||
@@ -3667,7 +3667,7 @@ void ObjectMgr::LoadPetCreateSpells()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u pet create spells", count );
|
||||
}
|
||||
|
||||
@@ -3689,7 +3689,7 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u script definitions", count );
|
||||
return;
|
||||
}
|
||||
@@ -3911,7 +3911,7 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u script definitions", count );
|
||||
}
|
||||
|
||||
@@ -4061,7 +4061,7 @@ void ObjectMgr::LoadItemTexts()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u item pages", count );
|
||||
return;
|
||||
}
|
||||
@@ -4083,7 +4083,7 @@ void ObjectMgr::LoadItemTexts()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u item texts", count );
|
||||
}
|
||||
|
||||
@@ -4093,7 +4093,7 @@ void ObjectMgr::LoadPageTexts()
|
||||
|
||||
sPageTextStore.Load();
|
||||
sLog.outString( ">> Loaded %u page texts", sPageTextStore.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
for(uint32 i = 1; i < sPageTextStore.MaxEntry; ++i)
|
||||
{
|
||||
@@ -4143,7 +4143,7 @@ void ObjectMgr::LoadPageTextLocales()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 PageText locale strings. DB table `locales_page_text` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -4179,7 +4179,7 @@ void ObjectMgr::LoadPageTextLocales()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u PageText locale strings", mPageTextLocaleMap.size() );
|
||||
}
|
||||
|
||||
@@ -4234,7 +4234,7 @@ void ObjectMgr::LoadInstanceTemplate()
|
||||
}
|
||||
|
||||
sLog.outString( ">> Loaded %u Instance Template definitions", sInstanceTemplate.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
|
||||
GossipText const *ObjectMgr::GetGossipText(uint32 Text_ID) const
|
||||
@@ -4255,7 +4255,7 @@ void ObjectMgr::LoadGossipText()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u npc texts", count );
|
||||
return;
|
||||
}
|
||||
@@ -4298,7 +4298,7 @@ void ObjectMgr::LoadGossipText()
|
||||
}
|
||||
} while( result->NextRow() );
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u npc texts", count );
|
||||
delete result;
|
||||
}
|
||||
@@ -4324,7 +4324,7 @@ void ObjectMgr::LoadNpcTextLocales()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 Quest locale strings. DB table `locales_npc_text` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -4374,7 +4374,7 @@ void ObjectMgr::LoadNpcTextLocales()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u NpcText locale strings", mNpcTextLocaleMap.size() );
|
||||
}
|
||||
|
||||
@@ -4392,7 +4392,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
|
||||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Only expired mails (need to be return or delete) or DB table `mail` is empty.");
|
||||
return; // any mails need to be returned or deleted
|
||||
}
|
||||
@@ -4479,7 +4479,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
|
||||
} while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u mails", count );
|
||||
}
|
||||
|
||||
@@ -4496,7 +4496,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u quest trigger points", count );
|
||||
return;
|
||||
}
|
||||
@@ -4544,7 +4544,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u quest trigger points", count );
|
||||
}
|
||||
|
||||
@@ -4561,7 +4561,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u tavern triggers", count );
|
||||
return;
|
||||
}
|
||||
@@ -4589,7 +4589,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u tavern triggers", count );
|
||||
}
|
||||
|
||||
@@ -4605,7 +4605,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u areatrigger scripts", count );
|
||||
return;
|
||||
}
|
||||
@@ -4633,7 +4633,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u areatrigger scripts", count );
|
||||
}
|
||||
|
||||
@@ -4791,7 +4791,7 @@ void ObjectMgr::LoadGraveyardZones()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u graveyard-zone links", count );
|
||||
return;
|
||||
}
|
||||
@@ -4841,7 +4841,7 @@ void ObjectMgr::LoadGraveyardZones()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u graveyard-zone links", count );
|
||||
}
|
||||
|
||||
@@ -5058,7 +5058,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u area trigger teleport definitions", count );
|
||||
return;
|
||||
}
|
||||
@@ -5110,7 +5110,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u area trigger teleport definitions", count );
|
||||
}
|
||||
|
||||
@@ -5129,7 +5129,7 @@ void ObjectMgr::LoadAccessRequirements()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u access requirement definitions", count );
|
||||
return;
|
||||
}
|
||||
@@ -5225,7 +5225,7 @@ void ObjectMgr::LoadAccessRequirements()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u access requirement definitions", count );
|
||||
}
|
||||
|
||||
@@ -5491,7 +5491,7 @@ void ObjectMgr::LoadGameObjectLocales()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded 0 gameobject locale strings. DB table `locales_gameobject` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -5543,7 +5543,7 @@ void ObjectMgr::LoadGameObjectLocales()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u gameobject locale strings", mGameObjectLocaleMap.size() );
|
||||
}
|
||||
|
||||
@@ -5739,7 +5739,7 @@ void ObjectMgr::LoadGameobjectInfo()
|
||||
}
|
||||
|
||||
sLog.outString( ">> Loaded %u game object templates", sGOStorage.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadExplorationBaseXP()
|
||||
@@ -5753,7 +5753,7 @@ void ObjectMgr::LoadExplorationBaseXP()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u BaseXP definitions", count );
|
||||
return;
|
||||
}
|
||||
@@ -5774,7 +5774,7 @@ void ObjectMgr::LoadExplorationBaseXP()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u BaseXP definitions", count );
|
||||
}
|
||||
|
||||
@@ -5801,7 +5801,7 @@ void ObjectMgr::LoadPetNames()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u pet name parts", count );
|
||||
return;
|
||||
}
|
||||
@@ -5825,7 +5825,7 @@ void ObjectMgr::LoadPetNames()
|
||||
while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u pet name parts", count );
|
||||
}
|
||||
|
||||
@@ -5842,7 +5842,7 @@ void ObjectMgr::LoadPetNumber()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded the max pet number: %d", m_hiPetNumber-1);
|
||||
}
|
||||
|
||||
@@ -5880,7 +5880,7 @@ void ObjectMgr::LoadCorpses()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u corpses", count );
|
||||
return;
|
||||
}
|
||||
@@ -5909,7 +5909,7 @@ void ObjectMgr::LoadCorpses()
|
||||
while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u corpses", count );
|
||||
}
|
||||
|
||||
@@ -5929,7 +5929,7 @@ void ObjectMgr::LoadReputationOnKill()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -5987,7 +5987,7 @@ void ObjectMgr::LoadReputationOnKill()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u creature award reputation definitions", count);
|
||||
}
|
||||
|
||||
@@ -6004,7 +6004,7 @@ void ObjectMgr::LoadPointsOfInterest()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -6039,7 +6039,7 @@ void ObjectMgr::LoadPointsOfInterest()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u Points of Interest definitions", count);
|
||||
}
|
||||
|
||||
@@ -6056,7 +6056,7 @@ void ObjectMgr::LoadWeatherZoneChances()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
|
||||
return;
|
||||
}
|
||||
@@ -6102,7 +6102,7 @@ void ObjectMgr::LoadWeatherZoneChances()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u weather definitions", count);
|
||||
}
|
||||
|
||||
@@ -6196,7 +6196,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map,char const* table)
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded 0 quest relations from %s. DB table `%s` is empty.",table,table);
|
||||
return;
|
||||
}
|
||||
@@ -6224,7 +6224,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map,char const* table)
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u quest relations from %s", count,table);
|
||||
}
|
||||
|
||||
@@ -6297,7 +6297,7 @@ void ObjectMgr::LoadReservedPlayersNames()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u reserved player names", count );
|
||||
return;
|
||||
}
|
||||
@@ -6326,7 +6326,7 @@ void ObjectMgr::LoadReservedPlayersNames()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u reserved player names", count );
|
||||
}
|
||||
|
||||
@@ -6497,7 +6497,7 @@ void ObjectMgr::LoadGameObjectForQuests()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded 0 GameObjects for quests" );
|
||||
return;
|
||||
}
|
||||
@@ -6542,7 +6542,7 @@ void ObjectMgr::LoadGameObjectForQuests()
|
||||
}
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u GameObjects for quests", count );
|
||||
}
|
||||
|
||||
@@ -6569,7 +6569,7 @@ bool ObjectMgr::LoadTrinityStrings(DatabaseType& db, char const* table, int32 mi
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
if(min_value == MIN_TRINITY_STRING_ID) // error only in case internal strings
|
||||
sLog.outErrorDb(">> Loaded 0 trinity strings. DB table `%s` is empty. Cannot continue.",table);
|
||||
else
|
||||
@@ -6635,7 +6635,7 @@ bool ObjectMgr::LoadTrinityStrings(DatabaseType& db, char const* table, int32 mi
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
if(min_value == MIN_TRINITY_STRING_ID) // internal Trinity strings
|
||||
sLog.outString( ">> Loaded %u Trinity strings from table %s", count,table);
|
||||
else
|
||||
@@ -6677,7 +6677,7 @@ void ObjectMgr::LoadSpellDisabledEntrys()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u disabled spells", total_count );
|
||||
return;
|
||||
}
|
||||
@@ -6707,7 +6707,7 @@ void ObjectMgr::LoadSpellDisabledEntrys()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u disabled spells from `spell_disabled`", total_count);
|
||||
}
|
||||
|
||||
@@ -6724,7 +6724,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded `skill_fishing_base_level`, table is empty!");
|
||||
return;
|
||||
}
|
||||
@@ -6753,7 +6753,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u areas for fishing base skill level", count );
|
||||
}
|
||||
|
||||
@@ -7049,7 +7049,7 @@ void ObjectMgr::LoadGameTele()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded `game_tele`, table is empty!");
|
||||
return;
|
||||
}
|
||||
@@ -7094,7 +7094,7 @@ void ObjectMgr::LoadGameTele()
|
||||
while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u GameTeleports", count );
|
||||
}
|
||||
|
||||
@@ -7183,7 +7183,7 @@ void ObjectMgr::LoadTrainerSpell()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded `npc_trainer`, table is empty!");
|
||||
return;
|
||||
}
|
||||
@@ -7264,7 +7264,7 @@ void ObjectMgr::LoadTrainerSpell()
|
||||
} while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %d Trainers", count );
|
||||
}
|
||||
|
||||
@@ -7284,7 +7284,7 @@ void ObjectMgr::LoadVendors()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded `npc_vendor`, table is empty!");
|
||||
return;
|
||||
}
|
||||
@@ -7314,7 +7314,7 @@ void ObjectMgr::LoadVendors()
|
||||
} while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %d Vendors ", count );
|
||||
}
|
||||
|
||||
@@ -7330,7 +7330,7 @@ void ObjectMgr::LoadNpcTextId()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded `npc_gossip`, table is empty!");
|
||||
return;
|
||||
}
|
||||
@@ -7365,7 +7365,7 @@ void ObjectMgr::LoadNpcTextId()
|
||||
} while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %d NpcTextId ", count );
|
||||
}
|
||||
|
||||
@@ -7384,7 +7384,7 @@ void ObjectMgr::LoadNpcOptions()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded `npc_option`, table is empty!");
|
||||
return;
|
||||
}
|
||||
@@ -7417,7 +7417,7 @@ void ObjectMgr::LoadNpcOptions()
|
||||
} while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %d npc_option entries", count );
|
||||
}
|
||||
|
||||
@@ -7548,7 +7548,7 @@ void ObjectMgr::LoadScriptNames()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outErrorDb(">> Loaded empty set of Script Names!");
|
||||
return;
|
||||
}
|
||||
@@ -7565,7 +7565,7 @@ void ObjectMgr::LoadScriptNames()
|
||||
delete result;
|
||||
|
||||
std::sort(m_scriptNames.begin(), m_scriptNames.end());
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %d Script Names", count );
|
||||
}
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ void PoolHandler::LoadFromDB()
|
||||
if (!result)
|
||||
{
|
||||
sLog.outString(">> Table pool_template is empty.");
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -359,7 +359,7 @@ void PoolHandler::LoadFromDB()
|
||||
{
|
||||
mPoolTemplate.clear();
|
||||
sLog.outString(">> Table pool_template is empty:");
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ void PoolHandler::LoadFromDB()
|
||||
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u objects pools", count );
|
||||
delete result;
|
||||
|
||||
@@ -397,7 +397,7 @@ void PoolHandler::LoadFromDB()
|
||||
barGoLink bar2(1);
|
||||
bar2.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u creatures in pools", count );
|
||||
}
|
||||
else
|
||||
@@ -440,7 +440,7 @@ void PoolHandler::LoadFromDB()
|
||||
mCreatureSearchMap.insert(p);
|
||||
|
||||
} while (result->NextRow());
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u creatures in pools", count );
|
||||
delete result;
|
||||
}
|
||||
@@ -458,7 +458,7 @@ void PoolHandler::LoadFromDB()
|
||||
barGoLink bar2(1);
|
||||
bar2.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u gameobject in pools", count );
|
||||
}
|
||||
else
|
||||
@@ -510,7 +510,7 @@ void PoolHandler::LoadFromDB()
|
||||
mGameobjectSearchMap.insert(p);
|
||||
|
||||
} while( result->NextRow() );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u gameobject in pools", count );
|
||||
delete result;
|
||||
}
|
||||
@@ -526,7 +526,7 @@ void PoolHandler::LoadFromDB()
|
||||
barGoLink bar2(1);
|
||||
bar2.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u pools in pools", count );
|
||||
}
|
||||
else
|
||||
@@ -598,7 +598,7 @@ void PoolHandler::LoadFromDB()
|
||||
}
|
||||
}
|
||||
}
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u pools in mother pools", count );
|
||||
delete result;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ bool LoadScriptingModule(char const* libName)
|
||||
return false;
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">>> Scripts Library %s was successfully loaded.\n", name.c_str() );
|
||||
|
||||
//heh we are still there :P we have a valid library
|
||||
|
||||
@@ -126,14 +126,14 @@ void LoadSkillDiscoveryTable()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u skill discovery definitions", count );
|
||||
if(!ssNonDiscoverableEntries.str().empty())
|
||||
sLog.outErrorDb("Some items can't be successfully discovered: have in chance field value < 0.000001 in `skill_discovery_template` DB table . List:\n%s",ssNonDiscoverableEntries.str().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty." );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,12 +110,12 @@ void LoadSkillExtraItemTable()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell specialization definitions", count );
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty." );
|
||||
}
|
||||
}
|
||||
|
||||
+27
-27
@@ -850,7 +850,7 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell target coordinates", count );
|
||||
return;
|
||||
}
|
||||
@@ -916,7 +916,7 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell teleport coordinates", count );
|
||||
}
|
||||
|
||||
@@ -935,7 +935,7 @@ void SpellMgr::LoadSpellAffects()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell affect definitions", count );
|
||||
return;
|
||||
}
|
||||
@@ -996,7 +996,7 @@ void SpellMgr::LoadSpellAffects()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u custom spell affect definitions", count );
|
||||
|
||||
for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id)
|
||||
@@ -1056,7 +1056,7 @@ void SpellMgr::LoadSpellProcEvents()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell proc event conditions", count );
|
||||
return;
|
||||
}
|
||||
@@ -1107,7 +1107,7 @@ void SpellMgr::LoadSpellProcEvents()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
if (customProc)
|
||||
sLog.outString( ">> Loaded %u extra spell proc event conditions +%u custom", count, customProc );
|
||||
else
|
||||
@@ -1124,7 +1124,7 @@ void SpellMgr::LoadSpellBonusess()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell bonus data", count);
|
||||
return;
|
||||
}
|
||||
@@ -1154,7 +1154,7 @@ void SpellMgr::LoadSpellBonusess()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u extra spell bonus data", count);
|
||||
}
|
||||
|
||||
@@ -1238,7 +1238,7 @@ void SpellMgr::LoadSpellElixirs()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell elixir definitions", count );
|
||||
return;
|
||||
}
|
||||
@@ -1269,7 +1269,7 @@ void SpellMgr::LoadSpellElixirs()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell elixir definitions", count );
|
||||
}
|
||||
|
||||
@@ -1280,7 +1280,7 @@ void SpellMgr::LoadSpellThreats()
|
||||
sSpellThreatStore.Load();
|
||||
|
||||
sLog.outString( ">> Loaded %u aggro generating spells", sSpellThreatStore.RecordCount );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
|
||||
bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellId_2) const
|
||||
@@ -1542,7 +1542,7 @@ void SpellMgr::LoadSpellRequired()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded 0 spell required records" );
|
||||
sLog.outErrorDb("`spell_required` table is empty!");
|
||||
return;
|
||||
@@ -1564,7 +1564,7 @@ void SpellMgr::LoadSpellRequired()
|
||||
} while( result->NextRow() );
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell required records", rows );
|
||||
}
|
||||
|
||||
@@ -1860,7 +1860,7 @@ void SpellMgr::LoadSpellChains()
|
||||
//for (UNORDERED_MAP<uint32, SpellChainNode>::iterator itr=mSpellChains.begin();itr!=mSpellChains.end();itr++)
|
||||
//sLog.outString( "Id: %u, Rank: %d , %s, %u, %u, %u, %u",itr->first,itr->second.rank, sSpellStore.LookupEntry(itr->first)->Rank[sWorld.GetDefaultDbcLocale()], itr->second.first, itr->second.last,itr->second.next ,itr->second.prev);
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell chains",count);
|
||||
}
|
||||
|
||||
@@ -1900,7 +1900,7 @@ void SpellMgr::LoadSpellLearnSkills()
|
||||
}
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u Spell Learn Skills from DBC", dbc_count );
|
||||
}
|
||||
|
||||
@@ -1915,7 +1915,7 @@ void SpellMgr::LoadSpellLearnSpells()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded 0 spell learn spells" );
|
||||
sLog.outErrorDb("`spell_learn_spell` table is empty!");
|
||||
return;
|
||||
@@ -2005,7 +2005,7 @@ void SpellMgr::LoadSpellLearnSpells()
|
||||
}
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell learn spells + %u found in DBC", count, dbc_count );
|
||||
}
|
||||
|
||||
@@ -2023,7 +2023,7 @@ void SpellMgr::LoadSpellScriptTarget()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded 0 spell script target" );
|
||||
sLog.outErrorDb("`spell_script_target` table is empty!");
|
||||
return;
|
||||
@@ -2142,7 +2142,7 @@ void SpellMgr::LoadSpellScriptTarget()
|
||||
}
|
||||
*/
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u Spell Script Targets", count);
|
||||
}
|
||||
|
||||
@@ -2161,7 +2161,7 @@ void SpellMgr::LoadSpellPetAuras()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell pet auras", count );
|
||||
return;
|
||||
}
|
||||
@@ -2220,7 +2220,7 @@ void SpellMgr::LoadSpellPetAuras()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell pet auras", count );
|
||||
}
|
||||
|
||||
@@ -2387,7 +2387,7 @@ void SpellMgr::LoadSpellLinked()
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u linked spells", count );
|
||||
return;
|
||||
}
|
||||
@@ -2445,7 +2445,7 @@ void SpellMgr::LoadSpellLinked()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u linked spells", count );
|
||||
}
|
||||
|
||||
@@ -2485,7 +2485,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
|
||||
}
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u pet levelup spells", count );
|
||||
}
|
||||
|
||||
@@ -2583,7 +2583,7 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell area requirements", count );
|
||||
return;
|
||||
}
|
||||
@@ -2771,7 +2771,7 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u spell area requirements", count );
|
||||
}
|
||||
|
||||
@@ -2892,7 +2892,7 @@ void SpellMgr::LoadSkillLineAbilityMap()
|
||||
++count;
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString(">> Loaded %u SkillLineAbility MultiMap Data", count);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void MapManager::LoadTransports()
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u transports", count );
|
||||
return;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ void MapManager::LoadTransports()
|
||||
} while(result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Loaded %u transports", count );
|
||||
|
||||
// check transport data DB integrity
|
||||
|
||||
+33
-21
@@ -1110,7 +1110,7 @@ void World::SetInitialWorldSettings()
|
||||
}
|
||||
|
||||
///- Loading strings. Getting no records means core load has to be canceled because no error message can be output.
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( "Loading Trinity strings..." );
|
||||
if (!objmgr.LoadTrinityStrings())
|
||||
exit(1); // Error message displayed in function already
|
||||
@@ -1147,7 +1147,7 @@ void World::SetInitialWorldSettings()
|
||||
sLog.outString( "Packing instances..." );
|
||||
sInstanceSaveManager.PackInstances();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( "Loading Localization strings..." );
|
||||
objmgr.LoadCreatureLocales();
|
||||
objmgr.LoadGameObjectLocales();
|
||||
@@ -1159,7 +1159,7 @@ void World::SetInitialWorldSettings()
|
||||
objmgr.LoadPointOfInterestLocales();
|
||||
objmgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
|
||||
sLog.outString( ">>> Localization strings loaded" );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
sLog.outString( "Loading Page Texts..." );
|
||||
objmgr.LoadPageTexts();
|
||||
@@ -1231,10 +1231,10 @@ void World::SetInitialWorldSettings()
|
||||
objmgr.LoadCreatures();
|
||||
|
||||
sLog.outString( "Loading Creature Addon Data..." );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
objmgr.LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures()
|
||||
sLog.outString( ">>> Creature Addon Data loaded" );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
sLog.outString( "Loading Creature Respawn Data..." ); // must be after PackInstances()
|
||||
objmgr.LoadCreatureRespawnTimes();
|
||||
@@ -1249,10 +1249,10 @@ void World::SetInitialWorldSettings()
|
||||
poolhandler.LoadFromDB();
|
||||
|
||||
sLog.outString( "Loading Game Event Data...");
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
gameeventmgr.LoadFromDB();
|
||||
sLog.outString( ">>> Game Event Data loaded" );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
sLog.outString( "Loading Weather Data..." );
|
||||
objmgr.LoadWeatherZoneChances();
|
||||
@@ -1261,10 +1261,10 @@ void World::SetInitialWorldSettings()
|
||||
objmgr.LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables
|
||||
|
||||
sLog.outString( "Loading Quests Relations..." );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
objmgr.LoadQuestRelations(); // must be after quest load
|
||||
sLog.outString( ">>> Quests Relations loaded" );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
sLog.outString( "Loading SpellArea Data..." ); // must be after quest load
|
||||
spellmgr.LoadSpellAreas();
|
||||
@@ -1306,10 +1306,10 @@ void World::SetInitialWorldSettings()
|
||||
spellmgr.LoadSpellLinked();
|
||||
|
||||
sLog.outString( "Loading Player Create Info & Level Stats..." );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
objmgr.LoadPlayerInfo();
|
||||
sLog.outString( ">>> Player Create Info & Level Stats loaded" );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
sLog.outString( "Loading Exploration BaseXP Data..." );
|
||||
objmgr.LoadExplorationBaseXP();
|
||||
@@ -1330,10 +1330,10 @@ void World::SetInitialWorldSettings()
|
||||
objmgr.LoadSpellDisabledEntrys();
|
||||
|
||||
sLog.outString( "Loading Loot Tables..." );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
LoadLootTables();
|
||||
sLog.outString( ">>> Loot Tables loaded" );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
sLog.outString( "Loading Skill Discovery Table..." );
|
||||
LoadSkillDiscoveryTable();
|
||||
@@ -1345,21 +1345,21 @@ void World::SetInitialWorldSettings()
|
||||
objmgr.LoadFishingBaseSkillLevel();
|
||||
|
||||
sLog.outString( "Loading Achievements..." );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
achievementmgr.LoadAchievementCriteriaList();
|
||||
achievementmgr.LoadRewards();
|
||||
achievementmgr.LoadRewardLocales();
|
||||
achievementmgr.LoadCompletedAchievements();
|
||||
sLog.outString( ">>> Achievements loaded" );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
///- Load dynamic data tables from the database
|
||||
sLog.outString( "Loading Auctions..." );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
auctionmgr.LoadAuctionItems();
|
||||
auctionmgr.LoadAuctions();
|
||||
sLog.outString( ">>> Auctions loaded" );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
sLog.outString( "Loading Guilds..." );
|
||||
objmgr.LoadGuilds();
|
||||
@@ -1395,7 +1395,7 @@ void World::SetInitialWorldSettings()
|
||||
objmgr.LoadTrainerSpell(); // must be after load CreatureTemplate
|
||||
|
||||
sLog.outString( "Loading Waypoints..." );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
WaypointMgr.Load();
|
||||
|
||||
sLog.outString( "Loading Creature Formations..." );
|
||||
@@ -1410,7 +1410,7 @@ void World::SetInitialWorldSettings()
|
||||
|
||||
///- Load and initialize scripts
|
||||
sLog.outString( "Loading Scripts..." );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
objmgr.LoadQuestStartScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
|
||||
objmgr.LoadQuestEndScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
|
||||
objmgr.LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
|
||||
@@ -1418,7 +1418,7 @@ void World::SetInitialWorldSettings()
|
||||
objmgr.LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
|
||||
objmgr.LoadWaypointScripts();
|
||||
sLog.outString( ">>> Scripts loaded" );
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
sLog.outString( "Loading Scripts text locales..." ); // must be after Load*Scripts calls
|
||||
objmgr.LoadDbScriptStrings();
|
||||
@@ -1500,6 +1500,18 @@ void World::SetInitialWorldSettings()
|
||||
sLog.outString("Initialize AuctionHouseBot...");
|
||||
AuctionHouseBotInit();
|
||||
|
||||
// possibly enable db logging; avoid massive startup spam by doing it here.
|
||||
if (sLog.GetLogDBLater())
|
||||
{
|
||||
sLog.outString("Enabling database logging...");
|
||||
sLog.SetLogDBLater(false);
|
||||
sLog.SetLogDB(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.SetLogDBLater(false);
|
||||
}
|
||||
|
||||
sLog.outString( "WORLD: World initialized" );
|
||||
}
|
||||
|
||||
@@ -1544,7 +1556,7 @@ 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());
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
|
||||
void World::RecordTimeDiff(const char *text, ...)
|
||||
|
||||
@@ -309,7 +309,7 @@ void CliRunnable::run()
|
||||
char commandbuf[256];
|
||||
|
||||
///- Display the list of available CLI functions then beep
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
|
||||
if(sConfig.GetBoolDefault("BeepAtStart", true))
|
||||
printf("\a"); // \a = Alert
|
||||
|
||||
+19
-11
@@ -202,15 +202,15 @@ int Master::Run()
|
||||
sLog.outString( "%s (core-daemon)", _FULLVERSION );
|
||||
sLog.outString( "<Ctrl-C> to stop.\n" );
|
||||
|
||||
sLog.outTitle( " ______ __");
|
||||
sLog.outTitle( "/\\__ _\\ __ __/\\ \\__");
|
||||
sLog.outTitle( "\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\ ,_\\ __ __");
|
||||
sLog.outTitle( " \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\");
|
||||
sLog.outTitle( " \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\");
|
||||
sLog.outTitle( " \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\");
|
||||
sLog.outTitle( " \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\");
|
||||
sLog.outTitle( " C O R E /\\___/");
|
||||
sLog.outTitle( "http://TrinityCore.org \\/__/\n");
|
||||
sLog.outString( " ______ __");
|
||||
sLog.outString( "/\\__ _\\ __ __/\\ \\__");
|
||||
sLog.outString( "\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\ ,_\\ __ __");
|
||||
sLog.outString( " \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\");
|
||||
sLog.outString( " \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\");
|
||||
sLog.outString( " \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\");
|
||||
sLog.outString( " \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\");
|
||||
sLog.outString( " C O R E /\\___/");
|
||||
sLog.outString( "http://TrinityCore.org \\/__/\n");
|
||||
|
||||
/// worldd PID file creation
|
||||
std::string pidfile = sConfig.GetStringDefault("PidFile", "");
|
||||
@@ -282,7 +282,7 @@ int Master::Run()
|
||||
sLog.outError("Can't set used processors (hex): %x",curAff);
|
||||
}
|
||||
}
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
|
||||
bool Prio = sConfig.GetBoolDefault("ProcessPriority", false);
|
||||
@@ -294,7 +294,7 @@ int Master::Run()
|
||||
sLog.outString("TrinityCore process priority class set to HIGH");
|
||||
else
|
||||
sLog.outError("ERROR: Can't set Trinityd process priority class.");
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -459,6 +459,14 @@ bool Master::_StartDB()
|
||||
}
|
||||
sLog.outString("Realm running as realm ID %d", realmID);
|
||||
|
||||
///- Initialize the DB logging system
|
||||
if(sConfig.GetBoolDefault("EnableLogDB", false))
|
||||
{
|
||||
// everything successful - set var to enable DB logging once startup finished.
|
||||
sLog.SetLogDBLater(true);
|
||||
sLog.SetRealmID(realmID);
|
||||
}
|
||||
|
||||
///- Clean the database before starting
|
||||
clearOnlineAccounts();
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ RASocket::~RASocket()
|
||||
///- Delete buffer and decrease active admins count
|
||||
delete [] buff;
|
||||
|
||||
sLog.outRALog("Connection was closed.\n");
|
||||
sLog.outRemote("Connection was closed.\n");
|
||||
|
||||
if(stage==OK)
|
||||
iUsers--;
|
||||
@@ -79,7 +79,7 @@ RASocket::~RASocket()
|
||||
void RASocket::OnAccept()
|
||||
{
|
||||
std::string ss=GetRemoteAddress();
|
||||
sLog.outRALog("Incoming connection from %s.\n",ss.c_str());
|
||||
sLog.outRemote("Incoming connection from %s.\n",ss.c_str());
|
||||
///- If there is already an active admin, drop the connection
|
||||
if(iUsers)
|
||||
dropclient
|
||||
@@ -97,7 +97,7 @@ void RASocket::OnRead()
|
||||
unsigned int sz=ibuf.GetLength();
|
||||
if(iInputLength+sz>=RA_BUFF_SIZE)
|
||||
{
|
||||
sLog.outRALog("Input buffer overflow, possible DOS attack.\n");
|
||||
sLog.outRemote("Input buffer overflow, possible DOS attack.\n");
|
||||
SetCloseAndDelete();
|
||||
return;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ void RASocket::OnRead()
|
||||
if(!result)
|
||||
{
|
||||
Sendf("-No such user.\r\n");
|
||||
sLog.outRALog("User %s does not exist.\n",szLogin.c_str());
|
||||
sLog.outRemote("User %s does not exist.\n",szLogin.c_str());
|
||||
if(bSecure)SetCloseAndDelete();
|
||||
}
|
||||
else
|
||||
@@ -173,7 +173,7 @@ void RASocket::OnRead()
|
||||
if(fields[0].GetUInt32()<iMinLevel)
|
||||
{
|
||||
Sendf("-Not enough privileges.\r\n");
|
||||
sLog.outRALog("User %s has no privilege.\n",szLogin.c_str());
|
||||
sLog.outRemote("User %s has no privilege.\n",szLogin.c_str());
|
||||
if(bSecure)SetCloseAndDelete();
|
||||
} else
|
||||
{
|
||||
@@ -208,14 +208,14 @@ void RASocket::OnRead()
|
||||
++iUsers;
|
||||
|
||||
Sendf("+Logged in.\r\n");
|
||||
sLog.outRALog("User %s has logged in.\n",szLogin.c_str());
|
||||
sLog.outRemote("User %s has logged in.\n",szLogin.c_str());
|
||||
Sendf("TC>");
|
||||
}
|
||||
else
|
||||
{
|
||||
///- Else deny access
|
||||
Sendf("-Wrong pass.\r\n");
|
||||
sLog.outRALog("User %s has failed to log in.\n",szLogin.c_str());
|
||||
sLog.outRemote("User %s has failed to log in.\n",szLogin.c_str());
|
||||
if(bSecure)SetCloseAndDelete();
|
||||
}
|
||||
}
|
||||
@@ -224,7 +224,7 @@ void RASocket::OnRead()
|
||||
case OK:
|
||||
if(strlen(buff))
|
||||
{
|
||||
sLog.outRALog("Got '%s' cmd.\n",buff);
|
||||
sLog.outRemote("Got '%s' cmd.\n",buff);
|
||||
sWorld.QueueCliCommand(&RASocket::zprint , buff);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -49,6 +49,8 @@ void WorldRunnable::run()
|
||||
{
|
||||
///- Init new SQL thread for the world database
|
||||
WorldDatabase.ThreadStart(); // let thread do safe mySQL requests (one connection call enough)
|
||||
CharacterDatabase.ThreadStart();
|
||||
LoginDatabase.ThreadStart();
|
||||
sWorld.InitResultQueue();
|
||||
|
||||
uint32 realCurrTime = 0;
|
||||
@@ -97,4 +99,6 @@ void WorldRunnable::run()
|
||||
|
||||
///- End the database thread
|
||||
WorldDatabase.ThreadEnd(); // free mySQL thread resources
|
||||
CharacterDatabase.ThreadStart();
|
||||
LoginDatabase.ThreadEnd();
|
||||
}
|
||||
|
||||
@@ -218,11 +218,6 @@ AddonChannel = 1
|
||||
# 0 = Minimum; 1 = Basic&Error; 2 = Detail; 3 = Full/Debug
|
||||
# Default: 3
|
||||
#
|
||||
# LogTime
|
||||
# Include time in server console output [hh:mm:ss]
|
||||
# Default: 0 (no time)
|
||||
# 1 (print time)
|
||||
#
|
||||
# LogFile
|
||||
# Logfile name
|
||||
# Default: "Server.log"
|
||||
@@ -293,19 +288,41 @@ AddonChannel = 1
|
||||
# Default: "Ra.log"
|
||||
# "" - Empty name for disable
|
||||
#
|
||||
# LogColors
|
||||
# Color for messages (format "normal_color details_color debug_color error_color")
|
||||
# Colors: 0 - BLACK, 1 - RED, 2 - GREEN, 3 - BROWN, 4 - BLUE, 5 - MAGENTA, 6 - CYAN, 7 - GREY,
|
||||
# 8 - YELLOW, 9 - LRED, 10 - LGREEN, 11 - LBLUE, 12 - LMAGENTA, 13 - LCYAN, 14 - WHITE
|
||||
# Default: "" - none colors
|
||||
# Example: "13 7 11 9"
|
||||
# EnableLogDB
|
||||
# Enable/disable logging to database (LogDatabaseInfo).
|
||||
# Default: 0 - disabled
|
||||
# 1 - enabled
|
||||
#
|
||||
# DBLogLevel
|
||||
# Log level of DB logging.
|
||||
# 1 = Basic&Error; 2 = Detail; 3 = Full/Debug
|
||||
# Default: 3
|
||||
#
|
||||
# LogDB.Char
|
||||
# Enable/disable logging character outputs to DB.
|
||||
# Default: 0 - off
|
||||
# 1 - on
|
||||
#
|
||||
# LogDB.GM
|
||||
# Enable/disable logging GM commands to DB.
|
||||
# Default: 0 - off
|
||||
# 1 - on
|
||||
#
|
||||
# LogDB.RA
|
||||
# Enable/disable logging remote access events to DB.
|
||||
# Default: 0 - off
|
||||
# 1 - on
|
||||
#
|
||||
# LogDB.World
|
||||
# Enable/disable logging world packets to DB.
|
||||
# Default: 0 - off
|
||||
# 1 - on (very heavy)
|
||||
#
|
||||
###################################################################################################################
|
||||
|
||||
LogSQL = 1
|
||||
PidFile = ""
|
||||
LogLevel = 1
|
||||
LogTime = 0
|
||||
LogFile = "Server.log"
|
||||
LogTimestamp = 0
|
||||
LogFileLevel = 0
|
||||
@@ -322,7 +339,12 @@ GmLogFile = "gm_commands.log"
|
||||
GmLogTimestamp = 0
|
||||
GmLogPerAccount = 0
|
||||
RaLogFile = "ra_commands.log"
|
||||
LogColors = ""
|
||||
EnableLogDB = 0
|
||||
DBLogLevel = 1
|
||||
LogDB.Char = 0
|
||||
LogDB.GM = 0
|
||||
LogDB.RA = 0
|
||||
LogDB.World = 0
|
||||
|
||||
###################################################################################################################
|
||||
# SERVER SETTINGS
|
||||
|
||||
+22
-2
@@ -182,6 +182,15 @@ extern int main(int argc, char **argv)
|
||||
if(!StartDB())
|
||||
return 1;
|
||||
|
||||
///- Initialize the log database
|
||||
if(sConfig.GetBoolDefault("EnableLogDB", false))
|
||||
{
|
||||
// everything successful - set var to enable DB logging once startup finished.
|
||||
sLog.SetLogDBLater(true);
|
||||
// ensure we've set realm to 0 (realmd realmid)
|
||||
sLog.SetRealmID(0);
|
||||
}
|
||||
|
||||
///- Get the list of realms for the server
|
||||
m_realmList.Initialize(sConfig.GetIntDefault("RealmsStateUpdateDelay", 20));
|
||||
if (m_realmList.size() == 0)
|
||||
@@ -234,7 +243,7 @@ extern int main(int argc, char **argv)
|
||||
sLog.outError("Can't set used processors (hex): %x", curAff);
|
||||
}
|
||||
}
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
|
||||
bool Prio = sConfig.GetBoolDefault("ProcessPriority", false);
|
||||
@@ -245,7 +254,7 @@ extern int main(int argc, char **argv)
|
||||
sLog.outString("TrinityRealm process priority class set to HIGH");
|
||||
else
|
||||
sLog.outError("ERROR: Can't set realmd process priority class.");
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -254,6 +263,15 @@ extern int main(int argc, char **argv)
|
||||
uint32 numLoops = (sConfig.GetIntDefault( "MaxPingTime", 30 ) * (MINUTE * 1000000 / 100000));
|
||||
uint32 loopCounter = 0;
|
||||
|
||||
// possibly enable db logging; avoid massive startup spam by doing it here.
|
||||
if (sLog.GetLogDBLater())
|
||||
{
|
||||
sLog.outString("Enabling database logging...");
|
||||
sLog.SetLogDBLater(false);
|
||||
// login db needs thread for logging
|
||||
sLog.SetLogDB(true);
|
||||
}
|
||||
|
||||
///- Wait for termination signal
|
||||
while (!stopEvent)
|
||||
{
|
||||
@@ -273,6 +291,7 @@ extern int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
///- Wait for the delay thread to exit
|
||||
LoginDatabase.ThreadEnd();
|
||||
LoginDatabase.HaltDelayThread();
|
||||
|
||||
///- Remove signal handling before leaving
|
||||
@@ -317,6 +336,7 @@ bool StartDB()
|
||||
sLog.outError("Cannot connect to database");
|
||||
return false;
|
||||
}
|
||||
LoginDatabase.ThreadStart();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -365,9 +365,6 @@ class ByteBuffer
|
||||
uint32 j = 1, k = 1;
|
||||
sLog.outDebug("STORAGE_SIZE: %u", size() );
|
||||
|
||||
if(sLog.IsIncludeTime())
|
||||
sLog.outDebugInLine(" ");
|
||||
|
||||
for(uint32 i = 0; i < size(); i++)
|
||||
{
|
||||
if ((i == (j*8)) && ((i != (k*16))))
|
||||
@@ -387,16 +384,12 @@ class ByteBuffer
|
||||
if (read<uint8>(i) < 0x0F)
|
||||
{
|
||||
sLog.outDebugInLine("\n");
|
||||
if(sLog.IsIncludeTime())
|
||||
sLog.outDebugInLine(" ");
|
||||
|
||||
sLog.outDebugInLine("0%X ", read<uint8>(i) );
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outDebugInLine("\n");
|
||||
if(sLog.IsIncludeTime())
|
||||
sLog.outDebugInLine(" ");
|
||||
|
||||
sLog.outDebugInLine("%X ", read<uint8>(i) );
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString("");
|
||||
sLog.outString( ">> Initialized %d data stores", DBCFilesCount );
|
||||
}
|
||||
|
||||
|
||||
+150
-287
@@ -21,10 +21,12 @@
|
||||
#include "Common.h"
|
||||
#include "Log.h"
|
||||
#include "Policies/SingletonImp.h"
|
||||
#include "Database/DatabaseEnv.h"
|
||||
#include "Config/ConfigEnv.h"
|
||||
#include "Util.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
INSTANTIATE_SINGLETON_1( Log );
|
||||
|
||||
@@ -40,124 +42,32 @@ const int LogType_count = int(LogError) +1;
|
||||
|
||||
Log::Log() :
|
||||
raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL),
|
||||
dberLogfile(NULL), m_colored(false), m_includeTime(false), m_gmlog_per_account(false)
|
||||
dberLogfile(NULL), m_gmlog_per_account(false)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Log::InitColors(const std::string& str)
|
||||
Log::~Log()
|
||||
{
|
||||
if(str.empty())
|
||||
{
|
||||
m_colored = false;
|
||||
return;
|
||||
}
|
||||
if( logfile != NULL )
|
||||
fclose(logfile);
|
||||
logfile = NULL;
|
||||
|
||||
int color[4];
|
||||
if( gmLogfile != NULL )
|
||||
fclose(gmLogfile);
|
||||
gmLogfile = NULL;
|
||||
|
||||
std::istringstream ss(str);
|
||||
if (charLogfile != NULL)
|
||||
fclose(charLogfile);
|
||||
charLogfile = NULL;
|
||||
|
||||
for(int i = 0; i < LogType_count; ++i)
|
||||
{
|
||||
ss >> color[i];
|
||||
if( dberLogfile != NULL )
|
||||
fclose(dberLogfile);
|
||||
dberLogfile = NULL;
|
||||
|
||||
if(!ss)
|
||||
return;
|
||||
|
||||
if(color[i] < 0 || color[i] >= Color_count)
|
||||
return;
|
||||
}
|
||||
|
||||
for(int i = 0; i < LogType_count; ++i)
|
||||
m_colors[i] = Color(color[i]);
|
||||
|
||||
m_colored = true;
|
||||
}
|
||||
|
||||
void Log::SetColor(bool stdout_stream, Color color)
|
||||
{
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
|
||||
static WORD WinColorFG[Color_count] =
|
||||
{
|
||||
0, // BLACK
|
||||
FOREGROUND_RED, // RED
|
||||
FOREGROUND_GREEN, // GREEN
|
||||
FOREGROUND_RED | FOREGROUND_GREEN, // BROWN
|
||||
FOREGROUND_BLUE, // BLUE
|
||||
FOREGROUND_RED | FOREGROUND_BLUE,// MAGENTA
|
||||
FOREGROUND_GREEN | FOREGROUND_BLUE, // CYAN
|
||||
FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE,// WHITE
|
||||
// YELLOW
|
||||
FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY,
|
||||
// RED_BOLD
|
||||
FOREGROUND_RED | FOREGROUND_INTENSITY,
|
||||
// GREEN_BOLD
|
||||
FOREGROUND_GREEN | FOREGROUND_INTENSITY,
|
||||
FOREGROUND_BLUE | FOREGROUND_INTENSITY, // BLUE_BOLD
|
||||
// MAGENTA_BOLD
|
||||
FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY,
|
||||
// CYAN_BOLD
|
||||
FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY,
|
||||
// WHITE_BOLD
|
||||
FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY
|
||||
};
|
||||
|
||||
HANDLE hConsole = GetStdHandle(stdout_stream ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE );
|
||||
SetConsoleTextAttribute(hConsole, WinColorFG[color]);
|
||||
#else
|
||||
|
||||
enum ANSITextAttr
|
||||
{
|
||||
TA_NORMAL=0,
|
||||
TA_BOLD=1,
|
||||
TA_BLINK=5,
|
||||
TA_REVERSE=7
|
||||
};
|
||||
|
||||
enum ANSIFgTextAttr
|
||||
{
|
||||
FG_BLACK=30, FG_RED, FG_GREEN, FG_BROWN, FG_BLUE,
|
||||
FG_MAGENTA, FG_CYAN, FG_WHITE, FG_YELLOW
|
||||
};
|
||||
|
||||
enum ANSIBgTextAttr
|
||||
{
|
||||
BG_BLACK=40, BG_RED, BG_GREEN, BG_BROWN, BG_BLUE,
|
||||
BG_MAGENTA, BG_CYAN, BG_WHITE
|
||||
};
|
||||
|
||||
static uint8 UnixColorFG[Color_count] =
|
||||
{
|
||||
FG_BLACK, // BLACK
|
||||
FG_RED, // RED
|
||||
FG_GREEN, // GREEN
|
||||
FG_BROWN, // BROWN
|
||||
FG_BLUE, // BLUE
|
||||
FG_MAGENTA, // MAGENTA
|
||||
FG_CYAN, // CYAN
|
||||
FG_WHITE, // WHITE
|
||||
FG_YELLOW, // YELLOW
|
||||
FG_RED, // LRED
|
||||
FG_GREEN, // LGREEN
|
||||
FG_BLUE, // LBLUE
|
||||
FG_MAGENTA, // LMAGENTA
|
||||
FG_CYAN, // LCYAN
|
||||
FG_WHITE // LWHITE
|
||||
};
|
||||
|
||||
fprintf((stdout_stream? stdout : stderr), "\x1b[%d%sm",UnixColorFG[color],(color>=YELLOW&&color<Color_count ?";1":""));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Log::ResetColor(bool stdout_stream)
|
||||
{
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
HANDLE hConsole = GetStdHandle(stdout_stream ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE );
|
||||
SetConsoleTextAttribute(hConsole, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED );
|
||||
#else
|
||||
fprintf(( stdout_stream ? stdout : stderr ), "\x1b[0m");
|
||||
#endif
|
||||
if (raLogfile != NULL)
|
||||
fclose(raLogfile);
|
||||
raLogfile = NULL;
|
||||
}
|
||||
|
||||
void Log::SetLogLevel(char *Level)
|
||||
@@ -167,7 +77,7 @@ void Log::SetLogLevel(char *Level)
|
||||
NewLevel = 0;
|
||||
m_logLevel = NewLevel;
|
||||
|
||||
printf( "LogLevel is %u\n",m_logLevel );
|
||||
outString( "LogLevel is %u",m_logLevel );
|
||||
}
|
||||
|
||||
void Log::SetLogFileLevel(char *Level)
|
||||
@@ -177,11 +87,26 @@ void Log::SetLogFileLevel(char *Level)
|
||||
NewLevel = 0;
|
||||
m_logFileLevel = NewLevel;
|
||||
|
||||
printf( "LogFileLevel is %u\n",m_logFileLevel );
|
||||
outString( "LogFileLevel is %u",m_logFileLevel );
|
||||
}
|
||||
|
||||
void Log::SetDBLogLevel(char *Level)
|
||||
{
|
||||
int32 NewLevel = atoi((char*)Level);
|
||||
if ( NewLevel < 0 )
|
||||
NewLevel = 0;
|
||||
m_dbLogLevel = NewLevel;
|
||||
|
||||
outString( "DBLogLevel is %u",m_dbLogLevel );
|
||||
}
|
||||
|
||||
void Log::Initialize()
|
||||
{
|
||||
/// Check whether we'll log GM commands/RA events/character outputs
|
||||
m_dbChar = sConfig.GetBoolDefault("DBLog.Char", false);
|
||||
m_dbRA = sConfig.GetBoolDefault("DBLog.RA", false);
|
||||
m_dbGM = sConfig.GetBoolDefault("DBLog.GM", false);
|
||||
|
||||
/// Common log files data
|
||||
m_logsDir = sConfig.GetStringDefault("LogsDir","");
|
||||
if(!m_logsDir.empty())
|
||||
@@ -232,10 +157,9 @@ void Log::Initialize()
|
||||
raLogfile = openLogFile("RaLogFile",NULL,"a");
|
||||
|
||||
// Main log file settings
|
||||
m_includeTime = sConfig.GetBoolDefault("LogTime", false);
|
||||
m_logLevel = sConfig.GetIntDefault("LogLevel", 0);
|
||||
m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);
|
||||
InitColors(sConfig.GetStringDefault("LogColors", ""));
|
||||
m_logLevel = sConfig.GetIntDefault("LogLevel", LOGL_NORMAL);
|
||||
m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", LOGL_NORMAL);
|
||||
m_dbLogLevel = sConfig.GetIntDefault("DBLogLevel", LOGL_NORMAL);
|
||||
|
||||
m_logFilter = 0;
|
||||
|
||||
@@ -280,32 +204,6 @@ FILE* Log::openGmlogPerAccount(uint32 account)
|
||||
return fopen(namebuf, "a");
|
||||
}
|
||||
|
||||
void Log::outTimestamp(FILE* file)
|
||||
{
|
||||
time_t t = time(NULL);
|
||||
tm* aTm = localtime(&t);
|
||||
// YYYY year
|
||||
// MM month (2 digits 01-12)
|
||||
// DD day (2 digits 01-31)
|
||||
// HH hour (2 digits 00-23)
|
||||
// MM minutes (2 digits 00-59)
|
||||
// SS seconds (2 digits 00-59)
|
||||
fprintf(file,"%-4d-%02d-%02d %02d:%02d:%02d ",aTm->tm_year+1900,aTm->tm_mon+1,aTm->tm_mday,aTm->tm_hour,aTm->tm_min,aTm->tm_sec);
|
||||
}
|
||||
|
||||
void Log::outTime()
|
||||
{
|
||||
time_t t = time(NULL);
|
||||
tm* aTm = localtime(&t);
|
||||
// YYYY year
|
||||
// MM month (2 digits 01-12)
|
||||
// DD day (2 digits 01-31)
|
||||
// HH hour (2 digits 00-23)
|
||||
// MM minutes (2 digits 00-59)
|
||||
// SS seconds (2 digits 00-59)
|
||||
printf("%02d:%02d:%02d ",aTm->tm_hour,aTm->tm_min,aTm->tm_sec);
|
||||
}
|
||||
|
||||
std::string Log::GetTimestampStr()
|
||||
{
|
||||
time_t t = time(NULL);
|
||||
@@ -321,43 +219,25 @@ std::string Log::GetTimestampStr()
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
void Log::outTitle( const char * str)
|
||||
void Log::outDB( uint8 type, const char * str, ... )
|
||||
{
|
||||
if( !str )
|
||||
if(!str)
|
||||
return;
|
||||
|
||||
if(m_colored)
|
||||
SetColor(true,WHITE);
|
||||
std::string new_str(str);
|
||||
LoginDatabase.escape_string(new_str);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
|
||||
// not expected utf8 and then send as-is
|
||||
printf( str );
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
int res = vsnprintf(nnew_str, MAX_QUERY_LEN, new_str.c_str(), ap);
|
||||
va_end(ap);
|
||||
|
||||
if(m_colored)
|
||||
ResetColor(true);
|
||||
if ( (res < 0) || (!nnew_str) || (std::string(nnew_str).empty()) )
|
||||
return;
|
||||
|
||||
printf( "\n" );
|
||||
if(logfile)
|
||||
{
|
||||
fprintf(logfile, str);
|
||||
fprintf(logfile, "\n" );
|
||||
fflush(logfile);
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
void Log::outString()
|
||||
{
|
||||
if(m_includeTime)
|
||||
outTime();
|
||||
printf( "\n" );
|
||||
if(logfile)
|
||||
{
|
||||
outTimestamp(logfile);
|
||||
fprintf(logfile, "\n" );
|
||||
fflush(logfile);
|
||||
}
|
||||
fflush(stdout);
|
||||
LoginDatabase.PExecute("INSERT INTO logs (time, realm, type, string) "
|
||||
"VALUES (%u, %u, %u, '%s');", time(0), realm, type, nnew_str);
|
||||
}
|
||||
|
||||
void Log::outString( const char * str, ... )
|
||||
@@ -365,22 +245,26 @@ void Log::outString( const char * str, ... )
|
||||
if( !str )
|
||||
return;
|
||||
|
||||
if(m_colored)
|
||||
SetColor(true,m_colors[LogNormal]);
|
||||
if (m_enableLogDB)
|
||||
{
|
||||
// we don't want empty strings in the DB
|
||||
std::string s(str);
|
||||
if(s.empty() || s == " ")
|
||||
return;
|
||||
|
||||
if(m_includeTime)
|
||||
outTime();
|
||||
va_list ap2;
|
||||
va_start(ap2, str);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2);
|
||||
outDB(LOG_TYPE_STRING, nnew_str);
|
||||
va_end(ap2);
|
||||
}
|
||||
|
||||
UTF8PRINTF(stdout,str,);
|
||||
|
||||
if(m_colored)
|
||||
ResetColor(true);
|
||||
|
||||
printf( "\n" );
|
||||
if(logfile)
|
||||
{
|
||||
outTimestamp(logfile);
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
vfprintf(logfile, str, ap);
|
||||
@@ -397,21 +281,21 @@ void Log::outError( const char * err, ... )
|
||||
if( !err )
|
||||
return;
|
||||
|
||||
if(m_colored)
|
||||
SetColor(false,m_colors[LogError]);
|
||||
|
||||
if(m_includeTime)
|
||||
outTime();
|
||||
if (m_enableLogDB)
|
||||
{
|
||||
va_list ap2;
|
||||
va_start(ap2, err);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, err, ap2);
|
||||
outDB(LOG_TYPE_ERROR, nnew_str);
|
||||
va_end(ap2);
|
||||
}
|
||||
|
||||
UTF8PRINTF(stderr,err,);
|
||||
|
||||
if(m_colored)
|
||||
ResetColor(false);
|
||||
|
||||
fprintf( stderr, "\n" );
|
||||
if(logfile)
|
||||
{
|
||||
outTimestamp(logfile);
|
||||
fprintf(logfile, "ERROR:" );
|
||||
|
||||
va_list ap;
|
||||
@@ -430,22 +314,22 @@ void Log::outErrorDb( const char * err, ... )
|
||||
if( !err )
|
||||
return;
|
||||
|
||||
if(m_colored)
|
||||
SetColor(false,m_colors[LogError]);
|
||||
|
||||
if(m_includeTime)
|
||||
outTime();
|
||||
if (m_enableLogDB)
|
||||
{
|
||||
va_list ap2;
|
||||
va_start(ap2, err);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, err, ap2);
|
||||
outDB(LOG_TYPE_DBERR, nnew_str);
|
||||
va_end(ap2);
|
||||
}
|
||||
|
||||
UTF8PRINTF(stderr,err,);
|
||||
|
||||
if(m_colored)
|
||||
ResetColor(false);
|
||||
|
||||
fprintf( stderr, "\n" );
|
||||
|
||||
if(logfile)
|
||||
{
|
||||
outTimestamp(logfile);
|
||||
fprintf(logfile, "ERROR:" );
|
||||
|
||||
va_list ap;
|
||||
@@ -459,8 +343,6 @@ void Log::outErrorDb( const char * err, ... )
|
||||
|
||||
if(dberLogfile)
|
||||
{
|
||||
outTimestamp(dberLogfile);
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, err);
|
||||
vfprintf(dberLogfile, err, ap);
|
||||
@@ -477,26 +359,26 @@ void Log::outBasic( const char * str, ... )
|
||||
if( !str )
|
||||
return;
|
||||
|
||||
if( m_logLevel > 0 )
|
||||
if (m_enableLogDB && m_dbLogLevel > LOGL_NORMAL)
|
||||
{
|
||||
if(m_colored)
|
||||
SetColor(true,m_colors[LogDetails]);
|
||||
|
||||
if(m_includeTime)
|
||||
outTime();
|
||||
va_list ap2;
|
||||
va_start(ap2, str);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2);
|
||||
outDB(LOG_TYPE_BASIC, nnew_str);
|
||||
va_end(ap2);
|
||||
}
|
||||
|
||||
if( m_logLevel > LOGL_NORMAL )
|
||||
{
|
||||
UTF8PRINTF(stdout,str,);
|
||||
|
||||
if(m_colored)
|
||||
ResetColor(true);
|
||||
|
||||
printf( "\n" );
|
||||
}
|
||||
|
||||
if(logfile && m_logFileLevel > 0)
|
||||
if(logfile && m_logFileLevel > LOGL_NORMAL)
|
||||
{
|
||||
va_list ap;
|
||||
outTimestamp(logfile);
|
||||
va_start(ap, str);
|
||||
vfprintf(logfile, str, ap);
|
||||
fprintf(logfile, "\n" );
|
||||
@@ -511,26 +393,25 @@ void Log::outDetail( const char * str, ... )
|
||||
if( !str )
|
||||
return;
|
||||
|
||||
if( m_logLevel > 1 )
|
||||
if (m_enableLogDB && m_dbLogLevel >= LOGL_BASIC)
|
||||
{
|
||||
va_list ap2;
|
||||
va_start(ap2, str);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2);
|
||||
outDB(LOG_TYPE_DETAIL, nnew_str);
|
||||
va_end(ap2);
|
||||
}
|
||||
|
||||
if(m_colored)
|
||||
SetColor(true,m_colors[LogDetails]);
|
||||
|
||||
if(m_includeTime)
|
||||
outTime();
|
||||
|
||||
if( m_logLevel > LOGL_BASIC )
|
||||
{
|
||||
UTF8PRINTF(stdout,str,);
|
||||
|
||||
if(m_colored)
|
||||
ResetColor(true);
|
||||
|
||||
printf( "\n" );
|
||||
}
|
||||
if(logfile && m_logFileLevel > 1)
|
||||
if(logfile && m_logFileLevel > LOGL_BASIC)
|
||||
{
|
||||
va_list ap;
|
||||
outTimestamp(logfile);
|
||||
va_start(ap, str);
|
||||
vfprintf(logfile, str, ap);
|
||||
fprintf(logfile, "\n" );
|
||||
@@ -545,17 +426,11 @@ void Log::outDebugInLine( const char * str, ... )
|
||||
{
|
||||
if( !str )
|
||||
return;
|
||||
if( m_logLevel > 2 )
|
||||
if( m_logLevel > LOGL_DETAIL )
|
||||
{
|
||||
if(m_colored)
|
||||
SetColor(true,m_colors[LogDebug]);
|
||||
|
||||
UTF8PRINTF(stdout,str,);
|
||||
|
||||
if(m_colored)
|
||||
ResetColor(true);
|
||||
}
|
||||
if(logfile && m_logFileLevel > 2)
|
||||
if(logfile && m_logFileLevel > LOGL_DETAIL)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
@@ -568,25 +443,25 @@ void Log::outDebug( const char * str, ... )
|
||||
{
|
||||
if( !str )
|
||||
return;
|
||||
if( m_logLevel > 2 )
|
||||
|
||||
if (m_enableLogDB && m_dbLogLevel >= LOGL_DETAIL)
|
||||
{
|
||||
if(m_colored)
|
||||
SetColor(true,m_colors[LogDebug]);
|
||||
|
||||
if(m_includeTime)
|
||||
outTime();
|
||||
va_list ap2;
|
||||
va_start(ap2, str);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2);
|
||||
outDB(LOG_TYPE_DEBUG, nnew_str);
|
||||
va_end(ap2);
|
||||
}
|
||||
|
||||
if( m_logLevel > LOGL_DETAIL )
|
||||
{
|
||||
UTF8PRINTF(stdout,str,);
|
||||
|
||||
if(m_colored)
|
||||
ResetColor(true);
|
||||
|
||||
printf( "\n" );
|
||||
}
|
||||
if(logfile && m_logFileLevel > 2)
|
||||
if(logfile && m_logFileLevel > LOGL_DETAIL)
|
||||
{
|
||||
outTimestamp(logfile);
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
vfprintf(logfile, str, ap);
|
||||
@@ -603,25 +478,26 @@ void Log::outCommand( uint32 account, const char * str, ... )
|
||||
if( !str )
|
||||
return;
|
||||
|
||||
if( m_logLevel > 1 )
|
||||
// TODO: support accountid
|
||||
if (m_enableLogDB && m_dbGM)
|
||||
{
|
||||
if(m_colored)
|
||||
SetColor(true,m_colors[LogDetails]);
|
||||
|
||||
if(m_includeTime)
|
||||
outTime();
|
||||
va_list ap2;
|
||||
va_start(ap2, str);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2);
|
||||
outDB(LOG_TYPE_GM, nnew_str);
|
||||
va_end(ap2);
|
||||
}
|
||||
|
||||
if( m_logLevel > LOGL_NORMAL )
|
||||
{
|
||||
UTF8PRINTF(stdout,str,);
|
||||
|
||||
if(m_colored)
|
||||
ResetColor(true);
|
||||
|
||||
printf( "\n" );
|
||||
}
|
||||
if(logfile && m_logFileLevel > 1)
|
||||
if(logfile && m_logFileLevel > LOGL_NORMAL)
|
||||
{
|
||||
va_list ap;
|
||||
outTimestamp(logfile);
|
||||
va_start(ap, str);
|
||||
vfprintf(logfile, str, ap);
|
||||
fprintf(logfile, "\n" );
|
||||
@@ -634,7 +510,6 @@ void Log::outCommand( uint32 account, const char * str, ... )
|
||||
if (FILE* per_file = openGmlogPerAccount (account))
|
||||
{
|
||||
va_list ap;
|
||||
outTimestamp(per_file);
|
||||
va_start(ap, str);
|
||||
vfprintf(per_file, str, ap);
|
||||
fprintf(per_file, "\n" );
|
||||
@@ -645,7 +520,6 @@ void Log::outCommand( uint32 account, const char * str, ... )
|
||||
else if (gmLogfile)
|
||||
{
|
||||
va_list ap;
|
||||
outTimestamp(gmLogfile);
|
||||
va_start(ap, str);
|
||||
vfprintf(gmLogfile, str, ap);
|
||||
fprintf(gmLogfile, "\n" );
|
||||
@@ -658,14 +532,22 @@ void Log::outCommand( uint32 account, const char * str, ... )
|
||||
|
||||
void Log::outChar(const char * str, ... )
|
||||
{
|
||||
|
||||
if (!str)
|
||||
return;
|
||||
|
||||
if (m_enableLogDB && m_dbChar)
|
||||
{
|
||||
va_list ap2;
|
||||
va_start(ap2, str);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2);
|
||||
outDB(LOG_TYPE_CHAR, nnew_str);
|
||||
va_end(ap2);
|
||||
}
|
||||
|
||||
if(charLogfile)
|
||||
{
|
||||
va_list ap;
|
||||
outTimestamp(charLogfile);
|
||||
va_start(ap, str);
|
||||
vfprintf(charLogfile, str, ap);
|
||||
fprintf(charLogfile, "\n" );
|
||||
@@ -683,43 +565,24 @@ void Log::outCharDump( const char * str, uint32 account_id, uint32 guid, const c
|
||||
}
|
||||
}
|
||||
|
||||
void Log::outMenu( const char * str, ... )
|
||||
void Log::outRemote( const char * str, ... )
|
||||
{
|
||||
if( !str )
|
||||
return;
|
||||
|
||||
SetColor(true,m_colors[LogNormal]);
|
||||
|
||||
if(m_includeTime)
|
||||
outTime();
|
||||
|
||||
UTF8PRINTF(stdout,str,);
|
||||
|
||||
ResetColor(true);
|
||||
|
||||
if(logfile)
|
||||
if (m_enableLogDB && m_dbRA)
|
||||
{
|
||||
outTimestamp(logfile);
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
vfprintf(logfile, str, ap);
|
||||
va_end(ap);
|
||||
|
||||
fprintf(logfile, "\n" );
|
||||
fflush(logfile);
|
||||
va_list ap2;
|
||||
va_start(ap2, str);
|
||||
char nnew_str[MAX_QUERY_LEN];
|
||||
vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2);
|
||||
outDB(LOG_TYPE_RA, nnew_str);
|
||||
va_end(ap2);
|
||||
}
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
void Log::outRALog( const char * str, ... )
|
||||
{
|
||||
if( !str )
|
||||
return;
|
||||
va_list ap;
|
||||
if (raLogfile)
|
||||
{
|
||||
outTimestamp(raLogfile);
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
vfprintf(raLogfile, str, ap);
|
||||
fprintf(raLogfile, "\n" );
|
||||
|
||||
+60
-83
@@ -26,101 +26,74 @@
|
||||
|
||||
class Config;
|
||||
|
||||
// bitmask
|
||||
enum LogFilters
|
||||
{
|
||||
LOG_FILTER_TRANSPORT_MOVES = 1,
|
||||
LOG_FILTER_CREATURE_MOVES = 2,
|
||||
LOG_FILTER_VISIBILITY_CHANGES = 4,
|
||||
LOG_FILTER_ACHIEVEMENT_UPDATES= 8
|
||||
LOG_FILTER_TRANSPORT_MOVES = 0x1,
|
||||
LOG_FILTER_CREATURE_MOVES = 0x2,
|
||||
LOG_FILTER_VISIBILITY_CHANGES = 0x4,
|
||||
LOG_FILTER_ACHIEVEMENT_UPDATES = 0x8
|
||||
};
|
||||
|
||||
enum Color
|
||||
enum LogTypes
|
||||
{
|
||||
BLACK,
|
||||
RED,
|
||||
GREEN,
|
||||
BROWN,
|
||||
BLUE,
|
||||
MAGENTA,
|
||||
CYAN,
|
||||
GREY,
|
||||
YELLOW,
|
||||
LRED,
|
||||
LGREEN,
|
||||
LBLUE,
|
||||
LMAGENTA,
|
||||
LCYAN,
|
||||
WHITE
|
||||
LOG_TYPE_STRING = 0,
|
||||
LOG_TYPE_ERROR = 1,
|
||||
LOG_TYPE_BASIC = 2,
|
||||
LOG_TYPE_DETAIL = 3,
|
||||
LOG_TYPE_DEBUG = 4,
|
||||
LOG_TYPE_CHAR = 5,
|
||||
LOG_TYPE_WORLD = 6,
|
||||
LOG_TYPE_RA = 7,
|
||||
LOG_TYPE_GM = 8,
|
||||
LOG_TYPE_PACKET = 9,
|
||||
LOG_TYPE_DBERR = 10,
|
||||
MAX_LOG_TYPES
|
||||
};
|
||||
|
||||
const int Color_count = int(WHITE)+1;
|
||||
enum LogLevel
|
||||
{
|
||||
LOGL_NORMAL = 0,
|
||||
LOGL_BASIC,
|
||||
LOGL_DETAIL,
|
||||
LOGL_DEBUG
|
||||
};
|
||||
|
||||
class Log : public Trinity::Singleton<Log, Trinity::ClassLevelLockable<Log, ZThread::FastMutex> >
|
||||
{
|
||||
friend class Trinity::OperatorNew<Log>;
|
||||
Log();
|
||||
~Log();
|
||||
|
||||
~Log()
|
||||
{
|
||||
if( logfile != NULL )
|
||||
fclose(logfile);
|
||||
logfile = NULL;
|
||||
|
||||
if( gmLogfile != NULL )
|
||||
fclose(gmLogfile);
|
||||
gmLogfile = NULL;
|
||||
|
||||
if (charLogfile != NULL)
|
||||
fclose(charLogfile);
|
||||
charLogfile = NULL;
|
||||
|
||||
if( dberLogfile != NULL )
|
||||
fclose(dberLogfile);
|
||||
dberLogfile = NULL;
|
||||
|
||||
if (raLogfile != NULL)
|
||||
fclose(raLogfile);
|
||||
raLogfile = NULL;
|
||||
}
|
||||
public:
|
||||
void Initialize();
|
||||
void InitColors(const std::string& init_str);
|
||||
void outTitle( const char * str);
|
||||
|
||||
void outDB( uint8 type, const char * str, ... ) ATTR_PRINTF(3,4);
|
||||
void outString( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
void outError( const char * err, ... ) ATTR_PRINTF(2,3);
|
||||
void outBasic( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
void outDetail( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
void outDebug( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
void outDebugInLine( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
void outErrorDb( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
void outChar( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
void outCommand( uint32 account, const char * str, ...) ATTR_PRINTF(3,4);
|
||||
void outString(); // any log level
|
||||
// any log level
|
||||
void outString( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// any log level
|
||||
void outError( const char * err, ... ) ATTR_PRINTF(2,3);
|
||||
// log level >= 1
|
||||
void outBasic( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// log level >= 2
|
||||
void outDetail( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// log level >= 3
|
||||
void outDebugInLine( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// log level >= 3
|
||||
void outDebug( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// any log level
|
||||
void outMenu( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// any log level
|
||||
void outErrorDb( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// any log level
|
||||
void outChar( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// any log level
|
||||
void outRemote( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
void outCharDump( const char * str, uint32 account_id, uint32 guid, const char * name );
|
||||
void outRALog( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
|
||||
void SetLogLevel(char * Level);
|
||||
void SetLogFileLevel(char * Level);
|
||||
void SetColor(bool stdout_stream, Color color);
|
||||
void ResetColor(bool stdout_stream);
|
||||
void outTime();
|
||||
static void outTimestamp(FILE* file);
|
||||
void SetDBLogLevel(char * Level);
|
||||
void SetRealmID(uint32 id) { realm = id; }
|
||||
|
||||
static std::string GetTimestampStr();
|
||||
uint32 getLogFilter() const { return m_logFilter; }
|
||||
bool IsOutDebug() const { return m_logLevel > 2 || (m_logFileLevel > 2 && logfile); }
|
||||
bool IsOutCharDump() const { return m_charLog_Dump; }
|
||||
bool IsIncludeTime() const { return m_includeTime; }
|
||||
|
||||
bool GetLogDB() { return m_enableLogDB; }
|
||||
bool GetLogDBLater() { return m_enableLogDBLater; }
|
||||
void SetLogDB(bool enable) { m_enableLogDB = enable; }
|
||||
void SetLogDBLater(bool value) { m_enableLogDBLater = value; }
|
||||
private:
|
||||
FILE* openLogFile(char const* configFileName,char const* configTimeStampFlag, char const* mode);
|
||||
FILE* openGmlogPerAccount(uint32 account);
|
||||
@@ -131,24 +104,28 @@ class Log : public Trinity::Singleton<Log, Trinity::ClassLevelLockable<Log, ZThr
|
||||
FILE* charLogfile;
|
||||
FILE* dberLogfile;
|
||||
|
||||
// log/console control
|
||||
uint32 m_logLevel;
|
||||
uint32 m_logFileLevel;
|
||||
bool m_colored;
|
||||
bool m_includeTime;
|
||||
Color m_colors[4];
|
||||
uint32 m_logFilter;
|
||||
|
||||
// cache values for after initilization use (like gm log per account case)
|
||||
std::string m_logsDir;
|
||||
std::string m_logsTimestamp;
|
||||
|
||||
// char log control
|
||||
bool m_charLog_Dump;
|
||||
|
||||
// gm log control
|
||||
bool m_gmlog_per_account;
|
||||
std::string m_gmlog_filename_format;
|
||||
|
||||
bool m_enableLogDBLater;
|
||||
bool m_enableLogDB;
|
||||
uint32 realm;
|
||||
|
||||
// log levels:
|
||||
// 0 minimum/string, 1 basic/error, 2 detail, 3 full/debug
|
||||
uint8 m_dbLogLevel;
|
||||
uint8 m_logLevel;
|
||||
uint8 m_logFileLevel;
|
||||
uint8 m_logFilter;
|
||||
bool m_dbChar;
|
||||
bool m_dbRA;
|
||||
bool m_dbGM;
|
||||
bool m_charLog_Dump;
|
||||
};
|
||||
|
||||
#define sLog Trinity::Singleton<Log>::Instance()
|
||||
|
||||
Reference in New Issue
Block a user