From: <wel...@us...> - 2010-08-22 17:36:43
|
Revision: 6171 http://planeshift.svn.sourceforge.net/planeshift/?rev=6171&view=rev Author: weltall2 Date: 2010-08-22 17:36:37 +0000 (Sun, 22 Aug 2010) Log Message: ----------- should save the creative definition when the item is committed not before else we lack the uid Modified Paths: -------------- trunk/src/server/bulkobjects/psitem.cpp Modified: trunk/src/server/bulkobjects/psitem.cpp =================================================================== --- trunk/src/server/bulkobjects/psitem.cpp 2010-08-20 08:11:09 UTC (rev 6170) +++ trunk/src/server/bulkobjects/psitem.cpp 2010-08-22 17:36:37 UTC (rev 6171) @@ -482,10 +482,7 @@ //creative stat creativeStats.creativeDefinitionXML = current_stats->getCreativeXML(); //loads the xml definition we've just prepared - creativeStats.ReadStats(); - //saves the data in the instance. - creativeStats.SaveCreation(uid); - + creativeStats.ReadStats(); } void psItem::Save(bool children) @@ -799,6 +796,10 @@ { item_quality_original = item_quality; SetUID(db->GetLastInsertID()); + //saves the creative data in the instance if any as we need an uid for it to work and we have it + //only now + if(creativeStats.creativeType != PSITEMSTATS_CREATIVETYPE_NONE) + creativeStats.SaveCreation(uid); } else Error2("Failed to insert item instance!\nError: %s", db->GetLastError()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |