From: Kemedes <ke...@us...> - 2007-08-31 18:04:04
|
Update of /cvsroot/planeshift/planeshift/src/server/bulkobjects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30005/src/server/bulkobjects Modified Files: pscharinventory.cpp pscharinventory.h Log Message: Fixed FS#176 and FS#177 Index: pscharinventory.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/pscharinventory.cpp,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** pscharinventory.cpp 27 Aug 2007 06:36:22 -0000 1.69 --- pscharinventory.cpp 31 Aug 2007 18:03:45 -0000 1.70 *************** *** 87,90 **** --- 87,91 ---- loaded = false; inExchangeMode = false; + bEncumbranceLocked = false; } *************** *** 137,140 **** --- 138,144 ---- return; + if (GetLockEncumbranceState()) + return; + /* TODO: http://www.hydlaa.com/bugtracker/bug.php?op=show&bugid=2618 * Currently characters can equip items due to stat buffs, but Index: pscharinventory.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/pscharinventory.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** pscharinventory.h 27 Aug 2007 06:36:22 -0000 1.25 --- pscharinventory.h 31 Aug 2007 18:03:45 -0000 1.26 *************** *** 368,374 **** --- 368,381 ---- void RollbackExchange(); + // Temporarily lock current encumbrance state + void SetLockEncumbranceState(bool v) { bEncumbranceLocked = v; } + + bool GetLockEncumbranceState() { return bEncumbranceLocked; } + private: /// Update encumbrance/OVERWEIGHT mode to match current status. void UpdateEncumbrance(); + + bool bEncumbranceLocked; void WriteItem(csRef<iDocumentNode> equipmentNode, psItem* item, int bulk, INVENTORY_SLOT_NUMBER slot); |