Apply style fix pt5

This commit is contained in:
Antz 2020-01-14 13:12:16 +00:00
parent 4727d8846f
commit 1a1110b4f7
67 changed files with 648 additions and 214 deletions

View file

@ -82,7 +82,9 @@ class LootTemplate::LootGroup // A set of loot def
void LootStore::Clear()
{
for (LootTemplateMap::const_iterator itr = m_LootTemplates.begin(); itr != m_LootTemplates.end(); ++itr)
{ delete itr->second; }
{
delete itr->second;
}
m_LootTemplates.clear();
}
@ -91,7 +93,9 @@ void LootStore::Clear()
void LootStore::Verify() const
{
for (LootTemplateMap::const_iterator i = m_LootTemplates.begin(); i != m_LootTemplates.end(); ++i)
{ i->second->Verify(*this, i->first); }
{
i->second->Verify(*this, i->first);
}
}
// Loads a *_loot_template DB table into loot store
@ -230,13 +234,17 @@ void LootStore::LoadAndCollectLootIds(LootIdSet& ids_set)
LoadLootTable();
for (LootTemplateMap::const_iterator tab = m_LootTemplates.begin(); tab != m_LootTemplates.end(); ++tab)
{ ids_set.insert(tab->first); }
{
ids_set.insert(tab->first);
}
}
void LootStore::CheckLootRefs(LootIdSet* ref_set) const
{
for (LootTemplateMap::const_iterator ltItr = m_LootTemplates.begin(); ltItr != m_LootTemplates.end(); ++ltItr)
{ ltItr->second->CheckLootRefs(ref_set); }
{
ltItr->second->CheckLootRefs(ref_set);
}
}
void LootStore::ReportUnusedIds(LootIdSet const& ids_set) const
@ -1292,7 +1300,9 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, bool rate, uint8
}
for (uint32 loop = 0; loop < i->maxcount; ++loop) // Ref multiplicator
{ Referenced->Process(loot, store, rate, i->group); }
{
Referenced->Process(loot, store, rate, i->group);
}
}
else // Plain entries (not a reference, not grouped)
{ loot.AddItem(*i); } // Chance is already checked, just add
@ -1300,7 +1310,9 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, bool rate, uint8
// Now processing groups
for (LootGroups::const_iterator i = Groups.begin() ; i != Groups.end() ; ++i)
{ i->Process(loot); }
{
i->Process(loot);
}
}
// True if template includes at least 1 quest drop entry
@ -1381,7 +1393,9 @@ void LootTemplate::Verify(LootStore const& lootstore, uint32 id) const
{
// Checking group chances
for (uint32 i = 0; i < Groups.size(); ++i)
{ Groups[i].Verify(lootstore, id, i + 1); }
{
Groups[i].Verify(lootstore, id, i + 1);
}
// TODO: References validity checks
}
@ -1404,7 +1418,9 @@ void LootTemplate::CheckLootRefs(LootIdSet* ref_set) const
}
for (LootGroups::const_iterator grItr = Groups.begin(); grItr != Groups.end(); ++grItr)
{ grItr->CheckLootRefs(ref_set); }
{
grItr->CheckLootRefs(ref_set);
}
}
void LoadLootTemplates_Creature()
@ -1431,7 +1447,9 @@ void LoadLootTemplates_Creature()
}
}
for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
{ ids_set.erase(*itr); }
{
ids_set.erase(*itr);
}
// for alterac valley we've defined Player-loot inside creature_loot_template id=0
// this hack is used, so that we won't need to create an extra table player_loot_template for just one case
@ -1465,7 +1483,9 @@ void LoadLootTemplates_Disenchant()
}
}
for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
{ ids_set.erase(*itr); }
{
ids_set.erase(*itr);
}
// output error for any still listed (not referenced from appropriate table) ids
LootTemplates_Disenchant.ReportUnusedIds(ids_set);
}
@ -1513,7 +1533,9 @@ void LoadLootTemplates_Gameobject()
}
}
for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
{ ids_set.erase(*itr); }
{
ids_set.erase(*itr);
}
// output error for any still listed (not referenced from appropriate table) ids
LootTemplates_Gameobject.ReportUnusedIds(ids_set);
@ -1599,7 +1621,9 @@ void LoadLootTemplates_Pickpocketing()
}
}
for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
{ ids_set.erase(*itr); }
{
ids_set.erase(*itr);
}
// output error for any still listed (not referenced from appropriate table) ids
LootTemplates_Pickpocketing.ReportUnusedIds(ids_set);
@ -1671,7 +1695,9 @@ void LoadLootTemplates_Skinning()
}
}
for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
{ ids_set.erase(*itr); }
{
ids_set.erase(*itr);
}
// output error for any still listed (not referenced from appropriate table) ids
LootTemplates_Skinning.ReportUnusedIds(ids_set);