From: <lyn...@us...> - 2008-09-16 18:18:26
|
Revision: 5310 http://gemrb.svn.sourceforge.net/gemrb/?rev=5310&view=rev Author: lynxlupodian Date: 2008-09-16 18:18:37 +0000 (Tue, 16 Sep 2008) Log Message: ----------- reverted problematic 5205 Modified Paths: -------------- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp Modified: gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-09-16 17:27:39 UTC (rev 5309) +++ gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-09-16 18:18:37 UTC (rev 5310) @@ -6314,7 +6314,7 @@ PyDoc_STRVAR( GemRB_GetSlots__doc, -"GetSlots(PartyID, SlotType, flag)=>dict\n\n" +"GetSlots(PartyID, SlotType)=>dict\n\n" "Returns a tuple of slots of the inventory of a PC matching the slot type criteria.\n" "If the flag is >0, it will ignore empty slots.\n" "If the flag is <0, it will ignore filled slots.\n" @@ -6343,10 +6343,11 @@ int i; Count = 0; for (i=0;i<MaxCount;i++) { - if ((core->QuerySlotType( i ) & (ieDword) SlotType) != (ieDword) SlotType) { + int id = core->QuerySlot(i); + if ((core->QuerySlotType( id ) & (ieDword) SlotType) != (ieDword) SlotType) { continue; } - CREItem *slot = actor->inventory.GetSlotItem( i ); + CREItem *slot = actor->inventory.GetSlotItem( id ); if (flag) { if(flag<0 && slot) continue; if(flag>0 && !slot) continue; @@ -6357,10 +6358,11 @@ PyObject* tuple = PyTuple_New( Count ); Count = 0; for (i=0;i<MaxCount;i++) { - if ((core->QuerySlotType( i ) & (ieDword) SlotType) != (ieDword) SlotType) { + int id = core->QuerySlot(i); + if ((core->QuerySlotType( id ) & (ieDword) SlotType) != (ieDword) SlotType) { continue; } - CREItem *slot = actor->inventory.GetSlotItem( i ); + CREItem *slot = actor->inventory.GetSlotItem( id ); if (flag) { if(flag<0 && slot) continue; if(flag>0 && !slot) continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |