From: <mg...@us...> - 2009-07-26 19:09:10
|
Revision: 4131 http://planeshift.svn.sourceforge.net/planeshift/?rev=4131&view=rev Author: mgist Date: 2009-07-26 19:09:03 +0000 (Sun, 26 Jul 2009) Log Message: ----------- - Made weight, size and stack more explicit in item description. Resolves #1034. Modified Paths: -------------- trunk/src/server/bulkobjects/psitem.cpp Modified: trunk/src/server/bulkobjects/psitem.cpp =================================================================== --- trunk/src/server/bulkobjects/psitem.cpp 2009-07-26 14:57:11 UTC (rev 4130) +++ trunk/src/server/bulkobjects/psitem.cpp 2009-07-26 19:09:03 UTC (rev 4131) @@ -2551,8 +2551,18 @@ } itemCategory.Format( "Category: %s", current_stats->GetCategory()->name.GetData() ); - weight.Format("\nWeight: %.2f", GetWeight() ); - size.Format("\nSize: %hu", GetItemSize() ); + float fweight = GetWeight(); + unsigned short ssize = GetItemSize(); + if(stack_count > 1) + { + weight.Format("\nWeight: %.2f (%hu x %.2f)", fweight, stack_count, fweight/stack_count); + size.Format("\nSize: %hu (%hu x %hu)", ssize*stack_count, stack_count, ssize); + } + else + { + weight.Format("\nWeight: %.2f", fweight); + size.Format("\nSize: %hu", ssize); + } itemInfo += itemCategory+weight+size; // Check identify skill before sending quality detail This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |