From: DaveG <da...@us...> - 2006-04-05 02:22:42
|
Update of /cvsroot/planeshift/planeshift/src/server/bulkobjects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10802/src/server/bulkobjects Modified Files: pscharacter.cpp pscharacter.h Log Message: adding a /set flag to give infinite inventory capacity (on by default for GMs) Index: pscharacter.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/pscharacter.cpp,v retrieving revision 1.383 retrieving revision 1.384 diff -C2 -d -r1.383 -r1.384 *** pscharacter.cpp 23 Mar 2006 06:31:03 -0000 1.383 --- pscharacter.cpp 5 Apr 2006 02:22:33 -0000 1.384 *************** *** 1001,1004 **** --- 1001,1016 ---- } + void psCharacterInventory::SetDoRestrictions(bool v) + { + if (doRestrictions == v) + return; + + doRestrictions = v; + + // Reassess dimentions and drop items to meet them, if needed + if (doRestrictions) + CalculateStats(); + } + //----------------------------------------------------------------------------- /* Index: pscharacter.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/pscharacter.h,v retrieving revision 1.191 retrieving revision 1.192 diff -C2 -d -r1.191 -r1.192 *** pscharacter.h 29 Mar 2006 18:05:33 -0000 1.191 --- pscharacter.h 5 Apr 2006 02:22:33 -0000 1.192 *************** *** 696,699 **** --- 696,705 ---- /// Recalculate total weight, bulk, and count of inventory items. (use when dealing with containers) void ReassessInventoryDimensions(); + + /// Changes this inventories handling of weight/capacity restrictions + void SetDoRestrictions(bool v); + + /// Get the status of the weight/capacity restrictions + bool GetDoRestrictions() { return doRestrictions; } private: |