mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 04:37:01 +00:00
[7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
This commit is contained in:
parent
a4373c887d
commit
8144f30199
69 changed files with 536 additions and 536 deletions
|
|
@ -299,7 +299,7 @@ void Item::SaveToDB()
|
|||
CharacterDatabase.PExecute( "DELETE FROM item_instance WHERE guid = '%u'", guid );
|
||||
std::ostringstream ss;
|
||||
ss << "INSERT INTO item_instance (guid,owner_guid,data) VALUES (" << guid << "," << GUID_LOPART(GetOwnerGUID()) << ",'";
|
||||
for(uint16 i = 0; i < m_valuesCount; i++ )
|
||||
for(uint16 i = 0; i < m_valuesCount; ++i )
|
||||
ss << GetUInt32Value(i) << " ";
|
||||
ss << "' )";
|
||||
CharacterDatabase.Execute( ss.str().c_str() );
|
||||
|
|
@ -308,7 +308,7 @@ void Item::SaveToDB()
|
|||
{
|
||||
std::ostringstream ss;
|
||||
ss << "UPDATE item_instance SET data = '";
|
||||
for(uint16 i = 0; i < m_valuesCount; i++ )
|
||||
for(uint16 i = 0; i < m_valuesCount; ++i )
|
||||
ss << GetUInt32Value(i) << " ";
|
||||
ss << "', owner_guid = '" << GUID_LOPART(GetOwnerGUID()) << "' WHERE guid = '" << guid << "'";
|
||||
|
||||
|
|
@ -409,7 +409,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result)
|
|||
{
|
||||
std::ostringstream ss;
|
||||
ss << "UPDATE item_instance SET data = '";
|
||||
for(uint16 i = 0; i < m_valuesCount; i++ )
|
||||
for(uint16 i = 0; i < m_valuesCount; ++i )
|
||||
ss << GetUInt32Value(i) << " ";
|
||||
ss << "', owner_guid = '" << GUID_LOPART(GetOwnerGUID()) << "' WHERE guid = '" << guid << "'";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue