Merge commit 'origin/master' into 310

Conflicts:
	src/game/CharacterHandler.cpp
	src/game/Player.cpp
This commit is contained in:
tomrus88 2009-04-29 11:51:15 +04:00
commit d4323e0071
88 changed files with 681 additions and 685 deletions

View file

@ -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 << "'";