[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:
VladimirMangos 2011-06-03 11:46:48 +04:00
parent 6b8f9fe03d
commit c870ef324d
26 changed files with 430 additions and 410 deletions

View file

@ -92,7 +92,7 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename)
if (!result)
{
barGoLink bar(1);
BarGoLink bar(1);
bar.step();
sLog.outString();
@ -100,7 +100,7 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename)
return;
}
barGoLink bar((int)result->GetRowCount());
BarGoLink bar(result->GetRowCount());
do
{
@ -804,7 +804,7 @@ void ScriptMgr::LoadAreaTriggerScripts()
if (!result)
{
barGoLink bar(1);
BarGoLink bar(1);
bar.step();
sLog.outString();
@ -812,7 +812,7 @@ void ScriptMgr::LoadAreaTriggerScripts()
return;
}
barGoLink bar((int)result->GetRowCount());
BarGoLink bar(result->GetRowCount());
do
{
@ -848,7 +848,7 @@ void ScriptMgr::LoadEventIdScripts()
if (!result)
{
barGoLink bar(1);
BarGoLink bar(1);
bar.step();
sLog.outString();
@ -856,13 +856,13 @@ void ScriptMgr::LoadEventIdScripts()
return;
}
barGoLink bar((int)result->GetRowCount());
BarGoLink bar(result->GetRowCount());
// TODO: remove duplicate code below, same way to collect event id's used in LoadEventScripts()
std::set<uint32> evt_scripts;
// Load all possible event entries from gameobjects
for(uint32 i = 1; i < sGOStorage.MaxEntry; ++i)
for (uint32 i = 1; i < sGOStorage.MaxEntry; ++i)
{
if (GameObjectInfo const* goInfo = sGOStorage.LookupEntry<GameObjectInfo>(i))
{
@ -959,14 +959,14 @@ void ScriptMgr::LoadScriptNames()
if (!result)
{
barGoLink bar(1);
BarGoLink bar(1);
bar.step();
sLog.outString();
sLog.outErrorDb(">> Loaded empty set of Script Names!");
return;
}
barGoLink bar((int)result->GetRowCount());
BarGoLink bar(result->GetRowCount());
uint32 count = 0;
do
@ -979,7 +979,7 @@ void ScriptMgr::LoadScriptNames()
std::sort(m_scriptNames.begin(), m_scriptNames.end());
sLog.outString();
sLog.outString( ">> Loaded %d Script Names", count );
sLog.outString(">> Loaded %d Script Names", count);
}
uint32 ScriptMgr::GetScriptId(const char *name) const