[7607] Improvements in support some generic achievement classes Author: VladimirMangos

* Implement support achievements with refAchievement field != 0, that have criterias stored in achievement refAchievement.
    * Implement support achievement complete req. with specific count of completed critirias.
    * Avoid full achievement list scan at search achievement associated with criteria.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-03 16:36:20 -06:00
parent f7cc04e9dd
commit cb8b3fe5db
20 changed files with 363 additions and 295 deletions
+97 -44
View File
@@ -407,10 +407,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
{ {
AchievementCriteriaEntry const *achievementCriteria = (*i); AchievementCriteriaEntry const *achievementCriteria = (*i);
// don't update already completed criteria
if(IsCompletedCriteria(achievementCriteria))
continue;
if (achievementCriteria->groupFlag & ACHIEVEMENT_CRITERIA_GROUP_NOT_IN_GROUP && GetPlayer()->GetGroup()) if (achievementCriteria->groupFlag & ACHIEVEMENT_CRITERIA_GROUP_NOT_IN_GROUP && GetPlayer()->GetGroup())
continue; continue;
@@ -422,6 +418,10 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
(achievement->factionFlag == ACHIEVEMENT_FACTION_FLAG_ALLIANCE && GetPlayer()->GetTeam() != ALLIANCE)) (achievement->factionFlag == ACHIEVEMENT_FACTION_FLAG_ALLIANCE && GetPlayer()->GetTeam() != ALLIANCE))
continue; continue;
// don't update already completed criteria
if (IsCompletedCriteria(achievementCriteria,achievement))
continue;
switch (type) switch (type)
{ {
// std. case: increment at 1 // std. case: increment at 1
@@ -955,20 +955,24 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
case ACHIEVEMENT_CRITERIA_TYPE_TOTAL: case ACHIEVEMENT_CRITERIA_TYPE_TOTAL:
break; // Not implemented yet :( break; // Not implemented yet :(
} }
if(IsCompletedCriteria(achievementCriteria)) if(IsCompletedCriteria(achievementCriteria,achievement))
CompletedCriteria(achievementCriteria); CompletedCriteria(achievementCriteria,achievement);
if(AchievementEntryList const* achRefList = achievementmgr.GetAchievementByReferencedId(achievement->ID))
{
for(AchievementEntryList::const_iterator itr = achRefList->begin(); itr != achRefList->end(); ++itr)
if(IsCompletedAchievement(*itr))
CompletedAchievement(*itr);
}
} }
} }
static const uint32 achievIdByClass[MAX_CLASSES] = { 0, 459, 465 , 462, 458, 464, 461, 467, 460, 463, 0, 466 }; static const uint32 achievIdByClass[MAX_CLASSES] = { 0, 459, 465 , 462, 458, 464, 461, 467, 460, 463, 0, 466 };
static const uint32 achievIdByRace[MAX_RACES] = { 0, 1408, 1410, 1407, 1409, 1413, 1411, 1404, 1412, 0, 1405, 1406 }; static const uint32 achievIdByRace[MAX_RACES] = { 0, 1408, 1410, 1407, 1409, 1413, 1411, 1404, 1412, 0, 1405, 1406 };
bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achievementCriteria) bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achievementCriteria, AchievementEntry const* achievement)
{ {
AchievementEntry const* achievement = sAchievementStore.LookupEntry(achievementCriteria->referredAchievement);
if(!achievement)
return false;
// counter can never complete // counter can never complete
if(achievement->flags & ACHIEVEMENT_FLAG_COUNTER) if(achievement->flags & ACHIEVEMENT_FLAG_COUNTER)
return false; return false;
@@ -1083,45 +1087,64 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve
return false; return false;
} }
void AchievementMgr::CompletedCriteria(AchievementCriteriaEntry const* criteria) void AchievementMgr::CompletedCriteria(AchievementCriteriaEntry const* criteria, AchievementEntry const* achievement)
{ {
AchievementEntry const* achievement = sAchievementStore.LookupEntry(criteria->referredAchievement);
if(!achievement)
return;
// counter can never complete // counter can never complete
if(achievement->flags & ACHIEVEMENT_FLAG_COUNTER) if(achievement->flags & ACHIEVEMENT_FLAG_COUNTER)
return; return;
if(criteria->completionFlag & ACHIEVEMENT_CRITERIA_COMPLETE_FLAG_ALL || GetAchievementCompletionState(achievement)==ACHIEVEMENT_COMPLETED_COMPLETED_NOT_STORED) // already completed and stored
{ if (m_completedAchievements.find(achievement->ID)!=m_completedAchievements.end())
return;
if ((criteria->referredAchievement==achievement->ID && (criteria->completionFlag & ACHIEVEMENT_CRITERIA_COMPLETE_FLAG_ALL)) ||
IsCompletedAchievement(achievement))
CompletedAchievement(achievement); CompletedAchievement(achievement);
} }
}
// TODO: achievement 705 requires 4 criteria to be fulfilled // TODO: achievement 705 requires 4 criteria to be fulfilled
AchievementCompletionState AchievementMgr::GetAchievementCompletionState(AchievementEntry const* entry) bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry)
{ {
if(m_completedAchievements.find(entry->ID)!=m_completedAchievements.end()) // for achievement with referenced achievement criterias get from referenced and counter from self
return ACHIEVEMENT_COMPLETED_COMPLETED_STORED; uint32 achievmentForTestId = entry->refAchievement ? entry->refAchievement : entry->ID;
uint32 achievmentForTestCount = entry->count;
bool foundOutstanding = false; AchievementCriteriaEntryList const* cList = achievementmgr.GetAchievementCriteriaByAchievement(achievmentForTestId);
for (uint32 entryId = 0; entryId<sAchievementCriteriaStore.GetNumRows(); entryId++) if(!cList)
return false;
uint32 count = 0;
bool completed_all = true;
for(AchievementCriteriaEntryList::const_iterator itr = cList->begin(); itr != cList->end(); ++itr)
{ {
AchievementCriteriaEntry const* criteria = sAchievementCriteriaStore.LookupEntry(entryId); AchievementCriteriaEntry const* criteria = *itr;
if(!criteria || criteria->referredAchievement!= entry->ID)
continue;
if(IsCompletedCriteria(criteria) && criteria->completionFlag & ACHIEVEMENT_CRITERIA_COMPLETE_FLAG_ALL) bool completed = IsCompletedCriteria(criteria,entry);
return ACHIEVEMENT_COMPLETED_COMPLETED_NOT_STORED;
// found an umcompleted criteria, but DONT return false yet - there might be a completed criteria with ACHIEVEMENT_CRITERIA_COMPLETE_FLAG_ALL // found an uncompleted criteria, but DONT return false yet - there might be a completed criteria with ACHIEVEMENT_CRITERIA_COMPLETE_FLAG_ALL
if(!IsCompletedCriteria(criteria)) if(completed)
foundOutstanding = true; ++count;
}
if(foundOutstanding)
return ACHIEVEMENT_COMPLETED_NONE;
else else
return ACHIEVEMENT_COMPLETED_COMPLETED_NOT_STORED; completed_all = false;
if(achievmentForTestId == entry->ID) // not referenced achievement
{
// completed as single req. criteria
if(completed && criteria->completionFlag & ACHIEVEMENT_CRITERIA_COMPLETE_FLAG_ALL)
return true;
}
// completed as have req. count of completed criterias
if(achievmentForTestCount > 0 && achievmentForTestCount <= count)
return true;
}
// all criterias completed requirement
if(completed_all && achievmentForTestCount==0)
return true;
return false;
} }
void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype) void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype)
@@ -1311,13 +1334,13 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded 0 achievement criteria."); sLog.outErrorDb(">> Loaded 0 achievement criteria.");
return; return;
} }
barGoLink bar( sAchievementCriteriaStore.GetNumRows() ); barGoLink bar( sAchievementCriteriaStore.GetNumRows() );
for (uint32 entryId = 0; entryId<sAchievementCriteriaStore.GetNumRows(); entryId++) for (uint32 entryId = 0; entryId < sAchievementCriteriaStore.GetNumRows(); ++entryId)
{ {
bar.step(); bar.step();
@@ -1326,12 +1349,42 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
continue; continue;
m_AchievementCriteriasByType[criteria->requiredType].push_back(criteria); m_AchievementCriteriasByType[criteria->requiredType].push_back(criteria);
m_AchievementCriteriaListByAchievement[criteria->referredAchievement].push_back(criteria);
} }
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %lu achievement criteria.",(unsigned long)m_AchievementCriteriasByType->size()); sLog.outString(">> Loaded %lu achievement criteria.",(unsigned long)m_AchievementCriteriasByType->size());
} }
void AchievementGlobalMgr::LoadAchievementReferenceList()
{
if(sAchievementStore.GetNumRows()==0)
{
barGoLink bar(1);
bar.step();
sLog.outString();
sLog.outErrorDb(">> Loaded 0 achievement references.");
return;
}
uint32 count = 0;
barGoLink bar( sAchievementStore.GetNumRows() );
for (uint32 entryId = 0; entryId < sAchievementStore.GetNumRows(); ++entryId)
{
bar.step();
AchievementEntry const* achievement = sAchievementStore.LookupEntry(entryId);
if(!achievement || !achievement->refAchievement)
continue;
m_AchievementListByReferencedId[achievement->refAchievement].push_back(achievement);
++count;
}
sLog.outString();
sLog.outString(">> Loaded %u achievement references.",count);
}
void AchievementGlobalMgr::LoadCompletedAchievements() void AchievementGlobalMgr::LoadCompletedAchievements()
{ {
@@ -1342,7 +1395,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 realm completed achievements . DB table `character_achievement` is empty."); sLog.outString(">> Loaded 0 realm completed achievements . DB table `character_achievement` is empty.");
return; return;
} }
@@ -1357,7 +1410,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %lu realm completed achievements.",(unsigned long)m_allCompletedAchievements.size()); sLog.outString(">> Loaded %lu realm completed achievements.",(unsigned long)m_allCompletedAchievements.size());
} }
@@ -1374,7 +1427,7 @@ void AchievementGlobalMgr::LoadRewards()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty."); sLog.outErrorDb(">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
return; return;
} }
@@ -1467,7 +1520,7 @@ void AchievementGlobalMgr::LoadRewards()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu achievement reward locale strings", (unsigned long)m_achievementRewardLocales.size() ); sLog.outString( ">> Loaded %lu achievement reward locale strings", (unsigned long)m_achievementRewardLocales.size() );
} }
@@ -1483,7 +1536,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty."); sLog.outString(">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty.");
return; return;
} }
@@ -1537,6 +1590,6 @@ void AchievementGlobalMgr::LoadRewardLocales()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu achievement reward locale strings", (unsigned long)m_achievementRewardLocales.size() ); sLog.outString( ">> Loaded %lu achievement reward locale strings", (unsigned long)m_achievementRewardLocales.size() );
} }
+25 -11
View File
@@ -30,7 +30,11 @@
#define CRITERIA_CAST_SPELL_REQ_COUNT 46 #define CRITERIA_CAST_SPELL_REQ_COUNT 46
#define ACHIEVEMENT_REWARD_COUNT 57 #define ACHIEVEMENT_REWARD_COUNT 57
typedef std::list<const AchievementCriteriaEntry*> AchievementCriteriaEntryList; typedef std::list<AchievementCriteriaEntry const*> AchievementCriteriaEntryList;
typedef std::list<AchievementEntry const*> AchievementEntryList;
typedef std::map<uint32,AchievementCriteriaEntryList> AchievementCriteriaListByAchievement;
typedef std::map<uint32,AchievementEntryList> AchievementListByReferencedId;
struct CriteriaProgress struct CriteriaProgress
{ {
@@ -80,13 +84,6 @@ class Unit;
class Player; class Player;
class WorldPacket; class WorldPacket;
enum AchievementCompletionState
{
ACHIEVEMENT_COMPLETED_NONE,
ACHIEVEMENT_COMPLETED_COMPLETED_NOT_STORED,
ACHIEVEMENT_COMPLETED_COMPLETED_STORED,
};
class AchievementMgr class AchievementMgr
{ {
public: public:
@@ -108,10 +105,11 @@ class AchievementMgr
void SendAchievementEarned(AchievementEntry const* achievement); void SendAchievementEarned(AchievementEntry const* achievement);
void SendCriteriaUpdate(uint32 id, CriteriaProgress const* progress); void SendCriteriaUpdate(uint32 id, CriteriaProgress const* progress);
void SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype = PROGRESS_SET); void SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype = PROGRESS_SET);
void CompletedCriteria(AchievementCriteriaEntry const* entry); void CompletedCriteria(AchievementCriteriaEntry const* entry, AchievementEntry const* achievement);
void CompletedAchievement(AchievementEntry const* entry); void CompletedAchievement(AchievementEntry const* entry);
bool IsCompletedCriteria(AchievementCriteriaEntry const* entry); bool IsCompletedCriteria(AchievementCriteriaEntry const* criteria, AchievementEntry const* achievement);
AchievementCompletionState GetAchievementCompletionState(AchievementEntry const* entry); bool IsCompletedAchievement(AchievementEntry const* entry);
void CompleteAchievementsWithRefs(AchievementEntry const* entry);
void BuildAllDataPacket(WorldPacket *data); void BuildAllDataPacket(WorldPacket *data);
Player* m_player; Player* m_player;
@@ -123,6 +121,17 @@ class AchievementGlobalMgr
{ {
public: public:
AchievementCriteriaEntryList const& GetAchievementCriteriaByType(AchievementCriteriaTypes type); AchievementCriteriaEntryList const& GetAchievementCriteriaByType(AchievementCriteriaTypes type);
AchievementCriteriaEntryList const* GetAchievementCriteriaByAchievement(uint32 id)
{
AchievementCriteriaListByAchievement::const_iterator itr = m_AchievementCriteriaListByAchievement.find(id);
return itr != m_AchievementCriteriaListByAchievement.end() ? &itr->second : NULL;
}
AchievementEntryList const* GetAchievementByReferencedId(uint32 id) const
{
AchievementListByReferencedId::const_iterator itr = m_AchievementListByReferencedId.find(id);
return itr != m_AchievementListByReferencedId.end() ? &itr->second : NULL;
}
AchievementReward const* GetAchievementReward(AchievementEntry const* achievement) const AchievementReward const* GetAchievementReward(AchievementEntry const* achievement) const
{ {
@@ -156,6 +165,7 @@ class AchievementGlobalMgr
} }
void LoadAchievementCriteriaList(); void LoadAchievementCriteriaList();
void LoadAchievementReferenceList();
void LoadCompletedAchievements(); void LoadCompletedAchievements();
void LoadRewards(); void LoadRewards();
void LoadRewardLocales(); void LoadRewardLocales();
@@ -164,6 +174,10 @@ class AchievementGlobalMgr
// store achievement criterias by type to speed up lookup // store achievement criterias by type to speed up lookup
AchievementCriteriaEntryList m_AchievementCriteriasByType[ACHIEVEMENT_CRITERIA_TYPE_TOTAL]; AchievementCriteriaEntryList m_AchievementCriteriasByType[ACHIEVEMENT_CRITERIA_TYPE_TOTAL];
// store achievement criterias by achievement to speed up lookup
AchievementCriteriaListByAchievement m_AchievementCriteriaListByAchievement;
// store achievements by referenced achievement id to speed up lookup
AchievementListByReferencedId m_AchievementListByReferencedId;
typedef std::set<uint32> AllCompletedAchievements; typedef std::set<uint32> AllCompletedAchievements;
AllCompletedAchievements m_allCompletedAchievements; AllCompletedAchievements m_allCompletedAchievements;
+6 -6
View File
@@ -285,7 +285,7 @@ void AuctionHouseMgr::LoadAuctionItems()
{ {
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 auction items"); sLog.outString(">> Loaded 0 auction items");
return; return;
} }
@@ -325,7 +325,7 @@ void AuctionHouseMgr::LoadAuctionItems()
while( result->NextRow() ); while( result->NextRow() );
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u auction items", count ); sLog.outString( ">> Loaded %u auction items", count );
} }
@@ -336,7 +336,7 @@ void AuctionHouseMgr::LoadAuctions()
{ {
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty."); sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
return; return;
} }
@@ -349,7 +349,7 @@ void AuctionHouseMgr::LoadAuctions()
{ {
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty."); sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
return; return;
} }
@@ -359,7 +359,7 @@ void AuctionHouseMgr::LoadAuctions()
{ {
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty."); sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
return; return;
} }
@@ -430,7 +430,7 @@ void AuctionHouseMgr::LoadAuctions()
} while (result->NextRow()); } while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u auctions", AuctionCount ); sLog.outString( ">> Loaded %u auctions", AuctionCount );
} }
+4 -4
View File
@@ -1719,7 +1719,7 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded 0 battlegrounds. DB table `battleground_template` is empty."); sLog.outErrorDb(">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
return; return;
} }
@@ -1815,7 +1815,7 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u battlegrounds", count ); sLog.outString( ">> Loaded %u battlegrounds", count );
} }
@@ -2097,7 +2097,7 @@ void BattleGroundMgr::LoadBattleMastersEntry()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded 0 battlemaster entries - table is empty!" ); sLog.outString( ">> Loaded 0 battlemaster entries - table is empty!" );
return; return;
} }
@@ -2125,6 +2125,6 @@ void BattleGroundMgr::LoadBattleMastersEntry()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u battlemaster entries", count ); sLog.outString( ">> Loaded %u battlemaster entries", count );
} }
+2 -2
View File
@@ -117,9 +117,9 @@ void CreatureGroupManager::LoadCreatureFormations()
} }
while(result->NextRow()) ; while(result->NextRow()) ;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u creatures in formations", total_records ); sLog.outString( ">> Loaded %u creatures in formations", total_records );
sLog.outString(""); sLog.outString();
//Free some heap //Free some heap
delete result; delete result;
} }
+1 -1
View File
@@ -534,7 +534,7 @@ void LoadDBCStores(const std::string& dataPath)
exit(1); exit(1);
} }
sLog.outString(""); sLog.outString();
sLog.outString( ">> Initialized %d data stores", DBCFilesCount ); sLog.outString( ">> Initialized %d data stores", DBCFilesCount );
} }
+2 -2
View File
@@ -55,8 +55,8 @@ struct AchievementEntry
//uint32 icon; // 42 icon (from SpellIcon.dbc) //uint32 icon; // 42 icon (from SpellIcon.dbc)
//char *titleReward[16]; // 43-58 //char *titleReward[16]; // 43-58
//uint32 titleReward_flags; // 59 //uint32 titleReward_flags; // 59
//uint32 count; // 60 - need this count Criteria for complete uint32 count; // 60 - need this count of completed criterias (own or referenced achievement criterias)
uint32 refAchievement; // 61 - related achievement? uint32 refAchievement; // 61 - referenced achievement (counting of all completed criterias)
}; };
struct AchievementCategoryEntry struct AchievementCategoryEntry
+1 -1
View File
@@ -21,7 +21,7 @@
#ifndef MANGOS_DBCSFRM_H #ifndef MANGOS_DBCSFRM_H
#define MANGOS_DBCSFRM_H #define MANGOS_DBCSFRM_H
const char Achievementfmt[]="niixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxxi"; const char Achievementfmt[]="niixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxii";
const char AchievementCriteriafmt[]="niiiiiiiixxxxxxxxxxxxxxxxxiixix"; const char AchievementCriteriafmt[]="niiiiiiiixxxxxxxxxxxxxxxxxiixix";
const char AreaTableEntryfmt[]="iiinixxxxxissssssssssssssssxixxxxxxx"; const char AreaTableEntryfmt[]="iiinixxxxxissssssssssssssssxixxxxxxx";
const char AreaGroupEntryfmt[]="niiiiiii"; const char AreaGroupEntryfmt[]="niiiiiii";
+33 -33
View File
@@ -175,7 +175,7 @@ void GameEventMgr::LoadFromDB()
if( !result ) if( !result )
{ {
sLog.outString(">> Table game_event is empty."); sLog.outString(">> Table game_event is empty.");
sLog.outString(""); sLog.outString();
return; return;
} }
@@ -192,7 +192,7 @@ void GameEventMgr::LoadFromDB()
{ {
mGameEvent.clear(); mGameEvent.clear();
sLog.outString(">> Table game_event is empty!"); sLog.outString(">> Table game_event is empty!");
sLog.outString(""); sLog.outString();
return; return;
} }
@@ -246,7 +246,7 @@ void GameEventMgr::LoadFromDB()
} while( result->NextRow() ); } while( result->NextRow() );
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u game events", count ); sLog.outString( ">> Loaded %u game events", count );
} }
@@ -260,7 +260,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar2(1); barGoLink bar2(1);
bar2.step(); bar2.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u game event saves in game events", count ); sLog.outString(">> Loaded %u game event saves in game events", count );
} }
else else
@@ -295,7 +295,7 @@ void GameEventMgr::LoadFromDB()
++count; ++count;
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u game event saves in game events", count ); sLog.outString( ">> Loaded %u game event saves in game events", count );
delete result; delete result;
} }
@@ -307,7 +307,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar2(1); barGoLink bar2(1);
bar2.step(); bar2.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u game event prerequisites in game events", count ); sLog.outString(">> Loaded %u game event prerequisites in game events", count );
} }
else else
@@ -348,7 +348,7 @@ void GameEventMgr::LoadFromDB()
++count; ++count;
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u game event prerequisites in game events", count ); sLog.outString( ">> Loaded %u game event prerequisites in game events", count );
delete result; delete result;
} }
@@ -364,7 +364,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u creatures in game events", count ); sLog.outString(">> Loaded %u creatures in game events", count );
} }
else else
@@ -395,7 +395,7 @@ void GameEventMgr::LoadFromDB()
} while( result->NextRow() ); } while( result->NextRow() );
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u creatures in game events", count ); sLog.outString( ">> Loaded %u creatures in game events", count );
} }
@@ -410,7 +410,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u gameobjects in game events", count ); sLog.outString(">> Loaded %u gameobjects in game events", count );
} }
else else
@@ -441,7 +441,7 @@ void GameEventMgr::LoadFromDB()
} while( result->NextRow() ); } while( result->NextRow() );
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u gameobjects in game events", count ); sLog.outString( ">> Loaded %u gameobjects in game events", count );
} }
@@ -458,7 +458,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u model/equipment changes in game events", count ); sLog.outString(">> Loaded %u model/equipment changes in game events", count );
} }
else else
@@ -501,7 +501,7 @@ void GameEventMgr::LoadFromDB()
} while( result->NextRow() ); } while( result->NextRow() );
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u model/equipment changes in game events", count ); sLog.outString( ">> Loaded %u model/equipment changes in game events", count );
} }
@@ -515,7 +515,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u quests additions in game events", count ); sLog.outString(">> Loaded %u quests additions in game events", count );
} }
else else
@@ -542,7 +542,7 @@ void GameEventMgr::LoadFromDB()
questlist.push_back(QuestRelation(id, quest)); questlist.push_back(QuestRelation(id, quest));
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u quests additions in game events", count ); sLog.outString( ">> Loaded %u quests additions in game events", count );
delete result; delete result;
@@ -558,7 +558,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar3(1); barGoLink bar3(1);
bar3.step(); bar3.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u go quests additions in game events", count ); sLog.outString(">> Loaded %u go quests additions in game events", count );
} }
else else
@@ -587,7 +587,7 @@ void GameEventMgr::LoadFromDB()
} while( result->NextRow() ); } while( result->NextRow() );
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u quests additions in game events", count ); sLog.outString( ">> Loaded %u quests additions in game events", count );
} }
@@ -601,7 +601,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar3(1); barGoLink bar3(1);
bar3.step(); bar3.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u quest event conditions in game events", count ); sLog.outString(">> Loaded %u quest event conditions in game events", count );
} }
else else
@@ -630,7 +630,7 @@ void GameEventMgr::LoadFromDB()
mQuestToEventConditions[quest].num = num; mQuestToEventConditions[quest].num = num;
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u quest event conditions in game events", count ); sLog.outString( ">> Loaded %u quest event conditions in game events", count );
delete result; delete result;
@@ -646,7 +646,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar3(1); barGoLink bar3(1);
bar3.step(); bar3.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u conditions in game events", count ); sLog.outString(">> Loaded %u conditions in game events", count );
} }
else else
@@ -675,7 +675,7 @@ void GameEventMgr::LoadFromDB()
++count; ++count;
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u conditions in game events", count ); sLog.outString( ">> Loaded %u conditions in game events", count );
delete result; delete result;
@@ -691,7 +691,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar3(1); barGoLink bar3(1);
bar3.step(); bar3.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u condition saves in game events", count ); sLog.outString(">> Loaded %u condition saves in game events", count );
} }
else else
@@ -726,7 +726,7 @@ void GameEventMgr::LoadFromDB()
++count; ++count;
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u condition saves in game events", count ); sLog.outString( ">> Loaded %u condition saves in game events", count );
delete result; delete result;
@@ -743,7 +743,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar3(1); barGoLink bar3(1);
bar3.step(); bar3.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u npcflags in game events", count ); sLog.outString(">> Loaded %u npcflags in game events", count );
} }
else else
@@ -770,7 +770,7 @@ void GameEventMgr::LoadFromDB()
++count; ++count;
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u npcflags in game events", count ); sLog.outString( ">> Loaded %u npcflags in game events", count );
delete result; delete result;
@@ -786,7 +786,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar3(1); barGoLink bar3(1);
bar3.step(); bar3.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u vendor additions in game events", count ); sLog.outString(">> Loaded %u vendor additions in game events", count );
} }
else else
@@ -837,7 +837,7 @@ void GameEventMgr::LoadFromDB()
vendors.push_back(newEntry); vendors.push_back(newEntry);
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u vendor additions in game events", count ); sLog.outString( ">> Loaded %u vendor additions in game events", count );
delete result; delete result;
@@ -853,7 +853,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar3(1); barGoLink bar3(1);
bar3.step(); bar3.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u npc gossip textids in game events", count ); sLog.outString(">> Loaded %u npc gossip textids in game events", count );
} }
else else
@@ -880,7 +880,7 @@ void GameEventMgr::LoadFromDB()
++count; ++count;
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u npc gossip textids in game events", count ); sLog.outString( ">> Loaded %u npc gossip textids in game events", count );
delete result; delete result;
@@ -898,7 +898,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar3(1); barGoLink bar3(1);
bar3.step(); bar3.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u battleground holidays in game events", count ); sLog.outString(">> Loaded %u battleground holidays in game events", count );
} }
else else
@@ -924,7 +924,7 @@ void GameEventMgr::LoadFromDB()
mGameEventBattleGroundHolidays[event_id] = fields[1].GetUInt32(); mGameEventBattleGroundHolidays[event_id] = fields[1].GetUInt32();
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u battleground holidays in game events", count ); sLog.outString( ">> Loaded %u battleground holidays in game events", count );
delete result; delete result;
@@ -945,7 +945,7 @@ void GameEventMgr::LoadFromDB()
barGoLink bar2(1); barGoLink bar2(1);
bar2.step(); bar2.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u pools in game events", count ); sLog.outString(">> Loaded %u pools in game events", count );
} }
else else
@@ -980,7 +980,7 @@ void GameEventMgr::LoadFromDB()
poollist.push_back(entry); poollist.push_back(entry);
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u pools in game events", count ); sLog.outString( ">> Loaded %u pools in game events", count );
delete result; delete result;
} }
+2 -2
View File
@@ -308,7 +308,7 @@ void InstanceSaveManager::CleanupInstances()
} }
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Initialized %u instances", (uint32)InstanceSet.size()); 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( ">> Instance numbers remapped, next instance id is %u", InstanceNumber );
sLog.outString(""); sLog.outString();
} }
void InstanceSaveManager::LoadResetTimes() void InstanceSaveManager::LoadResetTimes()
+2 -2
View File
@@ -78,12 +78,12 @@ void LoadRandomEnchantmentsTable()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u Item Enchantment definitions", count ); sLog.outString( ">> Loaded %u Item Enchantment definitions", count );
} }
else else
{ {
sLog.outString(""); sLog.outString();
sLog.outErrorDb( ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty."); sLog.outErrorDb( ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");
} }
} }
+2 -2
View File
@@ -168,12 +168,12 @@ void LootStore::LoadLootTable()
Verify(); // Checks validity of the loot store Verify(); // Checks validity of the loot store
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u loot definitions (%lu templates)", count, (unsigned long)m_LootTemplates.size()); sLog.outString( ">> Loaded %u loot definitions (%lu templates)", count, (unsigned long)m_LootTemplates.size());
} }
else else
{ {
sLog.outString(""); sLog.outString();
sLog.outErrorDb( ">> Loaded 0 loot definitions. DB table `%s` is empty.",GetName() ); sLog.outErrorDb( ">> Loaded 0 loot definitions. DB table `%s` is empty.",GetName() );
} }
} }
+119 -119
View File
@@ -213,7 +213,7 @@ void ObjectMgr::LoadPlayerInfoInCache()
while (result->NextRow()); while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded info about %d players", m_mPlayerInfoMap.size()); sLog.outString( ">> Loaded info about %d players", m_mPlayerInfoMap.size());
} }
@@ -336,7 +336,7 @@ void ObjectMgr::LoadCreatureLocales()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 creature locale strings. DB table `locales_creature` is empty."); sLog.outString(">> Loaded 0 creature locale strings. DB table `locales_creature` is empty.");
return; return;
} }
@@ -383,7 +383,7 @@ void ObjectMgr::LoadCreatureLocales()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu creature locale strings", (unsigned long)mCreatureLocaleMap.size() ); sLog.outString( ">> Loaded %lu creature locale strings", (unsigned long)mCreatureLocaleMap.size() );
} }
@@ -404,7 +404,7 @@ void ObjectMgr::LoadNpcOptionLocales()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 npc_option locale strings. DB table `locales_npc_option` is empty."); sLog.outString(">> Loaded 0 npc_option locale strings. DB table `locales_npc_option` is empty.");
return; return;
} }
@@ -451,7 +451,7 @@ void ObjectMgr::LoadNpcOptionLocales()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu npc_option locale strings", (unsigned long)mNpcOptionLocaleMap.size() ); sLog.outString( ">> Loaded %lu npc_option locale strings", (unsigned long)mNpcOptionLocaleMap.size() );
} }
@@ -467,7 +467,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 points_of_interest locale strings. DB table `locales_points_of_interest` is empty."); sLog.outString(">> Loaded 0 points_of_interest locale strings. DB table `locales_points_of_interest` is empty.");
return; return;
} }
@@ -502,7 +502,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu points_of_interest locale strings", (unsigned long)mPointOfInterestLocaleMap.size() ); sLog.outString( ">> Loaded %lu points_of_interest locale strings", (unsigned long)mPointOfInterestLocaleMap.size() );
} }
@@ -521,7 +521,7 @@ void ObjectMgr::LoadCreatureTemplates()
loader.Load(sCreatureStorage); loader.Load(sCreatureStorage);
sLog.outString( ">> Loaded %u creature definitions", sCreatureStorage.RecordCount ); 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> heroicEntries; // already loaded heroic value in creatures
std::set<uint32> hasHeroicEntries; // already loaded creatures with heroic entry values std::set<uint32> hasHeroicEntries; // already loaded creatures with heroic entry values
@@ -779,7 +779,7 @@ void ObjectMgr::LoadCreatureAddons()
sCreatureInfoAddonStorage.Load(); sCreatureInfoAddonStorage.Load();
sLog.outString( ">> Loaded %u creature template addons", sCreatureInfoAddonStorage.RecordCount ); sLog.outString( ">> Loaded %u creature template addons", sCreatureInfoAddonStorage.RecordCount );
sLog.outString(""); sLog.outString();
// check data correctness and convert 'auras' // check data correctness and convert 'auras'
for(uint32 i = 1; i < sCreatureInfoAddonStorage.MaxEntry; ++i) for(uint32 i = 1; i < sCreatureInfoAddonStorage.MaxEntry; ++i)
@@ -797,7 +797,7 @@ void ObjectMgr::LoadCreatureAddons()
sCreatureDataAddonStorage.Load(); sCreatureDataAddonStorage.Load();
sLog.outString( ">> Loaded %u creature addons", sCreatureDataAddonStorage.RecordCount ); sLog.outString( ">> Loaded %u creature addons", sCreatureDataAddonStorage.RecordCount );
sLog.outString(""); sLog.outString();
// check data correctness and convert 'auras' // check data correctness and convert 'auras'
for(uint32 i = 1; i < sCreatureDataAddonStorage.MaxEntry; ++i) 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( ">> Loaded %u equipment template", sEquipmentStorage.RecordCount );
sLog.outString(""); sLog.outString();
// This DBC is currently only used for item templates and creature equipments checks. // This DBC is currently only used for item templates and creature equipments checks.
sItemStore.Clear(); sItemStore.Clear();
@@ -910,7 +910,7 @@ void ObjectMgr::LoadCreatureModelInfo()
sCreatureModelStorage.Load(); sCreatureModelStorage.Load();
sLog.outString( ">> Loaded %u creature model based info", sCreatureModelStorage.RecordCount ); sLog.outString( ">> Loaded %u creature model based info", sCreatureModelStorage.RecordCount );
sLog.outString(""); sLog.outString();
// check if combat_reach is valid // check if combat_reach is valid
for(uint32 i = 1; i < sCreatureModelStorage.MaxEntry; ++i) for(uint32 i = 1; i < sCreatureModelStorage.MaxEntry; ++i)
@@ -945,7 +945,7 @@ void ObjectMgr::LoadCreatures()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded 0 creature. DB table `creature` is empty."); sLog.outErrorDb(">> Loaded 0 creature. DB table `creature` is empty.");
return; return;
} }
@@ -1067,7 +1067,7 @@ void ObjectMgr::LoadCreatures()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu creatures", (unsigned long)mCreatureDataMap.size() ); sLog.outString( ">> Loaded %lu creatures", (unsigned long)mCreatureDataMap.size() );
} }
@@ -1120,7 +1120,7 @@ void ObjectMgr::LoadGameobjects()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded 0 gameobjects. DB table `gameobject` is empty."); sLog.outErrorDb(">> Loaded 0 gameobjects. DB table `gameobject` is empty.");
return; return;
} }
@@ -1195,7 +1195,7 @@ void ObjectMgr::LoadGameobjects()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu gameobjects", (unsigned long)mGameObjectDataMap.size()); sLog.outString( ">> Loaded %lu gameobjects", (unsigned long)mGameObjectDataMap.size());
} }
@@ -1246,7 +1246,7 @@ void ObjectMgr::LoadCreatureRespawnTimes()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 creature respawn time."); sLog.outString(">> Loaded 0 creature respawn time.");
return; return;
} }
@@ -1270,7 +1270,7 @@ void ObjectMgr::LoadCreatureRespawnTimes()
delete result; delete result;
sLog.outString( ">> Loaded %lu creature respawn times", (unsigned long)mCreatureRespawnTimes.size() ); sLog.outString( ">> Loaded %lu creature respawn times", (unsigned long)mCreatureRespawnTimes.size() );
sLog.outString(""); sLog.outString();
} }
void ObjectMgr::LoadGameobjectRespawnTimes() void ObjectMgr::LoadGameobjectRespawnTimes()
@@ -1288,7 +1288,7 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 gameobject respawn time."); sLog.outString(">> Loaded 0 gameobject respawn time.");
return; return;
} }
@@ -1312,7 +1312,7 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
delete result; delete result;
sLog.outString( ">> Loaded %lu gameobject respawn times", (unsigned long)mGORespawnTimes.size() ); sLog.outString( ">> Loaded %lu gameobject respawn times", (unsigned long)mGORespawnTimes.size() );
sLog.outString(""); sLog.outString();
} }
// name must be checked to correctness (if received) before call this function // name must be checked to correctness (if received) before call this function
@@ -1414,7 +1414,7 @@ void ObjectMgr::LoadItemLocales()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 Item locale strings. DB table `locales_item` is empty."); sLog.outString(">> Loaded 0 Item locale strings. DB table `locales_item` is empty.");
return; return;
} }
@@ -1462,7 +1462,7 @@ void ObjectMgr::LoadItemLocales()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu Item locale strings", (unsigned long)mItemLocaleMap.size() ); sLog.outString( ">> Loaded %lu Item locale strings", (unsigned long)mItemLocaleMap.size() );
} }
@@ -1480,7 +1480,7 @@ void ObjectMgr::LoadItemPrototypes()
SQLItemLoader loader; SQLItemLoader loader;
loader.Load(sItemStorage); loader.Load(sItemStorage);
sLog.outString( ">> Loaded %u item prototypes", sItemStorage.RecordCount ); sLog.outString( ">> Loaded %u item prototypes", sItemStorage.RecordCount );
sLog.outString(""); sLog.outString();
// check data correctness // check data correctness
for(uint32 i = 1; i < sItemStorage.MaxEntry; ++i) for(uint32 i = 1; i < sItemStorage.MaxEntry; ++i)
@@ -1881,7 +1881,7 @@ void ObjectMgr::LoadPetLevelInfo()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u level pet stats definitions", count ); sLog.outString( ">> Loaded %u level pet stats definitions", count );
sLog.outErrorDb( "Error loading `pet_levelstats` table or empty table."); sLog.outErrorDb( "Error loading `pet_levelstats` table or empty table.");
return; return;
@@ -1942,7 +1942,7 @@ void ObjectMgr::LoadPetLevelInfo()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u level pet stats definitions", count ); sLog.outString( ">> Loaded %u level pet stats definitions", count );
} }
@@ -1995,7 +1995,7 @@ void ObjectMgr::LoadPlayerInfo()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u player create definitions", count ); sLog.outString( ">> Loaded %u player create definitions", count );
sLog.outErrorDb( "Error loading `playercreateinfo` table or empty table."); sLog.outErrorDb( "Error loading `playercreateinfo` table or empty table.");
exit(1); exit(1);
@@ -2071,7 +2071,7 @@ void ObjectMgr::LoadPlayerInfo()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u player create definitions", count ); sLog.outString( ">> Loaded %u player create definitions", count );
} }
@@ -2088,7 +2088,7 @@ void ObjectMgr::LoadPlayerInfo()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u custom player create items", count ); sLog.outString( ">> Loaded %u custom player create items", count );
} }
else else
@@ -2140,7 +2140,7 @@ void ObjectMgr::LoadPlayerInfo()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u custom player create items", count ); sLog.outString( ">> Loaded %u custom player create items", count );
} }
} }
@@ -2160,7 +2160,7 @@ void ObjectMgr::LoadPlayerInfo()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u player create spells", count ); sLog.outString( ">> Loaded %u player create spells", count );
sLog.outErrorDb( "Error loading player starting spells or empty table."); sLog.outErrorDb( "Error loading player starting spells or empty table.");
} }
@@ -2196,7 +2196,7 @@ void ObjectMgr::LoadPlayerInfo()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u player create spells", count ); sLog.outString( ">> Loaded %u player create spells", count );
} }
} }
@@ -2212,7 +2212,7 @@ void ObjectMgr::LoadPlayerInfo()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u player create actions", count ); sLog.outString( ">> Loaded %u player create actions", count );
sLog.outErrorDb( "Error loading `playercreateinfo_action` table or empty table."); sLog.outErrorDb( "Error loading `playercreateinfo_action` table or empty table.");
} }
@@ -2251,7 +2251,7 @@ void ObjectMgr::LoadPlayerInfo()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u player create actions", count ); sLog.outString( ">> Loaded %u player create actions", count );
} }
} }
@@ -2267,7 +2267,7 @@ void ObjectMgr::LoadPlayerInfo()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u level health/mana definitions", count ); sLog.outString( ">> Loaded %u level health/mana definitions", count );
sLog.outErrorDb( "Error loading `player_classlevelstats` table or empty table."); sLog.outErrorDb( "Error loading `player_classlevelstats` table or empty table.");
exit(1); exit(1);
@@ -2316,7 +2316,7 @@ void ObjectMgr::LoadPlayerInfo()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u level health/mana definitions", count ); sLog.outString( ">> Loaded %u level health/mana definitions", count );
} }
@@ -2358,7 +2358,7 @@ void ObjectMgr::LoadPlayerInfo()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u level stats definitions", count ); sLog.outString( ">> Loaded %u level stats definitions", count );
sLog.outErrorDb( "Error loading `player_levelstats` table or empty table."); sLog.outErrorDb( "Error loading `player_levelstats` table or empty table.");
exit(1); exit(1);
@@ -2416,7 +2416,7 @@ void ObjectMgr::LoadPlayerInfo()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u level stats definitions", count ); sLog.outString( ">> Loaded %u level stats definitions", count );
} }
@@ -2481,7 +2481,7 @@ void ObjectMgr::LoadPlayerInfo()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u xp for level definitions", count ); sLog.outString( ">> Loaded %u xp for level definitions", count );
sLog.outErrorDb( "Error loading `player_xp_for_level` table or empty table."); sLog.outErrorDb( "Error loading `player_xp_for_level` table or empty table.");
exit(1); exit(1);
@@ -2516,7 +2516,7 @@ void ObjectMgr::LoadPlayerInfo()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u xp for level definitions", count ); sLog.outString( ">> Loaded %u xp for level definitions", count );
} }
@@ -2648,7 +2648,7 @@ void ObjectMgr::LoadGuilds()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u guild definitions", count ); sLog.outString( ">> Loaded %u guild definitions", count );
return; return;
} }
@@ -2675,7 +2675,7 @@ void ObjectMgr::LoadGuilds()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u guild definitions", count ); sLog.outString( ">> Loaded %u guild definitions", count );
} }
@@ -2692,7 +2692,7 @@ void ObjectMgr::LoadArenaTeams()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u arenateam definitions", count ); sLog.outString( ">> Loaded %u arenateam definitions", count );
return; return;
} }
@@ -2717,7 +2717,7 @@ void ObjectMgr::LoadArenaTeams()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u arenateam definitions", count ); sLog.outString( ">> Loaded %u arenateam definitions", count );
} }
@@ -2736,7 +2736,7 @@ void ObjectMgr::LoadGroups()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u group definitions", count ); sLog.outString( ">> Loaded %u group definitions", count );
return; return;
} }
@@ -2762,7 +2762,7 @@ void ObjectMgr::LoadGroups()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u group definitions", count ); sLog.outString( ">> Loaded %u group definitions", count );
// -- loading members -- // -- loading members --
@@ -2868,10 +2868,10 @@ void ObjectMgr::LoadGroups()
delete result; delete result;
} }
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u group-instance binds total", count ); sLog.outString( ">> Loaded %u group-instance binds total", count );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u group members total", count ); sLog.outString( ">> Loaded %u group members total", count );
} }
@@ -2920,7 +2920,7 @@ void ObjectMgr::LoadQuests()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded 0 quests definitions" ); sLog.outString( ">> Loaded 0 quests definitions" );
sLog.outErrorDb("`quest_template` table is empty!"); sLog.outErrorDb("`quest_template` table is empty!");
return; return;
@@ -3509,7 +3509,7 @@ void ObjectMgr::LoadQuests()
} }
} }
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu quests definitions", (unsigned long)mQuestTemplates.size() ); sLog.outString( ">> Loaded %lu quests definitions", (unsigned long)mQuestTemplates.size() );
} }
@@ -3535,7 +3535,7 @@ void ObjectMgr::LoadQuestLocales()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 Quest locale strings. DB table `locales_quest` is empty."); sLog.outString(">> Loaded 0 Quest locale strings. DB table `locales_quest` is empty.");
return; return;
} }
@@ -3645,7 +3645,7 @@ void ObjectMgr::LoadQuestLocales()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu Quest locale strings", (unsigned long)mQuestLocaleMap.size() ); sLog.outString( ">> Loaded %lu Quest locale strings", (unsigned long)mQuestLocaleMap.size() );
} }
@@ -3657,7 +3657,7 @@ void ObjectMgr::LoadPetCreateSpells()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded 0 pet create spells" ); sLog.outString( ">> Loaded 0 pet create spells" );
sLog.outErrorDb("`petcreateinfo_spell` table is empty!"); sLog.outErrorDb("`petcreateinfo_spell` table is empty!");
return; return;
@@ -3696,7 +3696,7 @@ void ObjectMgr::LoadPetCreateSpells()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u pet create spells", count ); sLog.outString( ">> Loaded %u pet create spells", count );
} }
@@ -3718,7 +3718,7 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u script definitions", count ); sLog.outString( ">> Loaded %u script definitions", count );
return; return;
} }
@@ -3940,7 +3940,7 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u script definitions", count ); sLog.outString( ">> Loaded %u script definitions", count );
} }
@@ -4090,7 +4090,7 @@ void ObjectMgr::LoadItemTexts()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u item pages", count ); sLog.outString( ">> Loaded %u item pages", count );
return; return;
} }
@@ -4112,7 +4112,7 @@ void ObjectMgr::LoadItemTexts()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u item texts", count ); sLog.outString( ">> Loaded %u item texts", count );
} }
@@ -4122,7 +4122,7 @@ void ObjectMgr::LoadPageTexts()
sPageTextStore.Load(); sPageTextStore.Load();
sLog.outString( ">> Loaded %u page texts", sPageTextStore.RecordCount ); sLog.outString( ">> Loaded %u page texts", sPageTextStore.RecordCount );
sLog.outString(""); sLog.outString();
for(uint32 i = 1; i < sPageTextStore.MaxEntry; ++i) for(uint32 i = 1; i < sPageTextStore.MaxEntry; ++i)
{ {
@@ -4172,7 +4172,7 @@ void ObjectMgr::LoadPageTextLocales()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 PageText locale strings. DB table `locales_page_text` is empty."); sLog.outString(">> Loaded 0 PageText locale strings. DB table `locales_page_text` is empty.");
return; return;
} }
@@ -4208,7 +4208,7 @@ void ObjectMgr::LoadPageTextLocales()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu PageText locale strings", (unsigned long)mPageTextLocaleMap.size() ); sLog.outString( ">> Loaded %lu PageText locale strings", (unsigned long)mPageTextLocaleMap.size() );
} }
@@ -4263,7 +4263,7 @@ void ObjectMgr::LoadInstanceTemplate()
} }
sLog.outString( ">> Loaded %u Instance Template definitions", sInstanceTemplate.RecordCount ); sLog.outString( ">> Loaded %u Instance Template definitions", sInstanceTemplate.RecordCount );
sLog.outString(""); sLog.outString();
} }
GossipText const *ObjectMgr::GetGossipText(uint32 Text_ID) const GossipText const *ObjectMgr::GetGossipText(uint32 Text_ID) const
@@ -4284,7 +4284,7 @@ void ObjectMgr::LoadGossipText()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u npc texts", count ); sLog.outString( ">> Loaded %u npc texts", count );
return; return;
} }
@@ -4327,7 +4327,7 @@ void ObjectMgr::LoadGossipText()
} }
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u npc texts", count ); sLog.outString( ">> Loaded %u npc texts", count );
delete result; delete result;
} }
@@ -4353,7 +4353,7 @@ void ObjectMgr::LoadNpcTextLocales()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 NpcText locale strings. DB table `locales_npc_text` is empty."); sLog.outString(">> Loaded 0 NpcText locale strings. DB table `locales_npc_text` is empty.");
return; return;
} }
@@ -4403,7 +4403,7 @@ void ObjectMgr::LoadNpcTextLocales()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu NpcText locale strings", (unsigned long)mNpcTextLocaleMap.size() ); sLog.outString( ">> Loaded %lu NpcText locale strings", (unsigned long)mNpcTextLocaleMap.size() );
} }
@@ -4421,7 +4421,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
{ {
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Only expired mails (need to be return or delete) or DB table `mail` is empty."); 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 return; // any mails need to be returned or deleted
} }
@@ -4508,7 +4508,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
} while (result->NextRow()); } while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u mails", count ); sLog.outString( ">> Loaded %u mails", count );
} }
@@ -4525,7 +4525,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u quest trigger points", count ); sLog.outString( ">> Loaded %u quest trigger points", count );
return; return;
} }
@@ -4573,7 +4573,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u quest trigger points", count ); sLog.outString( ">> Loaded %u quest trigger points", count );
} }
@@ -4590,7 +4590,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u tavern triggers", count ); sLog.outString( ">> Loaded %u tavern triggers", count );
return; return;
} }
@@ -4618,7 +4618,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u tavern triggers", count ); sLog.outString( ">> Loaded %u tavern triggers", count );
} }
@@ -4634,7 +4634,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u areatrigger scripts", count ); sLog.outString( ">> Loaded %u areatrigger scripts", count );
return; return;
} }
@@ -4662,7 +4662,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u areatrigger scripts", count ); sLog.outString( ">> Loaded %u areatrigger scripts", count );
} }
@@ -4820,7 +4820,7 @@ void ObjectMgr::LoadGraveyardZones()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u graveyard-zone links", count ); sLog.outString( ">> Loaded %u graveyard-zone links", count );
return; return;
} }
@@ -4870,7 +4870,7 @@ void ObjectMgr::LoadGraveyardZones()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u graveyard-zone links", count ); sLog.outString( ">> Loaded %u graveyard-zone links", count );
} }
@@ -5087,7 +5087,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u area trigger teleport definitions", count ); sLog.outString( ">> Loaded %u area trigger teleport definitions", count );
return; return;
} }
@@ -5139,7 +5139,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u area trigger teleport definitions", count ); sLog.outString( ">> Loaded %u area trigger teleport definitions", count );
} }
@@ -5158,7 +5158,7 @@ void ObjectMgr::LoadAccessRequirements()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u access requirement definitions", count ); sLog.outString( ">> Loaded %u access requirement definitions", count );
return; return;
} }
@@ -5254,7 +5254,7 @@ void ObjectMgr::LoadAccessRequirements()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u access requirement definitions", count ); sLog.outString( ">> Loaded %u access requirement definitions", count );
} }
@@ -5520,7 +5520,7 @@ void ObjectMgr::LoadGameObjectLocales()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded 0 gameobject locale strings. DB table `locales_gameobject` is empty."); sLog.outString(">> Loaded 0 gameobject locale strings. DB table `locales_gameobject` is empty.");
return; return;
} }
@@ -5572,7 +5572,7 @@ void ObjectMgr::LoadGameObjectLocales()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %lu gameobject locale strings", (unsigned long)mGameObjectLocaleMap.size() ); sLog.outString( ">> Loaded %lu gameobject locale strings", (unsigned long)mGameObjectLocaleMap.size() );
} }
@@ -5768,7 +5768,7 @@ void ObjectMgr::LoadGameobjectInfo()
} }
sLog.outString( ">> Loaded %u game object templates", sGOStorage.RecordCount ); sLog.outString( ">> Loaded %u game object templates", sGOStorage.RecordCount );
sLog.outString(""); sLog.outString();
} }
void ObjectMgr::LoadExplorationBaseXP() void ObjectMgr::LoadExplorationBaseXP()
@@ -5782,7 +5782,7 @@ void ObjectMgr::LoadExplorationBaseXP()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u BaseXP definitions", count ); sLog.outString( ">> Loaded %u BaseXP definitions", count );
return; return;
} }
@@ -5803,7 +5803,7 @@ void ObjectMgr::LoadExplorationBaseXP()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u BaseXP definitions", count ); sLog.outString( ">> Loaded %u BaseXP definitions", count );
} }
@@ -5830,7 +5830,7 @@ void ObjectMgr::LoadPetNames()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u pet name parts", count ); sLog.outString( ">> Loaded %u pet name parts", count );
return; return;
} }
@@ -5854,7 +5854,7 @@ void ObjectMgr::LoadPetNames()
while (result->NextRow()); while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u pet name parts", count ); sLog.outString( ">> Loaded %u pet name parts", count );
} }
@@ -5871,7 +5871,7 @@ void ObjectMgr::LoadPetNumber()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded the max pet number: %d", m_hiPetNumber-1); sLog.outString( ">> Loaded the max pet number: %d", m_hiPetNumber-1);
} }
@@ -5909,7 +5909,7 @@ void ObjectMgr::LoadCorpses()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u corpses", count ); sLog.outString( ">> Loaded %u corpses", count );
return; return;
} }
@@ -5938,7 +5938,7 @@ void ObjectMgr::LoadCorpses()
while (result->NextRow()); while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u corpses", count ); sLog.outString( ">> Loaded %u corpses", count );
} }
@@ -5958,7 +5958,7 @@ void ObjectMgr::LoadReputationOnKill()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty."); sLog.outErrorDb(">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty.");
return; return;
} }
@@ -6016,7 +6016,7 @@ void ObjectMgr::LoadReputationOnKill()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u creature award reputation definitions", count); sLog.outString(">> Loaded %u creature award reputation definitions", count);
} }
@@ -6033,7 +6033,7 @@ void ObjectMgr::LoadPointsOfInterest()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty."); sLog.outErrorDb(">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty.");
return; return;
} }
@@ -6068,7 +6068,7 @@ void ObjectMgr::LoadPointsOfInterest()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u Points of Interest definitions", count); sLog.outString(">> Loaded %u Points of Interest definitions", count);
} }
@@ -6085,7 +6085,7 @@ void ObjectMgr::LoadWeatherZoneChances()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded 0 weather definitions. DB table `game_weather` is empty."); sLog.outErrorDb(">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
return; return;
} }
@@ -6131,7 +6131,7 @@ void ObjectMgr::LoadWeatherZoneChances()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u weather definitions", count); sLog.outString(">> Loaded %u weather definitions", count);
} }
@@ -6225,7 +6225,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map,char const* table)
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded 0 quest relations from %s. DB table `%s` is empty.",table,table); sLog.outErrorDb(">> Loaded 0 quest relations from %s. DB table `%s` is empty.",table,table);
return; return;
} }
@@ -6253,7 +6253,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map,char const* table)
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u quest relations from %s", count,table); sLog.outString(">> Loaded %u quest relations from %s", count,table);
} }
@@ -6326,7 +6326,7 @@ void ObjectMgr::LoadReservedPlayersNames()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u reserved player names", count ); sLog.outString( ">> Loaded %u reserved player names", count );
return; return;
} }
@@ -6355,7 +6355,7 @@ void ObjectMgr::LoadReservedPlayersNames()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u reserved player names", count ); sLog.outString( ">> Loaded %u reserved player names", count );
} }
@@ -6526,7 +6526,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded 0 GameObjects for quests" ); sLog.outString( ">> Loaded 0 GameObjects for quests" );
return; return;
} }
@@ -6571,7 +6571,7 @@ void ObjectMgr::LoadGameObjectForQuests()
} }
} }
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u GameObjects for quests", count ); sLog.outString( ">> Loaded %u GameObjects for quests", count );
} }
@@ -6598,7 +6598,7 @@ bool ObjectMgr::LoadTrinityStrings(DatabaseType& db, char const* table, int32 mi
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
if(min_value == MIN_TRINITY_STRING_ID) // error only in case internal strings 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); sLog.outErrorDb(">> Loaded 0 trinity strings. DB table `%s` is empty. Cannot continue.",table);
else else
@@ -6664,7 +6664,7 @@ bool ObjectMgr::LoadTrinityStrings(DatabaseType& db, char const* table, int32 mi
delete result; delete result;
sLog.outString(""); sLog.outString();
if(min_value == MIN_TRINITY_STRING_ID) // internal Trinity strings if(min_value == MIN_TRINITY_STRING_ID) // internal Trinity strings
sLog.outString( ">> Loaded %u Trinity strings from table %s", count,table); sLog.outString( ">> Loaded %u Trinity strings from table %s", count,table);
else else
@@ -6706,7 +6706,7 @@ void ObjectMgr::LoadSpellDisabledEntrys()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u disabled spells", total_count ); sLog.outString( ">> Loaded %u disabled spells", total_count );
return; return;
} }
@@ -6736,7 +6736,7 @@ void ObjectMgr::LoadSpellDisabledEntrys()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u disabled spells from `spell_disabled`", total_count); sLog.outString( ">> Loaded %u disabled spells from `spell_disabled`", total_count);
} }
@@ -6753,7 +6753,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded `skill_fishing_base_level`, table is empty!"); sLog.outErrorDb(">> Loaded `skill_fishing_base_level`, table is empty!");
return; return;
} }
@@ -6782,7 +6782,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u areas for fishing base skill level", count ); sLog.outString( ">> Loaded %u areas for fishing base skill level", count );
} }
@@ -7078,7 +7078,7 @@ void ObjectMgr::LoadGameTele()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded `game_tele`, table is empty!"); sLog.outErrorDb(">> Loaded `game_tele`, table is empty!");
return; return;
} }
@@ -7123,7 +7123,7 @@ void ObjectMgr::LoadGameTele()
while (result->NextRow()); while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u GameTeleports", count ); sLog.outString( ">> Loaded %u GameTeleports", count );
} }
@@ -7212,7 +7212,7 @@ void ObjectMgr::LoadTrainerSpell()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded `npc_trainer`, table is empty!"); sLog.outErrorDb(">> Loaded `npc_trainer`, table is empty!");
return; return;
} }
@@ -7293,7 +7293,7 @@ void ObjectMgr::LoadTrainerSpell()
} while (result->NextRow()); } while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %d Trainers", count ); sLog.outString( ">> Loaded %d Trainers", count );
} }
@@ -7313,7 +7313,7 @@ void ObjectMgr::LoadVendors()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded `npc_vendor`, table is empty!"); sLog.outErrorDb(">> Loaded `npc_vendor`, table is empty!");
return; return;
} }
@@ -7343,7 +7343,7 @@ void ObjectMgr::LoadVendors()
} while (result->NextRow()); } while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %d Vendors ", count ); sLog.outString( ">> Loaded %d Vendors ", count );
} }
@@ -7359,7 +7359,7 @@ void ObjectMgr::LoadNpcTextId()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded `npc_gossip`, table is empty!"); sLog.outErrorDb(">> Loaded `npc_gossip`, table is empty!");
return; return;
} }
@@ -7394,7 +7394,7 @@ void ObjectMgr::LoadNpcTextId()
} while (result->NextRow()); } while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %d NpcTextId ", count ); sLog.outString( ">> Loaded %d NpcTextId ", count );
} }
@@ -7413,7 +7413,7 @@ void ObjectMgr::LoadNpcOptions()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded `npc_option`, table is empty!"); sLog.outErrorDb(">> Loaded `npc_option`, table is empty!");
return; return;
} }
@@ -7446,7 +7446,7 @@ void ObjectMgr::LoadNpcOptions()
} while (result->NextRow()); } while (result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %d npc_option entries", count ); sLog.outString( ">> Loaded %d npc_option entries", count );
} }
@@ -7577,7 +7577,7 @@ void ObjectMgr::LoadScriptNames()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outErrorDb(">> Loaded empty set of Script Names!"); sLog.outErrorDb(">> Loaded empty set of Script Names!");
return; return;
} }
@@ -7594,7 +7594,7 @@ void ObjectMgr::LoadScriptNames()
delete result; delete result;
std::sort(m_scriptNames.begin(), m_scriptNames.end()); std::sort(m_scriptNames.begin(), m_scriptNames.end());
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %d Script Names", count ); sLog.outString( ">> Loaded %d Script Names", count );
} }
+9 -9
View File
@@ -342,7 +342,7 @@ void PoolHandler::LoadFromDB()
if (!result) if (!result)
{ {
sLog.outString(">> Table pool_template is empty."); sLog.outString(">> Table pool_template is empty.");
sLog.outString(""); sLog.outString();
return; return;
} }
else else
@@ -359,7 +359,7 @@ void PoolHandler::LoadFromDB()
{ {
mPoolTemplate.clear(); mPoolTemplate.clear();
sLog.outString(">> Table pool_template is empty:"); sLog.outString(">> Table pool_template is empty:");
sLog.outString(""); sLog.outString();
return; return;
} }
@@ -380,7 +380,7 @@ void PoolHandler::LoadFromDB()
} while (result->NextRow()); } while (result->NextRow());
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u objects pools", count ); sLog.outString( ">> Loaded %u objects pools", count );
delete result; delete result;
@@ -397,7 +397,7 @@ void PoolHandler::LoadFromDB()
barGoLink bar2(1); barGoLink bar2(1);
bar2.step(); bar2.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u creatures in pools", count ); sLog.outString(">> Loaded %u creatures in pools", count );
} }
else else
@@ -440,7 +440,7 @@ void PoolHandler::LoadFromDB()
mCreatureSearchMap.insert(p); mCreatureSearchMap.insert(p);
} while (result->NextRow()); } while (result->NextRow());
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u creatures in pools", count ); sLog.outString( ">> Loaded %u creatures in pools", count );
delete result; delete result;
} }
@@ -458,7 +458,7 @@ void PoolHandler::LoadFromDB()
barGoLink bar2(1); barGoLink bar2(1);
bar2.step(); bar2.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u gameobject in pools", count ); sLog.outString(">> Loaded %u gameobject in pools", count );
} }
else else
@@ -510,7 +510,7 @@ void PoolHandler::LoadFromDB()
mGameobjectSearchMap.insert(p); mGameobjectSearchMap.insert(p);
} while( result->NextRow() ); } while( result->NextRow() );
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u gameobject in pools", count ); sLog.outString( ">> Loaded %u gameobject in pools", count );
delete result; delete result;
} }
@@ -526,7 +526,7 @@ void PoolHandler::LoadFromDB()
barGoLink bar2(1); barGoLink bar2(1);
bar2.step(); bar2.step();
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u pools in pools", count ); sLog.outString(">> Loaded %u pools in pools", count );
} }
else else
@@ -598,7 +598,7 @@ void PoolHandler::LoadFromDB()
} }
} }
} }
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u pools in mother pools", count ); sLog.outString( ">> Loaded %u pools in mother pools", count );
delete result; delete result;
} }
+1 -1
View File
@@ -91,7 +91,7 @@ bool LoadScriptingModule(char const* libName)
return false; return false;
} }
sLog.outString(""); sLog.outString();
sLog.outString( ">>> Scripts Library %s was successfully loaded.\n", name.c_str() ); sLog.outString( ">>> Scripts Library %s was successfully loaded.\n", name.c_str() );
//heh we are still there :P we have a valid library //heh we are still there :P we have a valid library
+2 -2
View File
@@ -126,14 +126,14 @@ void LoadSkillDiscoveryTable()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u skill discovery definitions", count ); sLog.outString( ">> Loaded %u skill discovery definitions", count );
if(!ssNonDiscoverableEntries.str().empty()) 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()); 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 else
{ {
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty." ); sLog.outString( ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty." );
} }
} }
+2 -2
View File
@@ -110,12 +110,12 @@ void LoadSkillExtraItemTable()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell specialization definitions", count ); sLog.outString( ">> Loaded %u spell specialization definitions", count );
} }
else else
{ {
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty." ); sLog.outString( ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty." );
} }
} }
+27 -27
View File
@@ -876,7 +876,7 @@ void SpellMgr::LoadSpellTargetPositions()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell target coordinates", count ); sLog.outString( ">> Loaded %u spell target coordinates", count );
return; return;
} }
@@ -942,7 +942,7 @@ void SpellMgr::LoadSpellTargetPositions()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell teleport coordinates", count ); sLog.outString( ">> Loaded %u spell teleport coordinates", count );
} }
@@ -961,7 +961,7 @@ void SpellMgr::LoadSpellAffects()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell affect definitions", count ); sLog.outString( ">> Loaded %u spell affect definitions", count );
return; return;
} }
@@ -1022,7 +1022,7 @@ void SpellMgr::LoadSpellAffects()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u custom spell affect definitions", count ); sLog.outString( ">> Loaded %u custom spell affect definitions", count );
for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id) for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id)
@@ -1082,7 +1082,7 @@ void SpellMgr::LoadSpellProcEvents()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell proc event conditions", count ); sLog.outString( ">> Loaded %u spell proc event conditions", count );
return; return;
} }
@@ -1133,7 +1133,7 @@ void SpellMgr::LoadSpellProcEvents()
delete result; delete result;
sLog.outString(""); sLog.outString();
if (customProc) if (customProc)
sLog.outString( ">> Loaded %u extra spell proc event conditions +%u custom", count, customProc ); sLog.outString( ">> Loaded %u extra spell proc event conditions +%u custom", count, customProc );
else else
@@ -1150,7 +1150,7 @@ void SpellMgr::LoadSpellBonusess()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell bonus data", count); sLog.outString( ">> Loaded %u spell bonus data", count);
return; return;
} }
@@ -1180,7 +1180,7 @@ void SpellMgr::LoadSpellBonusess()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u extra spell bonus data", count); sLog.outString( ">> Loaded %u extra spell bonus data", count);
} }
@@ -1264,7 +1264,7 @@ void SpellMgr::LoadSpellElixirs()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell elixir definitions", count ); sLog.outString( ">> Loaded %u spell elixir definitions", count );
return; return;
} }
@@ -1295,7 +1295,7 @@ void SpellMgr::LoadSpellElixirs()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell elixir definitions", count ); sLog.outString( ">> Loaded %u spell elixir definitions", count );
} }
@@ -1306,7 +1306,7 @@ void SpellMgr::LoadSpellThreats()
sSpellThreatStore.Load(); sSpellThreatStore.Load();
sLog.outString( ">> Loaded %u aggro generating spells", sSpellThreatStore.RecordCount ); sLog.outString( ">> Loaded %u aggro generating spells", sSpellThreatStore.RecordCount );
sLog.outString(""); sLog.outString();
} }
bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellId_2) const bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellId_2) const
@@ -1568,7 +1568,7 @@ void SpellMgr::LoadSpellRequired()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded 0 spell required records" ); sLog.outString( ">> Loaded 0 spell required records" );
sLog.outErrorDb("`spell_required` table is empty!"); sLog.outErrorDb("`spell_required` table is empty!");
return; return;
@@ -1590,7 +1590,7 @@ void SpellMgr::LoadSpellRequired()
} while( result->NextRow() ); } while( result->NextRow() );
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell required records", rows ); sLog.outString( ">> Loaded %u spell required records", rows );
} }
@@ -1886,7 +1886,7 @@ void SpellMgr::LoadSpellChains()
//for (UNORDERED_MAP<uint32, SpellChainNode>::iterator itr=mSpellChains.begin();itr!=mSpellChains.end();itr++) //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( "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); sLog.outString( ">> Loaded %u spell chains",count);
} }
@@ -1926,7 +1926,7 @@ void SpellMgr::LoadSpellLearnSkills()
} }
} }
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u Spell Learn Skills from DBC", dbc_count ); sLog.outString( ">> Loaded %u Spell Learn Skills from DBC", dbc_count );
} }
@@ -1941,7 +1941,7 @@ void SpellMgr::LoadSpellLearnSpells()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded 0 spell learn spells" ); sLog.outString( ">> Loaded 0 spell learn spells" );
sLog.outErrorDb("`spell_learn_spell` table is empty!"); sLog.outErrorDb("`spell_learn_spell` table is empty!");
return; return;
@@ -2031,7 +2031,7 @@ void SpellMgr::LoadSpellLearnSpells()
} }
} }
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell learn spells + %u found in DBC", count, dbc_count ); sLog.outString( ">> Loaded %u spell learn spells + %u found in DBC", count, dbc_count );
} }
@@ -2049,7 +2049,7 @@ void SpellMgr::LoadSpellScriptTarget()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded 0 spell script target" ); sLog.outString( ">> Loaded 0 spell script target" );
sLog.outErrorDb("`spell_script_target` table is empty!"); sLog.outErrorDb("`spell_script_target` table is empty!");
return; return;
@@ -2168,7 +2168,7 @@ void SpellMgr::LoadSpellScriptTarget()
} }
*/ */
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u Spell Script Targets", count); sLog.outString(">> Loaded %u Spell Script Targets", count);
} }
@@ -2187,7 +2187,7 @@ void SpellMgr::LoadSpellPetAuras()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell pet auras", count ); sLog.outString( ">> Loaded %u spell pet auras", count );
return; return;
} }
@@ -2246,7 +2246,7 @@ void SpellMgr::LoadSpellPetAuras()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell pet auras", count ); sLog.outString( ">> Loaded %u spell pet auras", count );
} }
@@ -2431,7 +2431,7 @@ void SpellMgr::LoadSpellLinked()
{ {
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u linked spells", count ); sLog.outString( ">> Loaded %u linked spells", count );
return; return;
} }
@@ -2489,7 +2489,7 @@ void SpellMgr::LoadSpellLinked()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u linked spells", count ); sLog.outString( ">> Loaded %u linked spells", count );
} }
@@ -2529,7 +2529,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
} }
} }
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u pet levelup spells", count ); sLog.outString( ">> Loaded %u pet levelup spells", count );
} }
@@ -2627,7 +2627,7 @@ void SpellMgr::LoadSpellAreas()
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell area requirements", count ); sLog.outString( ">> Loaded %u spell area requirements", count );
return; return;
} }
@@ -2815,7 +2815,7 @@ void SpellMgr::LoadSpellAreas()
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u spell area requirements", count ); sLog.outString( ">> Loaded %u spell area requirements", count );
} }
@@ -2936,7 +2936,7 @@ void SpellMgr::LoadSkillLineAbilityMap()
++count; ++count;
} }
sLog.outString(""); sLog.outString();
sLog.outString(">> Loaded %u SkillLineAbility MultiMap Data", count); sLog.outString(">> Loaded %u SkillLineAbility MultiMap Data", count);
} }
+2 -2
View File
@@ -42,7 +42,7 @@ void MapManager::LoadTransports()
barGoLink bar( 1 ); barGoLink bar( 1 );
bar.step(); bar.step();
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u transports", count ); sLog.outString( ">> Loaded %u transports", count );
return; return;
} }
@@ -112,7 +112,7 @@ void MapManager::LoadTransports()
} while(result->NextRow()); } while(result->NextRow());
delete result; delete result;
sLog.outString(""); sLog.outString();
sLog.outString( ">> Loaded %u transports", count ); sLog.outString( ">> Loaded %u transports", count );
// check transport data DB integrity // check transport data DB integrity
+22 -21
View File
@@ -1133,7 +1133,7 @@ void World::SetInitialWorldSettings()
} }
///- Loading strings. Getting no records means core load has to be canceled because no error message can be output. ///- 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..." ); sLog.outString( "Loading Trinity strings..." );
if (!objmgr.LoadTrinityStrings()) if (!objmgr.LoadTrinityStrings())
exit(1); // Error message displayed in function already exit(1); // Error message displayed in function already
@@ -1170,7 +1170,7 @@ void World::SetInitialWorldSettings()
sLog.outString( "Packing instances..." ); sLog.outString( "Packing instances..." );
sInstanceSaveManager.PackInstances(); sInstanceSaveManager.PackInstances();
sLog.outString(""); sLog.outString();
sLog.outString( "Loading Localization strings..." ); sLog.outString( "Loading Localization strings..." );
objmgr.LoadCreatureLocales(); objmgr.LoadCreatureLocales();
objmgr.LoadGameObjectLocales(); objmgr.LoadGameObjectLocales();
@@ -1182,7 +1182,7 @@ void World::SetInitialWorldSettings()
objmgr.LoadPointOfInterestLocales(); objmgr.LoadPointOfInterestLocales();
objmgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts) objmgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
sLog.outString( ">>> Localization strings loaded" ); sLog.outString( ">>> Localization strings loaded" );
sLog.outString(""); sLog.outString();
sLog.outString( "Loading Page Texts..." ); sLog.outString( "Loading Page Texts..." );
objmgr.LoadPageTexts(); objmgr.LoadPageTexts();
@@ -1254,10 +1254,10 @@ void World::SetInitialWorldSettings()
objmgr.LoadCreatures(); objmgr.LoadCreatures();
sLog.outString( "Loading Creature Addon Data..." ); sLog.outString( "Loading Creature Addon Data..." );
sLog.outString(""); sLog.outString();
objmgr.LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures() objmgr.LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures()
sLog.outString( ">>> Creature Addon Data loaded" ); sLog.outString( ">>> Creature Addon Data loaded" );
sLog.outString(""); sLog.outString();
sLog.outString( "Loading Creature Respawn Data..." ); // must be after PackInstances() sLog.outString( "Loading Creature Respawn Data..." ); // must be after PackInstances()
objmgr.LoadCreatureRespawnTimes(); objmgr.LoadCreatureRespawnTimes();
@@ -1272,10 +1272,10 @@ void World::SetInitialWorldSettings()
poolhandler.LoadFromDB(); poolhandler.LoadFromDB();
sLog.outString( "Loading Game Event Data..."); sLog.outString( "Loading Game Event Data...");
sLog.outString(""); sLog.outString();
gameeventmgr.LoadFromDB(); gameeventmgr.LoadFromDB();
sLog.outString( ">>> Game Event Data loaded" ); sLog.outString( ">>> Game Event Data loaded" );
sLog.outString(""); sLog.outString();
sLog.outString( "Loading Weather Data..." ); sLog.outString( "Loading Weather Data..." );
objmgr.LoadWeatherZoneChances(); objmgr.LoadWeatherZoneChances();
@@ -1284,10 +1284,10 @@ void World::SetInitialWorldSettings()
objmgr.LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables objmgr.LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables
sLog.outString( "Loading Quests Relations..." ); sLog.outString( "Loading Quests Relations..." );
sLog.outString(""); sLog.outString();
objmgr.LoadQuestRelations(); // must be after quest load objmgr.LoadQuestRelations(); // must be after quest load
sLog.outString( ">>> Quests Relations loaded" ); sLog.outString( ">>> Quests Relations loaded" );
sLog.outString(""); sLog.outString();
sLog.outString( "Loading SpellArea Data..." ); // must be after quest load sLog.outString( "Loading SpellArea Data..." ); // must be after quest load
spellmgr.LoadSpellAreas(); spellmgr.LoadSpellAreas();
@@ -1329,10 +1329,10 @@ void World::SetInitialWorldSettings()
spellmgr.LoadSpellLinked(); spellmgr.LoadSpellLinked();
sLog.outString( "Loading Player Create Info & Level Stats..." ); sLog.outString( "Loading Player Create Info & Level Stats..." );
sLog.outString(""); sLog.outString();
objmgr.LoadPlayerInfo(); objmgr.LoadPlayerInfo();
sLog.outString( ">>> Player Create Info & Level Stats loaded" ); sLog.outString( ">>> Player Create Info & Level Stats loaded" );
sLog.outString(""); sLog.outString();
sLog.outString( "Loading Exploration BaseXP Data..." ); sLog.outString( "Loading Exploration BaseXP Data..." );
objmgr.LoadExplorationBaseXP(); objmgr.LoadExplorationBaseXP();
@@ -1353,10 +1353,10 @@ void World::SetInitialWorldSettings()
objmgr.LoadSpellDisabledEntrys(); objmgr.LoadSpellDisabledEntrys();
sLog.outString( "Loading Loot Tables..." ); sLog.outString( "Loading Loot Tables..." );
sLog.outString(""); sLog.outString();
LoadLootTables(); LoadLootTables();
sLog.outString( ">>> Loot Tables loaded" ); sLog.outString( ">>> Loot Tables loaded" );
sLog.outString(""); sLog.outString();
sLog.outString( "Loading Skill Discovery Table..." ); sLog.outString( "Loading Skill Discovery Table..." );
LoadSkillDiscoveryTable(); LoadSkillDiscoveryTable();
@@ -1368,21 +1368,22 @@ void World::SetInitialWorldSettings()
objmgr.LoadFishingBaseSkillLevel(); objmgr.LoadFishingBaseSkillLevel();
sLog.outString( "Loading Achievements..." ); sLog.outString( "Loading Achievements..." );
sLog.outString(""); sLog.outString();
achievementmgr.LoadAchievementReferenceList();
achievementmgr.LoadAchievementCriteriaList(); achievementmgr.LoadAchievementCriteriaList();
achievementmgr.LoadRewards(); achievementmgr.LoadRewards();
achievementmgr.LoadRewardLocales(); achievementmgr.LoadRewardLocales();
achievementmgr.LoadCompletedAchievements(); achievementmgr.LoadCompletedAchievements();
sLog.outString( ">>> Achievements loaded" ); sLog.outString( ">>> Achievements loaded" );
sLog.outString(""); sLog.outString();
///- Load dynamic data tables from the database ///- Load dynamic data tables from the database
sLog.outString( "Loading Auctions..." ); sLog.outString( "Loading Auctions..." );
sLog.outString(""); sLog.outString();
auctionmgr.LoadAuctionItems(); auctionmgr.LoadAuctionItems();
auctionmgr.LoadAuctions(); auctionmgr.LoadAuctions();
sLog.outString( ">>> Auctions loaded" ); sLog.outString( ">>> Auctions loaded" );
sLog.outString(""); sLog.outString();
sLog.outString( "Loading Guilds..." ); sLog.outString( "Loading Guilds..." );
objmgr.LoadGuilds(); objmgr.LoadGuilds();
@@ -1418,7 +1419,7 @@ void World::SetInitialWorldSettings()
objmgr.LoadTrainerSpell(); // must be after load CreatureTemplate objmgr.LoadTrainerSpell(); // must be after load CreatureTemplate
sLog.outString( "Loading Waypoints..." ); sLog.outString( "Loading Waypoints..." );
sLog.outString(""); sLog.outString();
WaypointMgr.Load(); WaypointMgr.Load();
sLog.outString( "Loading Creature Formations..." ); sLog.outString( "Loading Creature Formations..." );
@@ -1433,7 +1434,7 @@ void World::SetInitialWorldSettings()
///- Load and initialize scripts ///- Load and initialize scripts
sLog.outString( "Loading Scripts..." ); sLog.outString( "Loading Scripts..." );
sLog.outString(""); sLog.outString();
objmgr.LoadQuestStartScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate 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.LoadQuestEndScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
objmgr.LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data) objmgr.LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
@@ -1441,7 +1442,7 @@ void World::SetInitialWorldSettings()
objmgr.LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data) objmgr.LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
objmgr.LoadWaypointScripts(); objmgr.LoadWaypointScripts();
sLog.outString( ">>> Scripts loaded" ); sLog.outString( ">>> Scripts loaded" );
sLog.outString(""); sLog.outString();
sLog.outString( "Loading Scripts text locales..." ); // must be after Load*Scripts calls sLog.outString( "Loading Scripts text locales..." ); // must be after Load*Scripts calls
objmgr.LoadDbScriptStrings(); objmgr.LoadDbScriptStrings();
@@ -1581,7 +1582,7 @@ void World::DetectDBCLang()
m_defaultDbcLocale = LocaleConstant(default_locale); 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("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, ...) void World::RecordTimeDiff(const char *text, ...)