mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
[7935] Move seldom used access to query data by field names to independent object. Author: VladimirMangos
This let not do preparation code for unused later functionlity. --HG-- branch : trunk
This commit is contained in:
@@ -337,16 +337,16 @@ std::string PlayerDumpWriter::GetDump(uint32 guid)
|
||||
dump += "IMPORTANT NOTE: NOT APPLY ITS DIRECTLY to character DB or you will DAMAGE and CORRUPT character DB\n\n";
|
||||
|
||||
// revision check guard
|
||||
QueryResult* result = CharacterDatabase.Query("SELECT * FROM character_db_version LIMIT 1");
|
||||
QueryNamedResult* result = CharacterDatabase.QueryNamed("SELECT * FROM character_db_version LIMIT 1");
|
||||
if(result)
|
||||
{
|
||||
QueryResult::FieldNames const& namesMap = result->GetFieldNames();
|
||||
QueryFieldNames const& namesMap = result->GetFieldNames();
|
||||
std::string reqName;
|
||||
for(QueryResult::FieldNames::const_iterator itr = namesMap.begin(); itr != namesMap.end(); ++itr)
|
||||
for(QueryFieldNames::const_iterator itr = namesMap.begin(); itr != namesMap.end(); ++itr)
|
||||
{
|
||||
if(itr->second.substr(0,9)=="required_")
|
||||
if(itr->substr(0,9)=="required_")
|
||||
{
|
||||
reqName = itr->second;
|
||||
reqName = *itr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user