Removing ProgressBars as they are performing badly on startup.

[**************************************************] 100%
R.I.P

--HG--
branch : trunk
This commit is contained in:
leak
2010-12-22 00:12:03 +01:00
parent a45a039e73
commit 6115b0bd5f
35 changed files with 94 additions and 824 deletions
@@ -22,7 +22,6 @@
#include "CreatureEventAI.h"
#include "CreatureEventAIMgr.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "ObjectDefines.h"
#include "GridDefines.h"
#include "ConditionMgr.h"
@@ -43,19 +42,15 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 additional CreatureEventAI Texts data. DB table `creature_ai_texts` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field* fields = result->Fetch();
StringTextData temp;
@@ -119,19 +114,15 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 CreatureEventAI Summon definitions. DB table `creature_ai_summons` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field *fields = result->Fetch();
CreatureEventAI_Summon temp;
@@ -177,19 +168,15 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 CreatureEventAI scripts. DB table `creature_ai_scripts` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field *fields = result->Fetch();
CreatureEventAI_Event temp;
@@ -19,7 +19,6 @@
#include "DatabaseEnv.h"
#include "SQLStorage.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "ObjectDefines.h"
#include "GridDefines.h"
#include "GridNotifiers.h"
@@ -19,7 +19,6 @@
#include "DatabaseEnv.h"
#include "SQLStorage.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "ObjectDefines.h"
#include "GridDefines.h"
#include "GridNotifiers.h"
@@ -19,7 +19,6 @@
#include "DatabaseEnv.h"
#include "SQLStorage.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "ObjectDefines.h"
#include "GridDefines.h"
#include "GridNotifiers.h"
@@ -43,14 +42,11 @@ void SmartWaypointMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
uint32 total = 0;
WPPath* path = NULL;
@@ -59,7 +55,6 @@ void SmartWaypointMgr::LoadFromDB()
do
{
bar.step();
Field *fields = result->Fetch();
uint32 entry = fields[0].GetUInt32();
uint32 id = fields[1].GetUInt32();
@@ -109,19 +104,15 @@ void SmartAIMgr::LoadSmartAIFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field* fields = result->Fetch();
SmartScriptHolder temp;
@@ -30,7 +30,6 @@
#include "Guild.h"
#include "Language.h"
#include "Player.h"
#include "ProgressBar.h"
#include "SpellMgr.h"
#include "DisableMgr.h"
#include "ScriptMgr.h"
@@ -2099,17 +2098,13 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
if (sAchievementCriteriaStore.GetNumRows() == 0)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 achievement criteria.");
sLog.outString();
return;
}
barGoLink bar(sAchievementCriteriaStore.GetNumRows());
for (uint32 entryId = 0; entryId < sAchievementCriteriaStore.GetNumRows(); ++entryId)
{
bar.step();
AchievementCriteriaEntry const* criteria = sAchievementCriteriaStore.LookupEntry(entryId);
if (!criteria)
@@ -2132,19 +2127,15 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
if (sAchievementStore.GetNumRows() == 0)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 achievement references.");
sLog.outString();
return;
}
barGoLink bar(sAchievementStore.GetNumRows());
uint32 count = 0;
for (uint32 entryId = 0; entryId < sAchievementStore.GetNumRows(); ++entryId)
{
bar.step();
AchievementEntry const* achievement = sAchievementStore.LookupEntry(entryId);
if (!achievement || !achievement->refAchievement)
@@ -2168,19 +2159,15 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field *fields = result->Fetch();
uint32 criteria_id = fields[0].GetUInt32();
@@ -2312,17 +2299,13 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 completed achievements. DB table `character_achievement` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
do
{
bar.step();
Field *fields = result->Fetch();
uint32 achievement_id = fields[0].GetUInt32();
@@ -2352,19 +2335,15 @@ void AchievementGlobalMgr::LoadRewards()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
sLog.outString();
return;
}
uint32 count = 0;
barGoLink bar(result->GetRowCount());
do
{
bar.step();
Field *fields = result->Fetch();
uint32 entry = fields[0].GetUInt32();
@@ -2465,19 +2444,15 @@ void AchievementGlobalMgr::LoadRewardLocales()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 entry = fields[0].GetUInt32();
-5
View File
@@ -22,7 +22,6 @@
#include "Player.h"
#include "Util.h"
#include "SHA1.h"
#include "ProgressBar.h"
AddonMgr::AddonMgr()
{
@@ -40,20 +39,16 @@ void AddonMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 known addons. DB table `addons` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
Field *fields = result->Fetch();
bar.step();
std::string name = fields[0].GetString();
uint32 crc = fields[1].GetUInt32();
@@ -31,7 +31,6 @@
#include "Item.h"
#include "Language.h"
#include "Logging/Log.h"
#include "ProgressBar.h"
#include <vector>
enum eAuctionHouse
@@ -316,19 +315,15 @@ void AuctionHouseMgr::LoadAuctionItems()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field* fields = result->Fetch();
@@ -367,14 +362,11 @@ void AuctionHouseMgr::LoadAuctions()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
SQLTransaction trans = CharacterDatabase.BeginTransaction();
@@ -382,7 +374,6 @@ void AuctionHouseMgr::LoadAuctions()
{
Field* fields = result->Fetch();
bar.step();
AuctionEntry *aItem = new AuctionEntry();
if (!aItem->LoadFromDB(fields))
@@ -43,7 +43,6 @@
#include "MapManager.h"
#include "Player.h"
#include "GameEventMgr.h"
#include "ProgressBar.h"
#include "SharedDefines.h"
#include "Formulas.h"
#include "DisableMgr.h"
@@ -677,20 +676,16 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
Field *fields = result->Fetch();
bar.step();
uint32 bgTypeID_ = fields[0].GetUInt32();
if (sDisableMgr.IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeID_, NULL))
@@ -1120,20 +1115,16 @@ void BattlegroundMgr::LoadBattleMastersEntry()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
++count;
bar.step();
Field *fields = result->Fetch();
@@ -23,7 +23,6 @@
#include "SpellMgr.h"
#include "GameEventMgr.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "InstanceScript.h"
#include "ConditionMgr.h"
#include "ScriptMgr.h"
@@ -382,19 +381,15 @@ void ConditionMgr::LoadConditions(bool isReload)
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 conditions. DB table `groups` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field *fields = result->Fetch();
@@ -16,7 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ProgressBar.h"
#include "SpellMgr.h"
#include "ObjectMgr.h"
#include "DisableMgr.h"
@@ -50,19 +49,15 @@ void DisableMgr::LoadDisables()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 disables. DB table `disables` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
Field* fields;
do
{
bar.step();
fields = result->Fetch();
DisableType type = DisableType(fields[0].GetUInt32());
if (type >= MAX_DISABLE_TYPES)
@@ -194,18 +189,14 @@ void DisableMgr::CheckQuestDisables()
uint32 count = m_DisableMap[DISABLE_TYPE_QUEST].size();
if (!count)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Checked 0 quest disables.");
sLog.outString();
return;
}
barGoLink bar(count);
// check only quests, rest already done at startup
for (DisableTypeMap::iterator itr = m_DisableMap[DISABLE_TYPE_QUEST].begin(); itr != m_DisableMap[DISABLE_TYPE_QUEST].end();)
{
bar.step();
const uint32 entry = itr->first;
if (!sObjectMgr.GetQuestTemplate(entry))
{
+94 -98
View File
@@ -19,7 +19,6 @@
#include "DBCStores.h"
#include "Logging/Log.h"
#include "ProgressBar.h"
#include "SharedDefines.h"
#include "SpellMgr.h"
@@ -201,7 +200,7 @@ static bool LoadDBC_assert_print(uint32 fsize,uint32 rsize, const std::string& f
}
template<class T>
inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList& errlist, DBCStorage<T>& storage, const std::string& dbc_path, const std::string& filename, const std::string * custom_entries = NULL, const std::string * idname = NULL)
inline void LoadDBC(uint32& availableDbcLocales, StoreProblemList& errlist, DBCStorage<T>& storage, const std::string& dbc_path, const std::string& filename, const std::string * custom_entries = NULL, const std::string * idname = NULL)
{
// compatibility format and C++ structure sizes
ASSERT(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T) || LoadDBC_assert_print(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()),sizeof(T),filename));
@@ -213,7 +212,6 @@ inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList
if (storage.Load(dbc_filename.c_str(), sql))
{
bar.step();
for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
{
if (!(availableDbcLocales & (1 << i)))
@@ -250,12 +248,10 @@ void LoadDBCStores(const std::string& dataPath)
const uint32 DBCFilesCount = 90;
barGoLink bar(DBCFilesCount);
StoreProblemList bad_dbc_files;
uint32 availableDbcLocales = 0xFFFFFFFF;
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sAreaStore, dbcPath, "AreaTable.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sAreaStore, dbcPath, "AreaTable.dbc");
// must be after sAreaStore loading
for (uint32 i = 0; i < sAreaStore.GetNumRows(); ++i) // areaflag numbered from 0
@@ -271,31 +267,31 @@ void LoadDBCStores(const std::string& dataPath)
}
}
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAchievementStore, dbcPath,"Achievement.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAchievementCriteriaStore, dbcPath,"Achievement_Criteria.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaTriggerStore, dbcPath,"AreaTrigger.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaGroupStore, dbcPath,"AreaGroup.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaPOIStore, dbcPath,"AreaPOI.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAuctionHouseStore, dbcPath,"AuctionHouse.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBankBagSlotPricesStore, dbcPath,"BankBagSlotPrices.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBattlemasterListStore, dbcPath,"BattlemasterList.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBarberShopStyleStore, dbcPath,"BarberShopStyle.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCharStartOutfitStore, dbcPath,"CharStartOutfit.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCharTitlesStore, dbcPath,"CharTitles.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChatChannelsStore, dbcPath,"ChatChannels.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrClassesStore, dbcPath,"ChrClasses.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrRacesStore, dbcPath,"ChrRaces.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCinematicSequencesStore, dbcPath,"CinematicSequences.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureDisplayInfoStore, dbcPath,"CreatureDisplayInfo.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureFamilyStore, dbcPath,"CreatureFamily.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureSpellDataStore, dbcPath,"CreatureSpellData.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureTypeStore, dbcPath,"CreatureType.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCurrencyTypesStore, dbcPath,"CurrencyTypes.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sDurabilityCostsStore, dbcPath,"DurabilityCosts.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sDurabilityQualityStore, dbcPath,"DurabilityQuality.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sEmotesStore, dbcPath,"Emotes.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sEmotesTextStore, dbcPath,"EmotesText.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sFactionStore, dbcPath,"Faction.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sAchievementStore, dbcPath,"Achievement.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sAchievementCriteriaStore, dbcPath,"Achievement_Criteria.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sAreaTriggerStore, dbcPath,"AreaTrigger.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sAreaGroupStore, dbcPath,"AreaGroup.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sAreaPOIStore, dbcPath,"AreaPOI.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sAuctionHouseStore, dbcPath,"AuctionHouse.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sBankBagSlotPricesStore, dbcPath,"BankBagSlotPrices.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sBattlemasterListStore, dbcPath,"BattlemasterList.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sBarberShopStyleStore, dbcPath,"BarberShopStyle.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sCharStartOutfitStore, dbcPath,"CharStartOutfit.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sCharTitlesStore, dbcPath,"CharTitles.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sChatChannelsStore, dbcPath,"ChatChannels.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sChrClassesStore, dbcPath,"ChrClasses.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sChrRacesStore, dbcPath,"ChrRaces.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sCinematicSequencesStore, dbcPath,"CinematicSequences.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sCreatureDisplayInfoStore, dbcPath,"CreatureDisplayInfo.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sCreatureFamilyStore, dbcPath,"CreatureFamily.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sCreatureSpellDataStore, dbcPath,"CreatureSpellData.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sCreatureTypeStore, dbcPath,"CreatureType.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sCurrencyTypesStore, dbcPath,"CurrencyTypes.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sDurabilityCostsStore, dbcPath,"DurabilityCosts.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sDurabilityQualityStore, dbcPath,"DurabilityQuality.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sEmotesStore, dbcPath,"Emotes.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sEmotesTextStore, dbcPath,"EmotesText.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sFactionStore, dbcPath,"Faction.dbc");
for (uint32 i=0; i<sFactionStore.GetNumRows(); ++i)
{
FactionEntry const * faction = sFactionStore.LookupEntry(i);
@@ -306,8 +302,8 @@ void LoadDBCStores(const std::string& dataPath)
}
}
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sFactionTemplateStore, dbcPath,"FactionTemplate.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGameObjectDisplayInfoStore, dbcPath,"GameObjectDisplayInfo.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sFactionTemplateStore, dbcPath,"FactionTemplate.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGameObjectDisplayInfoStore, dbcPath,"GameObjectDisplayInfo.dbc");
for (uint32 i = 0; i < sGameObjectDisplayInfoStore.GetNumRows(); ++i)
{
if (GameObjectDisplayInfoEntry const * info = sGameObjectDisplayInfoStore.LookupEntry(i))
@@ -321,63 +317,63 @@ void LoadDBCStores(const std::string& dataPath)
}
}
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGemPropertiesStore, dbcPath,"GemProperties.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGlyphPropertiesStore, dbcPath,"GlyphProperties.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGlyphSlotStore, dbcPath,"GlyphSlot.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGemPropertiesStore, dbcPath,"GemProperties.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGlyphPropertiesStore, dbcPath,"GlyphProperties.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGlyphSlotStore, dbcPath,"GlyphSlot.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtBarberShopCostBaseStore,dbcPath,"gtBarberShopCostBase.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtCombatRatingsStore, dbcPath,"gtCombatRatings.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGtBarberShopCostBaseStore,dbcPath,"gtBarberShopCostBase.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGtCombatRatingsStore, dbcPath,"gtCombatRatings.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtChanceToMeleeCritBaseStore, dbcPath,"gtChanceToMeleeCritBase.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtChanceToMeleeCritStore, dbcPath,"gtChanceToMeleeCrit.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGtChanceToMeleeCritBaseStore, dbcPath,"gtChanceToMeleeCritBase.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGtChanceToMeleeCritStore, dbcPath,"gtChanceToMeleeCrit.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtChanceToSpellCritBaseStore, dbcPath,"gtChanceToSpellCritBase.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtChanceToSpellCritStore, dbcPath,"gtChanceToSpellCrit.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGtChanceToSpellCritBaseStore, dbcPath,"gtChanceToSpellCritBase.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGtChanceToSpellCritStore, dbcPath,"gtChanceToSpellCrit.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTRegenHPStore, dbcPath,"gtOCTRegenHP.dbc");
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTRegenMPStore, dbcPath,"gtOCTRegenMP.dbc"); -- not used currently
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtRegenHPPerSptStore, dbcPath,"gtRegenHPPerSpt.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtRegenMPPerSptStore, dbcPath,"gtRegenMPPerSpt.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sHolidaysStore, dbcPath,"Holidays.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemStore, dbcPath,"Item.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemBagFamilyStore, dbcPath,"ItemBagFamily.dbc");
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDisplayInfoStore, dbcPath,"ItemDisplayInfo.dbc"); -- not used currently
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemCondExtCostsStore, dbcPath,"ItemCondExtCosts.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemExtendedCostStore, dbcPath,"ItemExtendedCost.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemLimitCategoryStore, dbcPath,"ItemLimitCategory.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemRandomPropertiesStore,dbcPath,"ItemRandomProperties.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemRandomSuffixStore, dbcPath,"ItemRandomSuffix.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemSetStore, dbcPath,"ItemSet.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sLFGDungeonStore, dbcPath,"LFGDungeons.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sLockStore, dbcPath,"Lock.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMailTemplateStore, dbcPath,"MailTemplate.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMapStore, dbcPath,"Map.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGtOCTRegenHPStore, dbcPath,"gtOCTRegenHP.dbc");
//LoadDBC(availableDbcLocales,bad_dbc_files,sGtOCTRegenMPStore, dbcPath,"gtOCTRegenMP.dbc"); -- not used currently
LoadDBC(availableDbcLocales,bad_dbc_files,sGtRegenHPPerSptStore, dbcPath,"gtRegenHPPerSpt.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sGtRegenMPPerSptStore, dbcPath,"gtRegenMPPerSpt.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sHolidaysStore, dbcPath,"Holidays.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sItemStore, dbcPath,"Item.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sItemBagFamilyStore, dbcPath,"ItemBagFamily.dbc");
//LoadDBC(availableDbcLocales,bad_dbc_files,sItemDisplayInfoStore, dbcPath,"ItemDisplayInfo.dbc"); -- not used currently
//LoadDBC(availableDbcLocales,bad_dbc_files,sItemCondExtCostsStore, dbcPath,"ItemCondExtCosts.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sItemExtendedCostStore, dbcPath,"ItemExtendedCost.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sItemLimitCategoryStore, dbcPath,"ItemLimitCategory.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sItemRandomPropertiesStore,dbcPath,"ItemRandomProperties.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sItemRandomSuffixStore, dbcPath,"ItemRandomSuffix.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sItemSetStore, dbcPath,"ItemSet.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sLFGDungeonStore, dbcPath,"LFGDungeons.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sLockStore, dbcPath,"Lock.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sMailTemplateStore, dbcPath,"MailTemplate.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sMapStore, dbcPath,"Map.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMapDifficultyStore, dbcPath,"MapDifficulty.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sMapDifficultyStore, dbcPath,"MapDifficulty.dbc");
// fill data
for (uint32 i = 1; i < sMapDifficultyStore.GetNumRows(); ++i)
if (MapDifficultyEntry const* entry = sMapDifficultyStore.LookupEntry(i))
sMapDifficultyMap[MAKE_PAIR32(entry->MapId,entry->Difficulty)] = MapDifficulty(entry->resetTime,entry->maxPlayers,strlen(entry->areaTriggerText)>0);
sMapDifficultyStore.Clear();
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMovieStore, dbcPath,"Movie.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sOverrideSpellDataStore, dbcPath,"OverrideSpellData.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestSortStore, dbcPath,"QuestSort.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sPvPDifficultyStore, dbcPath,"PvpDifficulty.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sMovieStore, dbcPath,"Movie.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sOverrideSpellDataStore, dbcPath,"OverrideSpellData.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sQuestSortStore, dbcPath,"QuestSort.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sPvPDifficultyStore, dbcPath,"PvpDifficulty.dbc");
for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
if (entry->bracketId > MAX_BATTLEGROUND_BRACKETS)
ASSERT(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestXPStore, dbcPath,"QuestXP.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestFactionRewardStore, dbcPath,"QuestFactionReward.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sRandomPropertiesPointsStore, dbcPath,"RandPropPoints.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sScalingStatDistributionStore, dbcPath,"ScalingStatDistribution.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sScalingStatValuesStore, dbcPath,"ScalingStatValues.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineStore, dbcPath,"SkillLine.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineAbilityStore, dbcPath,"SkillLineAbility.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSoundEntriesStore, dbcPath,"SoundEntries.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellStore, dbcPath,"Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);
LoadDBC(availableDbcLocales,bad_dbc_files,sQuestXPStore, dbcPath,"QuestXP.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sQuestFactionRewardStore, dbcPath,"QuestFactionReward.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sRandomPropertiesPointsStore, dbcPath,"RandPropPoints.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sScalingStatDistributionStore, dbcPath,"ScalingStatDistribution.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sScalingStatValuesStore, dbcPath,"ScalingStatValues.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSkillLineStore, dbcPath,"SkillLine.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSkillLineAbilityStore, dbcPath,"SkillLineAbility.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSoundEntriesStore, dbcPath,"SoundEntries.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellStore, dbcPath,"Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
{
SpellEntry const * spell = sSpellStore.LookupEntry(i);
@@ -415,19 +411,19 @@ void LoadDBCStores(const std::string& dataPath)
}
}
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellCastTimesStore, dbcPath,"SpellCastTimes.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellDifficultyStore, dbcPath,"SpellDifficulty.dbc", &CustomSpellDifficultyfmt, &CustomSpellDifficultyIndex);
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellDurationStore, dbcPath,"SpellDuration.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellFocusObjectStore, dbcPath,"SpellFocusObject.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellItemEnchantmentStore,dbcPath,"SpellItemEnchantment.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellItemEnchantmentConditionStore,dbcPath,"SpellItemEnchantmentCondition.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellRadiusStore, dbcPath,"SpellRadius.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellRangeStore, dbcPath,"SpellRange.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellRuneCostStore, dbcPath,"SpellRuneCost.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellShapeshiftStore, dbcPath,"SpellShapeshiftForm.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sStableSlotPricesStore, dbcPath,"StableSlotPrices.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSummonPropertiesStore, dbcPath,"SummonProperties.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTalentStore, dbcPath,"Talent.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellCastTimesStore, dbcPath,"SpellCastTimes.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellDifficultyStore, dbcPath,"SpellDifficulty.dbc", &CustomSpellDifficultyfmt, &CustomSpellDifficultyIndex);
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellDurationStore, dbcPath,"SpellDuration.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellFocusObjectStore, dbcPath,"SpellFocusObject.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellItemEnchantmentStore,dbcPath,"SpellItemEnchantment.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellItemEnchantmentConditionStore,dbcPath,"SpellItemEnchantmentCondition.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellRadiusStore, dbcPath,"SpellRadius.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellRangeStore, dbcPath,"SpellRange.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellRuneCostStore, dbcPath,"SpellRuneCost.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSpellShapeshiftStore, dbcPath,"SpellShapeshiftForm.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sStableSlotPricesStore, dbcPath,"StableSlotPrices.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sSummonPropertiesStore, dbcPath,"SummonProperties.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sTalentStore, dbcPath,"Talent.dbc");
// Create Spelldifficulty searcher
for (uint32 i = 0; i < sSpellDifficultyStore.GetNumRows(); ++i)
@@ -466,7 +462,7 @@ void LoadDBCStores(const std::string& dataPath)
sTalentSpellPosMap[talentInfo->RankID[j]] = TalentSpellPos(i,j);
}
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTalentTabStore, dbcPath,"TalentTab.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sTalentTabStore, dbcPath,"TalentTab.dbc");
// prepare fast data access to bit pos of talent ranks for use at inspecting
{
@@ -489,16 +485,16 @@ void LoadDBCStores(const std::string& dataPath)
}
}
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTaxiNodesStore, dbcPath,"TaxiNodes.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sTaxiNodesStore, dbcPath,"TaxiNodes.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTaxiPathStore, dbcPath,"TaxiPath.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sTaxiPathStore, dbcPath,"TaxiPath.dbc");
for (uint32 i = 1; i < sTaxiPathStore.GetNumRows(); ++i)
if (TaxiPathEntry const* entry = sTaxiPathStore.LookupEntry(i))
sTaxiPathSetBySource[entry->from][entry->to] = TaxiPathBySourceAndDestination(entry->ID,entry->price);
uint32 pathCount = sTaxiPathStore.GetNumRows();
//## TaxiPathNode.dbc ## Loaded only for initialization different structures
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTaxiPathNodeStore, dbcPath,"TaxiPathNode.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sTaxiPathNodeStore, dbcPath,"TaxiPathNode.dbc");
// Calculate path nodes count
std::vector<uint32> pathLength;
pathLength.resize(pathCount); // 0 and some other indexes not used
@@ -579,10 +575,10 @@ void LoadDBCStores(const std::string& dataPath)
}
}
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTotemCategoryStore, dbcPath,"TotemCategory.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sVehicleStore, dbcPath,"Vehicle.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sVehicleSeatStore, dbcPath,"VehicleSeat.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWMOAreaTableStore, dbcPath,"WMOAreaTable.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sTotemCategoryStore, dbcPath,"TotemCategory.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sVehicleStore, dbcPath,"Vehicle.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sVehicleSeatStore, dbcPath,"VehicleSeat.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sWMOAreaTableStore, dbcPath,"WMOAreaTable.dbc");
for(uint32 i = 0; i < sWMOAreaTableStore.GetNumRows(); ++i)
{
if(WMOAreaTableEntry const* entry = sWMOAreaTableStore.LookupEntry(i))
@@ -590,9 +586,9 @@ void LoadDBCStores(const std::string& dataPath)
sWMOAreaInfoByTripple.insert(WMOAreaInfoByTripple::value_type(WMOAreaTableTripple(entry->rootId, entry->adtId, entry->groupId), entry));
}
}
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldMapAreaStore, dbcPath,"WorldMapArea.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldMapOverlayStore, dbcPath,"WorldMapOverlay.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldSafeLocsStore, dbcPath,"WorldSafeLocs.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sWorldMapAreaStore, dbcPath,"WorldMapArea.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sWorldMapOverlayStore, dbcPath,"WorldMapOverlay.dbc");
LoadDBC(availableDbcLocales,bad_dbc_files,sWorldSafeLocsStore, dbcPath,"WorldSafeLocs.dbc");
// error checks
if (bad_dbc_files.size() >= DBCFilesCount)
@@ -21,7 +21,6 @@
#include "DisableMgr.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "SocialMgr.h"
#include "LFGMgr.h"
#include "LFGScripts.h"
@@ -83,21 +82,17 @@ void LFGMgr::LoadDungeonEncounters()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString();
sLog.outErrorDb(">> Loaded 0 dungeon encounter lfg associations. DB table `lfg_dungeon_encounters` is empty!");
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
Field* fields = NULL;
do
{
bar.step();
fields = result->Fetch();
uint32 achievementId = fields[0].GetUInt32();
uint32 dungeonId = fields[1].GetUInt32();
@@ -145,20 +140,16 @@ void LFGMgr::LoadRewards()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
Field* fields = NULL;
do
{
bar.step();
fields = result->Fetch();
uint32 dungeonId = fields[0].GetUInt32();
uint32 maxLevel = fields[1].GetUInt8();
@@ -19,7 +19,6 @@
#include "Creature.h"
#include "CreatureGroups.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "CreatureAI.h"
@@ -81,8 +80,6 @@ void CreatureGroupManager::LoadCreatureFormations()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");
sLog.outString();
return;
@@ -103,7 +100,6 @@ void CreatureGroupManager::LoadCreatureFormations()
} while (guidResult->NextRow());
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
Field *fields;
FormationInfo *group_member;
@@ -112,7 +108,6 @@ void CreatureGroupManager::LoadCreatureFormations()
{
fields = result->Fetch();
bar.step();
//Load group member data
group_member = new FormationInfo;
group_member->leaderGUID = fields[0].GetUInt32();
@@ -22,7 +22,6 @@
#include "DatabaseEnv.h"
#include "Log.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include <list>
#include <vector>
#include "Util.h"
@@ -55,12 +54,10 @@ void LoadRandomEnchantmentsTable()
if (result)
{
uint32 count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 entry = fields[0].GetUInt32();
uint32 ench = fields[1].GetUInt32();
@@ -24,7 +24,6 @@
#include "ScriptMgr.h"
#include "WorldPacket.h"
#include "DBCStores.h"
#include "ProgressBar.h"
#include "World.h"
#include "GameObjectAI.h"
@@ -36,19 +35,15 @@ void MapManager::LoadTransports()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 transports. DB table `transports` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field *fields = result->Fetch();
uint32 lowguid = fields[0].GetUInt32();
@@ -142,19 +137,15 @@ void MapManager::LoadTransportNPCs()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field *fields = result->Fetch();
uint32 guid = fields[0].GetUInt32();
uint32 entry = fields[1].GetUInt32();
-65
View File
@@ -21,7 +21,6 @@
#include "ObjectMgr.h"
#include "WorldPacket.h"
#include "PoolMgr.h"
#include "ProgressBar.h"
#include "Language.h"
#include "Log.h"
#include "MapManager.h"
@@ -199,8 +198,6 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT MAX(entry) FROM game_event");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 weather definitions. DB table `game_event` is empty.");
sLog.outString();
return;
@@ -222,13 +219,11 @@ void GameEventMgr::LoadFromDB()
}
uint32 count = 0;
barGoLink bar(result->GetRowCount());
do
{
++count;
Field *fields = result->Fetch();
bar.step();
uint16 event_id = fields[0].GetUInt16();
if (event_id == 0)
@@ -281,20 +276,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint16 event_id = fields[0].GetUInt16();
@@ -331,20 +322,16 @@ void GameEventMgr::LoadFromDB()
result = WorldDatabase.Query("SELECT event_id, prerequisite_event FROM game_event_prerequisite");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint16 event_id = fields[0].GetUInt16();
@@ -390,20 +377,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 guid = fields[0].GetUInt32();
int16 event_id = fields[1].GetInt16();
@@ -438,20 +421,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 guid = fields[0].GetUInt32();
int16 event_id = fields[1].GetInt16();
@@ -488,20 +467,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 guid = fields[0].GetUInt32();
uint16 event_id = fields[1].GetUInt16();
@@ -547,20 +522,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 id = fields[0].GetUInt32();
uint32 quest = fields[1].GetUInt32();
uint16 event_id = fields[2].GetUInt16();
@@ -592,20 +563,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 id = fields[0].GetUInt32();
uint32 quest = fields[1].GetUInt32();
uint16 event_id = fields[2].GetUInt16();
@@ -636,20 +603,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 quest = fields[0].GetUInt32();
uint16 event_id = fields[1].GetUInt16();
uint32 condition = fields[2].GetUInt32();
@@ -682,20 +645,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint16 event_id = fields[0].GetUInt16();
uint32 condition = fields[1].GetUInt32();
@@ -728,20 +687,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint16 event_id = fields[0].GetUInt16();
uint32 condition = fields[1].GetUInt32();
@@ -782,20 +737,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 guid = fields[0].GetUInt32();
uint16 event_id = fields[1].GetUInt16();
uint32 npcflag = fields[2].GetUInt32();
@@ -828,20 +779,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint16 event_id = fields[0].GetUInt16();
if (event_id >= mGameEventVendors.size())
@@ -896,20 +843,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 npc gossip textids in game events. DB table `game_event_npc_gossip` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 guid = fields[0].GetUInt32();
uint16 event_id = fields[1].GetUInt16();
uint32 textid = fields[2].GetUInt32();
@@ -943,20 +886,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 battleground holidays in game events. DB table `game_event_condition` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint16 event_id = fields[0].GetUInt16();
@@ -991,20 +930,16 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
sLog.outString();
}
else
{
count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 entry = fields[0].GetUInt32();
int16 event_id = fields[1].GetInt16();
File diff suppressed because it is too large Load Diff
@@ -35,7 +35,6 @@
#include "World.h"
#include "Group.h"
#include "InstanceScript.h"
#include "ProgressBar.h"
uint16 InstanceSaveManager::ResetTimeDelay[] = {3600, 900, 300, 60};
-5
View File
@@ -19,7 +19,6 @@
#include "LootMgr.h"
#include "Log.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "World.h"
#include "Util.h"
#include "SharedDefines.h"
@@ -103,18 +102,14 @@ uint32 LootStore::LoadLootTable()
if (!result)
{
barGoLink bar(1);
bar.step();
return 0;
}
uint32 count = 0;
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 entry = fields[0].GetUInt32();
uint32 item = fields[1].GetUInt32();
@@ -19,7 +19,6 @@
#include "DatabaseEnv.h"
#include "GridDefines.h"
#include "WaypointManager.h"
#include "ProgressBar.h"
#include "MapManager.h"
void WaypointStore::Free()
@@ -42,14 +41,11 @@ void WaypointStore::Load()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 waypoints. DB table `waypoint_data` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
Field *fields;
uint32 last_id = 0;
@@ -59,7 +55,6 @@ void WaypointStore::Load()
{
fields = result->Fetch();
uint32 id = fields[0].GetUInt32();
bar.step();
count++;
WaypointData *wp = new WaypointData;
@@ -18,7 +18,6 @@
#include "OutdoorPvPMgr.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ProgressBar.h"
#include "DisableMgr.h"
#include "ScriptMgr.h"
@@ -47,21 +46,17 @@ void OutdoorPvPMgr::InitOutdoorPvP()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
uint32 typeId = 0;
do
{
Field *fields = result->Fetch();
bar.step();
typeId = fields[0].GetUInt32();
-19
View File
@@ -18,7 +18,6 @@
#include "PoolMgr.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "Log.h"
#include "MapManager.h"
@@ -571,13 +570,11 @@ void PoolMgr::LoadFromDB()
uint32 count = 0;
barGoLink bar(result->GetRowCount());
do
{
++count;
Field *fields = result->Fetch();
bar.step();
uint32 pool_id = fields[0].GetUInt32();
@@ -602,20 +599,16 @@ void PoolMgr::LoadFromDB()
count = 0;
if (!result)
{
barGoLink bar2(1);
bar2.step();
sLog.outString(">> Loaded 0 creatures in pools. DB table `pool_creature` is empty.");
sLog.outString();
}
else
{
barGoLink bar2(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar2.step();
uint32 guid = fields[0].GetUInt32();
uint32 pool_id = fields[1].GetUInt32();
@@ -666,20 +659,16 @@ void PoolMgr::LoadFromDB()
count = 0;
if (!result)
{
barGoLink bar2(1);
bar2.step();
sLog.outString(">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty.");
sLog.outString();
}
else
{
barGoLink bar2(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar2.step();
uint32 guid = fields[0].GetUInt32();
uint32 pool_id = fields[1].GetUInt32();
@@ -738,20 +727,16 @@ void PoolMgr::LoadFromDB()
count = 0;
if (!result)
{
barGoLink bar2(1);
bar2.step();
sLog.outString(">> Loaded 0 pools in pools");
sLog.outString();
}
else
{
barGoLink bar2(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar2.step();
uint32 child_pool_id = fields[0].GetUInt32();
uint32 mother_pool_id = fields[1].GetUInt32();
@@ -832,14 +817,11 @@ void PoolMgr::LoadQuestPools()
uint32 count = 0;
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 quests in pools");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
PooledQuestRelationBounds creBounds;
PooledQuestRelationBounds goBounds;
@@ -854,7 +836,6 @@ void PoolMgr::LoadQuestPools()
do
{
bar.step();
Field* fields = result->Fetch();
-3
View File
@@ -22,7 +22,6 @@
#include "DBCStores.h"
#include "ObjectMgr.h"
#include "OutdoorPvPMgr.h"
#include "ProgressBar.h"
#include "ScriptLoader.h"
#include "ScriptSystem.h"
#include "Transport.h"
@@ -183,8 +182,6 @@ void ScriptMgr::Initialize()
LoadDatabase();
sLog.outString("Loading C++ scripts");
barGoLink bar(1);
bar.step();
FillSpellSummary();
AddScripts();
@@ -18,7 +18,6 @@
#include "ScriptPCH.h"
#include "ScriptSystem.h"
#include "ProgressBar.h"
#include "ObjectMgr.h"
#include "DatabaseEnv.h"
@@ -63,19 +62,15 @@ void SystemMgr::LoadScriptTexts()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 uiCount = 0;
do
{
bar.step();
Field* pFields = result->Fetch();
StringTextData pTemp;
@@ -128,19 +123,15 @@ void SystemMgr::LoadScriptTextsCustom()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 uiCount = 0;
do
{
bar.step();
Field* pFields = result->Fetch();
StringTextData pTemp;
@@ -202,19 +193,15 @@ void SystemMgr::LoadScriptWaypoints()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field* pFields = result->Fetch();
ScriptPointMove pTemp;
@@ -18,7 +18,6 @@
#include "DatabaseEnv.h"
#include "Log.h"
#include "ProgressBar.h"
#include "World.h"
#include "Util.h"
#include "SkillDiscovery.h"
@@ -55,14 +54,11 @@ void LoadSkillDiscoveryTable()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
std::ostringstream ssNonDiscoverableEntries;
@@ -71,7 +67,6 @@ void LoadSkillDiscoveryTable()
do
{
Field *fields = result->Fetch();
bar.step();
uint32 spellId = fields[0].GetUInt32();
int32 reqSkillOrSpell = fields[1].GetInt32();
@@ -19,7 +19,6 @@
#include "SkillExtraItems.h"
#include "DatabaseEnv.h"
#include "Log.h"
#include "ProgressBar.h"
#include "Player.h"
#include <map>
@@ -61,20 +60,16 @@ void LoadSkillExtraItemTable()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
Field *fields = result->Fetch();
bar.step();
uint32 spellId = fields[0].GetUInt32();
-67
View File
@@ -20,7 +20,6 @@
#include "ObjectMgr.h"
#include "SpellAuras.h"
#include "SpellAuraDefines.h"
#include "ProgressBar.h"
#include "DBCStores.h"
#include "World.h"
#include "Chat.h"
@@ -1123,21 +1122,17 @@ void SpellMgr::LoadSpellTargetPositions()
QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM spell_target_position");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
Field *fields = result->Fetch();
bar.step();
uint32 Spell_ID = fields[0].GetUInt32();
@@ -1268,20 +1263,16 @@ void SpellMgr::LoadSpellProcEvents()
QueryResult result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded %u spell proc event conditions", count);
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 customProc = 0;
do
{
Field *fields = result->Fetch();
bar.step();
uint32 entry = fields[0].GetUInt32();
@@ -1336,18 +1327,14 @@ void SpellMgr::LoadSpellBonusess()
QueryResult result = WorldDatabase.Query("SELECT entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus FROM spell_bonus_data");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded %u spell bonus data", count);
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 entry = fields[0].GetUInt32();
const SpellEntry *spell = sSpellStore.LookupEntry(entry);
@@ -1515,16 +1502,13 @@ void SpellMgr::LoadSpellGroups()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString();
sLog.outString(">> Loaded %u spell group definitions", count);
return;
}
barGoLink bar(result->GetRowCount());
std::set<uint32> groups;
@@ -1532,7 +1516,6 @@ void SpellMgr::LoadSpellGroups()
{
Field *fields = result->Fetch();
bar.step();
uint32 group_id = fields[0].GetUInt32();
if (group_id <= SPELL_GROUP_DB_RANGE_MIN && group_id >= SPELL_GROUP_CORE_RANGE_MAX)
@@ -1606,22 +1589,18 @@ void SpellMgr::LoadSpellGroupStackRules()
QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 spell group stack rules");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 group_id = fields[0].GetUInt32();
uint8 stack_rule = fields[1].GetUInt32();
@@ -1661,22 +1640,18 @@ void SpellMgr::LoadSpellThreats()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded %u aggro generating spells", count);
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 entry = fields[0].GetUInt32();
uint16 Threat = fields[1].GetUInt16();
@@ -1976,10 +1951,8 @@ void SpellMgr::LoadSpellLearnSkills()
// search auto-learned skills and add its to map also for use in unlearn spells/talents
uint32 dbc_count = 0;
barGoLink bar(sSpellStore.GetNumRows());
for (uint32 spell = 0; spell < sSpellStore.GetNumRows(); ++spell)
{
bar.step();
SpellEntry const* entry = sSpellStore.LookupEntry(spell);
if (!entry)
@@ -2018,8 +1991,6 @@ void SpellMgr::LoadSpellLearnSpells()
QueryResult result = WorldDatabase.Query("SELECT entry, SpellID, Active FROM spell_learn_spell");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 spell learn spells");
sLog.outString();
@@ -2029,10 +2000,8 @@ void SpellMgr::LoadSpellLearnSpells()
uint32 count = 0;
barGoLink bar(result->GetRowCount());
do
{
bar.step();
Field *fields = result->Fetch();
uint32 spell_id = fields[0].GetUInt32();
@@ -2128,21 +2097,17 @@ void SpellMgr::LoadSpellPetAuras()
QueryResult result = WorldDatabase.Query("SELECT spell, effectId, pet, aura FROM spell_pet_auras");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
Field *fields = result->Fetch();
bar.step();
uint32 spell = fields[0].GetUInt32();
uint8 eff = fields[1].GetUInt8();
@@ -2195,11 +2160,9 @@ void SpellMgr::LoadPetLevelupSpellMap()
uint32 count = 0;
uint32 family_count = 0;
barGoLink bar(sCreatureFamilyStore.GetNumRows());
for (uint32 i = 0; i < sCreatureFamilyStore.GetNumRows(); ++i)
{
bar.step();
CreatureFamilyEntry const *creatureFamily = sCreatureFamilyStore.LookupEntry(i);
if (!creatureFamily) // not exist
@@ -2304,11 +2267,9 @@ void SpellMgr::LoadPetDefaultSpells()
uint32 countCreature = 0;
uint32 countData = 0;
barGoLink bar(sCreatureStorage.MaxEntry);
for (uint32 i = 0; i < sCreatureStorage.MaxEntry; ++i)
{
bar.step();
CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i);
if (!cInfo)
@@ -2340,12 +2301,10 @@ void SpellMgr::LoadPetDefaultSpells()
sLog.outString("Loading summonable creature templates...");
oldMSTime = getMSTime();
barGoLink bar2(sSpellStore.GetNumRows());
// different summon spells
for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i)
{
bar2.step();
SpellEntry const* spellEntry = sSpellStore.LookupEntry(i);
if (!spellEntry)
@@ -2495,21 +2454,17 @@ void SpellMgr::LoadSpellAreas()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
Field *fields = result->Fetch();
bar.step();
uint32 spell = fields[0].GetUInt32();
SpellArea spellArea;
@@ -2825,12 +2780,10 @@ void SpellMgr::LoadSkillLineAbilityMap()
mSkillLineAbilityMap.clear();
barGoLink bar(sSkillLineAbilityStore.GetNumRows());
uint32 count = 0;
for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i)
{
bar.step();
SkillLineAbilityEntry const *SkillInfo = sSkillLineAbilityStore.LookupEntry(i);
if (!SkillInfo)
continue;
@@ -3266,21 +3219,17 @@ void SpellMgr::LoadSpellEnchantProcData()
QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded %u spell enchant proc event conditions", count);
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 enchantId = fields[0].GetUInt32();
@@ -3317,8 +3266,6 @@ void SpellMgr::LoadSpellRequired()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 spell required records");
sLog.outString();
@@ -3327,10 +3274,8 @@ void SpellMgr::LoadSpellRequired()
}
uint32 rows = 0;
barGoLink bar(result->GetRowCount());
do
{
bar.step();
Field *fields = result->Fetch();
uint32 spell_id = fields[0].GetUInt32();
@@ -3378,8 +3323,6 @@ void SpellMgr::LoadSpellRanks()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 spell rank records");
sLog.outString();
@@ -3387,7 +3330,6 @@ void SpellMgr::LoadSpellRanks()
return;
}
barGoLink bar(result->GetRowCount());
uint32 rows = 0;
bool finished = false;
@@ -3413,7 +3355,6 @@ void SpellMgr::LoadSpellRanks()
// don't drop the row if we're moving to the next rank
if (currentSpell == lastSpell)
{
bar.step();
rankChain.push_back(std::make_pair(spell_id, rank));
if (!result->NextRow())
finished = true;
@@ -3491,14 +3432,12 @@ void SpellMgr::LoadSpellCustomAttr()
mSpellCustomAttr.resize(GetSpellStore()->GetNumRows());
barGoLink bar(GetSpellStore()->GetNumRows());
uint32 count = 0;
SpellEntry *spellInfo;
for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
{
bar.step();
mSpellCustomAttr[i] = 0;
spellInfo = (SpellEntry*)GetSpellStore()->LookupEntry(i);
@@ -4086,7 +4025,6 @@ void SpellMgr::LoadEnchantCustomAttr()
uint32 size = sSpellItemEnchantmentStore.GetNumRows();
mEnchantCustomAttr.resize(size);
barGoLink bar(GetSpellStore()->GetNumRows());
uint32 count = 0;
@@ -4095,7 +4033,6 @@ void SpellMgr::LoadEnchantCustomAttr()
for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
{
bar.step();
SpellEntry * spellInfo = (SpellEntry*)GetSpellStore()->LookupEntry(i);
if (!spellInfo)
@@ -4134,21 +4071,17 @@ void SpellMgr::LoadSpellLinked()
QueryResult result = WorldDatabase.Query("SELECT spell_trigger, spell_effect, type FROM spell_linked_spell");
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
Field *fields = result->Fetch();
bar.step();
int32 trigger = fields[0].GetInt32();
int32 effect = fields[1].GetInt32();
@@ -19,7 +19,6 @@
#include "DatabaseEnv.h"
#include "SQLStorage.h"
#include "CreatureTextMgr.h"
#include "ProgressBar.h"
#include "ObjectMgr.h"
void CreatureTextMgr::LoadCreatureTexts()
@@ -34,20 +33,16 @@ void CreatureTextMgr::LoadCreatureTexts()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 ceature texts. DB table `creature_texts` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 textCount = 0;
uint32 creatureCount = 0;
do
{
bar.step();
Field* fields = result->Fetch();
CreatureTextEntry temp;
-5
View File
@@ -19,7 +19,6 @@
#include "Common.h"
#include "DatabaseEnv.h"
#include "SQLStorage.h"
#include "ProgressBar.h"
#include "Log.h"
#include "TicketMgr.h"
#include "WorldPacket.h"
@@ -56,14 +55,11 @@ void TicketMgr::LoadGMTickets()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 GM tickets. DB table `gm_tickets` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
@@ -90,7 +86,6 @@ void TicketMgr::LoadGMTickets()
ticket->escalated = fields[14].GetUInt8();
ticket->viewed = fields[15].GetBool();
++count;
bar.step();
m_GMTicketList.push_back(ticket);
} while (result->NextRow());
@@ -21,7 +21,6 @@
#include "World.h"
#include "Database/DatabaseEnv.h"
#include "DBCStores.h"
#include "ProgressBar.h"
void CharacterDatabaseCleaner::CleanDatabase()
{
@@ -66,10 +65,8 @@ char* table, bool (*check)(uint32))
bool found = false;
std::ostringstream ss;
barGoLink bar( (int)result->GetRowCount() );
do
{
bar.step();
Field *fields = result->Fetch();
-5
View File
@@ -22,7 +22,6 @@
#include "WeatherMgr.h"
#include "Log.h"
#include "ProgressBar.h"
#include "ObjectMgr.h"
WeatherMgr::~WeatherMgr()
@@ -85,19 +84,15 @@ void WeatherMgr::LoadWeatherData()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outErrorDb(">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
do
{
Field *fields = result->Fetch();
bar.step();
uint32 zone_id = fields[0].GetUInt32();
-9
View File
@@ -60,7 +60,6 @@
#include "Language.h"
#include "CreatureGroups.h"
#include "Transport.h"
#include "ProgressBar.h"
#include "ScriptMgr.h"
#include "AddonMgr.h"
#include "LFGMgr.h"
@@ -1800,19 +1799,15 @@ void World::LoadAutobroadcasts()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
bar.step();
Field *fields = result->Fetch();
std::string message = fields[0].GetString();
@@ -2764,21 +2759,17 @@ void World::LoadWorldStates()
if (!result)
{
barGoLink bar(1);
bar.step();
sLog.outString(">> Loaded 0 world states. DB table `worldstates` is empty!");
sLog.outString();
return;
}
barGoLink bar(result->GetRowCount());
uint32 count = 0;
do
{
Field *fields = result->Fetch();
m_worldstates[fields[0].GetUInt32()] = fields[1].GetUInt64();
bar.step();
++count;
}
while (result->NextRow());
@@ -16,7 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ProgressBar.h"
#include "Log.h"
#include "DBCFileLoader.h"
@@ -177,11 +176,9 @@ void SQLStorageLoaderBase<T>::Load(SQLStorage &store)
char * _data= new char[store.RecordCount *recordsize];
uint32 count=0;
barGoLink bar( store.RecordCount );
do
{
fields = result->Fetch();
bar.step();
char *p=(char*)&_data[recordsize*count];
newIndex[fields[0].GetUInt32()]=p;
@@ -1,63 +0,0 @@
/*
* Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include "ProgressBar.h"
char const* const barGoLink::empty = " ";
char const* const barGoLink::full = "*";
barGoLink::barGoLink( uint64 row_count )
{
rec_no = 0;
rec_pos = 0;
indic_len = 50;
num_rec = row_count;
printf( "[" );
for (uint64 i = 0; i < indic_len; ++i) printf( empty );
printf( "] 0%%\r[" );
fflush(stdout);
}
void barGoLink::step( void )
{
uint64 i, n;
if ( num_rec == 0 ) return;
++rec_no;
n = rec_no * indic_len / num_rec;
if ( n != rec_pos )
{
printf( "\r[" );
for (i = 0; i < n; i++ ) printf( full );
for (; i < indic_len; i++ ) printf( empty );
float percent = (((float)n/(float)indic_len)*100);
printf( "] %i%% \r[", (int)percent);
fflush(stdout);
rec_pos = n;
}
if( num_rec == rec_no)
{
printf( "\n" );
fflush(stdout);
}
}
-38
View File
@@ -1,38 +0,0 @@
/*
* Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRINITYCORE_PROGRESSBAR_H
#define TRINITYCORE_PROGRESSBAR_H
#include "Define.h"
class barGoLink
{
static char const * const empty;
static char const * const full;
uint64 rec_no;
uint64 rec_pos;
uint64 num_rec;
uint64 indic_len;
public:
void step( void );
barGoLink( uint64 );
};
#endif