From: Keith F. <ven...@us...> - 2007-02-21 07:28:00
|
Update of /cvsroot/planeshift/planeshift/src/common/engine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10868/src/common/engine Modified Files: drmessage.h psworld.cpp Log Message: This is a major commit to do a major rewrite of Inventory and how we handle items on the server. Here are some highlights: - Inventory does not attempt to mirror its in-memory structure with the hierarchy of containers and sacks used by the player. The slot number encodes the hierarchy instead, but the inventory itself is maintained in a linear array. - Exchanges and gifts do not affect character inventory until the Accept button is executed. If a client crashes, etc., no inventory changes and no pointer copying is required to "undo" it because nothing was "done". - No distinction between "Bulk" and "equipped" except slot number. We do check whene equipping things for the right skills and requirements, but otherwise there is far less checking. - You will notice slight differences in how inventory and exchange slot movement works. - Weight and size checking is disabled for this commit but I will add it back in in the next couple of days. - DO NOT UPDATE LAANX FROM CVS FROM NOW ON. All fixes to Laanx must be made with local editing now. - Db Version ding. No more Location and Equipped Slot columns on item_instances. Everything is encoded by the slot number and container. - Please bear with us as we get this back to 100% working. Sorry for the inconvenience. Index: drmessage.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/engine/drmessage.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** drmessage.h 8 Jul 2006 10:51:07 -0000 1.30 --- drmessage.h 21 Feb 2007 07:27:27 -0000 1.31 *************** *** 31,35 **** psStatDRMessage(uint32_t clientnum, PS_ID eid, psCharacter* psChar, int flags) { ! msg = new MsgEntry(sizeof(PS_ID) + 200 + sizeof(uint32_t), PRIORITY_LOW); //200 is enough to accomodate any statDRMessage msg->clientnum = clientnum; --- 31,35 ---- psStatDRMessage(uint32_t clientnum, PS_ID eid, psCharacter* psChar, int flags) { ! msg = new MsgEntry(sizeof(PS_ID) + 200 + sizeof(uint32_t), PRIORITY_LOW); //200 is enough to accommodate any statDRMessage msg->clientnum = clientnum; Index: psworld.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/engine/psworld.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** psworld.cpp 18 Feb 2007 18:19:19 -0000 1.13 --- psworld.cpp 21 Feb 2007 07:27:27 -0000 1.14 *************** *** 339,346 **** void psWorld::DumpWarpCache() { ! for(int i=0; i<transarray.Length(); i++) { csHash<csReversibleTransform*, csPtrKey<iSector> >::GlobalIterator it = transarray[i].GetIterator(); ! iSector * fromSector = engine->GetSectors()->Get(i); CPrintf(CON_CMDOUTPUT,"%s\n",fromSector->QueryObject()->GetName()); while (it.HasNext()) --- 339,346 ---- void psWorld::DumpWarpCache() { ! for(size_t i=0; i<transarray.GetSize(); i++) { csHash<csReversibleTransform*, csPtrKey<iSector> >::GlobalIterator it = transarray[i].GetIterator(); ! iSector * fromSector = engine->GetSectors()->Get((int)i); CPrintf(CON_CMDOUTPUT,"%s\n",fromSector->QueryObject()->GetName()); while (it.HasNext()) |