mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[11590] Cleanups for barGoLink
* Rename barGoLink -> BarGoLink as expected by mangos code style * Add uint32/uint6 constructor versions for BarGoLink, and remove lot casts required before for BarGoLink use
This commit is contained in:
parent
6b8f9fe03d
commit
c870ef324d
26 changed files with 430 additions and 410 deletions
|
|
@ -2215,9 +2215,9 @@ AchievementCriteriaEntryList const& AchievementGlobalMgr::GetAchievementCriteria
|
|||
|
||||
void AchievementGlobalMgr::LoadAchievementCriteriaList()
|
||||
{
|
||||
if(sAchievementCriteriaStore.GetNumRows()==0)
|
||||
if (sAchievementCriteriaStore.GetNumRows()==0)
|
||||
{
|
||||
barGoLink bar(1);
|
||||
BarGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
|
|
@ -2225,7 +2225,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( sAchievementCriteriaStore.GetNumRows() );
|
||||
BarGoLink bar(sAchievementCriteriaStore.GetNumRows());
|
||||
for (uint32 entryId = 0; entryId < sAchievementCriteriaStore.GetNumRows(); ++entryId)
|
||||
{
|
||||
bar.step();
|
||||
|
|
@ -2248,7 +2248,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
|
|||
{
|
||||
if(sAchievementStore.GetNumRows()==0)
|
||||
{
|
||||
barGoLink bar(1);
|
||||
BarGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
|
|
@ -2257,13 +2257,13 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
|
|||
}
|
||||
|
||||
uint32 count = 0;
|
||||
barGoLink bar( sAchievementStore.GetNumRows() );
|
||||
BarGoLink bar(sAchievementStore.GetNumRows());
|
||||
for (uint32 entryId = 0; entryId < sAchievementStore.GetNumRows(); ++entryId)
|
||||
{
|
||||
bar.step();
|
||||
|
||||
AchievementEntry const* achievement = sAchievementStore.LookupEntry(entryId);
|
||||
if(!achievement || !achievement->refAchievement)
|
||||
if (!achievement || !achievement->refAchievement)
|
||||
continue;
|
||||
|
||||
m_AchievementListByReferencedId[achievement->refAchievement].push_back(achievement);
|
||||
|
|
@ -2271,7 +2271,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
|
|||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %u achievement references.",count);
|
||||
sLog.outString(">> Loaded %u achievement references.", count);
|
||||
}
|
||||
|
||||
void AchievementGlobalMgr::LoadAchievementCriteriaRequirements()
|
||||
|
|
@ -2280,9 +2280,9 @@ void AchievementGlobalMgr::LoadAchievementCriteriaRequirements()
|
|||
|
||||
QueryResult *result = WorldDatabase.Query("SELECT criteria_id, type, value1, value2 FROM achievement_criteria_requirement");
|
||||
|
||||
if(!result)
|
||||
if (!result)
|
||||
{
|
||||
barGoLink bar(1);
|
||||
BarGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
|
|
@ -2292,7 +2292,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaRequirements()
|
|||
|
||||
uint32 count = 0;
|
||||
uint32 disabled_count = 0;
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
BarGoLink bar(result->GetRowCount());
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
|
|
@ -2409,9 +2409,9 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
|||
{
|
||||
QueryResult *result = CharacterDatabase.Query("SELECT achievement FROM character_achievement GROUP BY achievement");
|
||||
|
||||
if(!result)
|
||||
if (!result)
|
||||
{
|
||||
barGoLink bar(1);
|
||||
BarGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
|
|
@ -2419,14 +2419,14 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
BarGoLink bar(result->GetRowCount());
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
Field *fields = result->Fetch();
|
||||
|
||||
uint32 achievement_id = fields[0].GetUInt32();
|
||||
if(!sAchievementStore.LookupEntry(achievement_id))
|
||||
if (!sAchievementStore.LookupEntry(achievement_id))
|
||||
{
|
||||
// we will remove nonexistent achievement for all characters
|
||||
sLog.outError("Nonexistent achievement %u data removed from table `character_achievement`.",achievement_id);
|
||||
|
|
@ -2450,9 +2450,9 @@ void AchievementGlobalMgr::LoadRewards()
|
|||
// 0 1 2 3 4 5 6 7
|
||||
QueryResult *result = WorldDatabase.Query("SELECT entry, gender, title_A, title_H, item, sender, subject, text FROM achievement_reward");
|
||||
|
||||
if(!result)
|
||||
if (!result)
|
||||
{
|
||||
barGoLink bar(1);
|
||||
BarGoLink bar(1);
|
||||
|
||||
bar.step();
|
||||
|
||||
|
|
@ -2462,7 +2462,7 @@ void AchievementGlobalMgr::LoadRewards()
|
|||
}
|
||||
|
||||
uint32 count = 0;
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
BarGoLink bar(result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2581,9 +2581,9 @@ void AchievementGlobalMgr::LoadRewardLocales()
|
|||
|
||||
QueryResult *result = WorldDatabase.Query("SELECT entry,gender,subject_loc1,text_loc1,subject_loc2,text_loc2,subject_loc3,text_loc3,subject_loc4,text_loc4,subject_loc5,text_loc5,subject_loc6,text_loc6,subject_loc7,text_loc7,subject_loc8,text_loc8 FROM locales_achievement_reward");
|
||||
|
||||
if(!result)
|
||||
if (!result)
|
||||
{
|
||||
barGoLink bar(1);
|
||||
BarGoLink bar(1);
|
||||
|
||||
bar.step();
|
||||
|
||||
|
|
@ -2592,7 +2592,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
BarGoLink bar(result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2601,7 +2601,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
|
|||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
|
||||
if(m_achievementRewards.find(entry)==m_achievementRewards.end())
|
||||
if (m_achievementRewards.find(entry)==m_achievementRewards.end())
|
||||
{
|
||||
sLog.outErrorDb( "Table `locales_achievement_reward` (Entry: %u) has locale strings for nonexistent achievement reward .", entry);
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue