From: <ave...@us...> - 2007-08-30 20:07:48
|
Revision: 4793 http://gemrb.svn.sourceforge.net/gemrb/?rev=4793&view=rev Author: avenger_teambg Date: 2007-08-30 13:07:47 -0700 (Thu, 30 Aug 2007) Log Message: ----------- bugfixes for the previous commit Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/GUIINV.py gemrb/trunk/gemrb/GUIScripts/ie_slots.py gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp Modified: gemrb/trunk/gemrb/GUIScripts/bg2/GUIINV.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/GUIINV.py 2007-08-30 19:53:17 UTC (rev 4792) +++ gemrb/trunk/gemrb/GUIScripts/bg2/GUIINV.py 2007-08-30 20:07:47 UTC (rev 4793) @@ -517,12 +517,20 @@ def OnDragItem (): pc = GemRB.GameGetSelectedPCSingle () slot = GemRB.GetVar ("ItemButton") + if not GemRB.IsDraggingItem (): slot_item = GemRB.GetSlotItem (pc, slot) item = GemRB.GetItem (slot_item["ItemResRef"]) GemRB.DragItem (pc, slot, item["ItemIcon"], 0, 0) else: SlotType = GemRB.GetSlotType (slot, pc) + #special monk check + if GemRB.GetPlayerStat (pc, IE_CLASS)==0x14: + #offhand slot mark + if SlotType["Effects"]==TYPE_OFFHAND: + SlotType["ResRef"]="" + GemRB.DisplayString (61355, 0xffffff) + if SlotType["ResRef"]!="": GemRB.DropDraggedItem (pc, slot) if GemRB.IsDraggingItem (): Modified: gemrb/trunk/gemrb/GUIScripts/ie_slots.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/ie_slots.py 2007-08-30 19:53:17 UTC (rev 4792) +++ gemrb/trunk/gemrb/GUIScripts/ie_slots.py 2007-08-30 20:07:47 UTC (rev 4793) @@ -40,4 +40,12 @@ SLOT_INVENTORY = 32768 SLOT_ANY = 32767 +TYPE_NORMAL = 0 #inventory +TYPE_ARMOR = 1 #normal armor +TYPE_FIST = 2 #fist weapon +TYPE_MAGIC = 3 #magic weapon +TYPE_WEAPON = 4 #normal weapon +TYPE_QUIVER = 5 #projectile slots +TYPE_OFFHAND = 6 #offhand (shield/weapon) +TYPE_HELMET = 7 #critical hit protection # End of file ie_slots.py Modified: gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2007-08-30 19:53:17 UTC (rev 4792) +++ gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2007-08-30 20:07:47 UTC (rev 4793) @@ -8236,7 +8236,7 @@ METHOD(HasSpecialSpell, METH_VARARGS), METHOD(ApplyEffect, METH_VARARGS), METHOD(StealFailed, METH_NOARGS), - METHOD(DisplayString, METH_NOARGS), + METHOD(DisplayString, METH_VARARGS), // terminating entry {NULL, NULL, 0, NULL} }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |