From: Laszlo T. <ave...@us...> - 2004-11-23 21:47:22
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4009 Modified Files: Inventory.cpp Log Message: use itemtype.2da for determining inventory slots Index: Inventory.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Inventory.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Inventory.cpp 19 Nov 2004 23:09:20 -0000 1.37 --- Inventory.cpp 23 Nov 2004 21:47:00 -0000 1.38 *************** *** 26,33 **** #include "Item.h" - // FIXME: it's true only for pst - #define FIRST_DEFAULT_SLOT 25 - #define LAST_DEFAULT_SLOT 44 - Inventory::Inventory() { --- 26,29 ---- *************** *** 311,315 **** int res = 0; ! for (size_t i = FIRST_DEFAULT_SLOT; i <= LAST_DEFAULT_SLOT; i++) { int part_res = AddSlotItem (item, i); if (part_res == 2) return 2; --- 307,315 ---- int res = 0; ! for (size_t i = 0; i<Slots.size(); i++) { ! //looking for default inventory slot (-1) ! if (core->QuerySlotType(i)!=-1) { ! continue; ! } int part_res = AddSlotItem (item, i); if (part_res == 2) return 2; |