diff options
author | megamage <none@none> | 2009-04-29 00:26:07 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-29 00:26:07 -0500 |
commit | de11b9e901d1d1caa0634fad541f08f11c5781af (patch) | |
tree | e35503d08ef545e668b8d854da41e0ea6aba3b3b /src/game/Item.cpp | |
parent | 9dd4b8c98599b0bdccea7b9acb61cb4e7a35da8f (diff) |
[7730] Some optimizantion and code style. Author: zhenya
--HG--
branch : trunk
Diffstat (limited to 'src/game/Item.cpp')
-rw-r--r-- | src/game/Item.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 26f49097b65..c44bca06246 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -301,7 +301,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() ); @@ -310,7 +310,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 << "'"; @@ -411,7 +411,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 << "'"; |