[11973] Various Cleanups

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
stfx 2012-04-22 19:41:24 +02:00 committed by Schmoozerd
parent c243c42c3c
commit f3f3349661
50 changed files with 153 additions and 134 deletions

View file

@ -441,7 +441,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %lu points_of_interest locale strings", (unsigned long)mPointOfInterestLocaleMap.size() );
sLog.outString(">> Loaded " SIZEFMTD " points_of_interest locale strings", mPointOfInterestLocaleMap.size());
}
struct SQLCreatureLoader : public SQLStorageLoaderBase<SQLCreatureLoader>
@ -850,10 +850,9 @@ void ObjectMgr::LoadEquipmentTemplates()
for(uint8 j = 0; j < 3; ++j)
{
if (!eqInfo->equipentry[j])
continue;
continue;
ItemEntry const *dbcitem = sItemStore.LookupEntry(eqInfo->equipentry[j]);
if (!dbcitem)
{
sLog.outErrorDb("Unknown item (entry=%u) in creature_equip_template.equipentry%u for entry = %u, forced to 0.", eqInfo->equipentry[j], j+1, i);
@ -877,6 +876,7 @@ void ObjectMgr::LoadEquipmentTemplates()
}
}
}
sLog.outString( ">> Loaded %u equipment template", sEquipmentStorage.RecordCount );
sLog.outString();
}
@ -3396,7 +3396,7 @@ void ObjectMgr::LoadArenaTeams()
// 0 1 2 3 4 5
QueryResult *result = CharacterDatabase.Query( "SELECT arena_team.arenateamid,name,captainguid,type,BackgroundColor,EmblemStyle,"
// 6 7 8 9 10 11 12 13 14
// 6 7 8 9 10 11 12 13 14
"EmblemColor,BorderStyle,BorderColor, rating,games_week,wins_week,games_season,wins_season,rank "
"FROM arena_team LEFT JOIN arena_team_stats ON arena_team.arenateamid = arena_team_stats.arenateamid ORDER BY arena_team.arenateamid ASC" );
@ -5667,14 +5667,14 @@ void ObjectMgr::PackGroupIds()
void ObjectMgr::SetHighestGuids()
{
QueryResult *result = CharacterDatabase.Query( "SELECT MAX(guid) FROM characters" );
QueryResult *result = CharacterDatabase.Query("SELECT MAX(guid) FROM characters");
if( result )
{
m_CharGuids.Set((*result)[0].GetUInt32()+1);
delete result;
}
result = WorldDatabase.Query( "SELECT MAX(guid) FROM creature" );
result = WorldDatabase.Query("SELECT MAX(guid) FROM creature");
if( result )
{
m_FirstTemporaryCreatureGuid = (*result)[0].GetUInt32()+1;