From: Jaka K. <lyn...@us...> - 2011-08-11 15:50:30
|
gemrb: Infinity Engine emulator The branch master has been updated via 185e071df9438873b618987551fb4285bfdf170d (commit) Summary of changes: gemrb/GUIScripts/GUICommon.py | 6 +++++- gemrb/GUIScripts/InventoryCommon.py | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) from 65dc4371cb7d7d586d882b252aa9660e68c9ac4b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=185e071df9438873b618987551fb4285bfdf170d commit 185e071df9438873b618987551fb4285bfdf170d Author: Viktor Novotný <nov...@se...> Date: Thu Aug 11 13:42:59 2011 +0200 fixed spell learning for PST diff --git a/gemrb/GUIScripts/GUICommon.py b/gemrb/GUIScripts/GUICommon.py index bccb774..1b51013 100644 --- a/gemrb/GUIScripts/GUICommon.py +++ b/gemrb/GUIScripts/GUICommon.py @@ -384,7 +384,11 @@ def CannotLearnSlotSpell (): if GemRB.GetPlayerStat (pc, IE_CLASS) == 19: return LSR_STAT - slot_item = GemRB.GetSlotItem (pc, GemRB.GetVar ("ItemButton")) + if GameIsPST(): + import GUIINV + slot, slot_item = GUIINV.ItemHash[GemRB.GetVar ('ItemButton')] + else: + slot_item = GemRB.GetSlotItem (pc, GemRB.GetVar ("ItemButton")) spell_ref = GemRB.GetItem (slot_item['ItemResRef'], pc)['Spell'] spell = GemRB.GetSpell (spell_ref) diff --git a/gemrb/GUIScripts/InventoryCommon.py b/gemrb/GUIScripts/InventoryCommon.py index 4acfb1f..370977f 100644 --- a/gemrb/GUIScripts/InventoryCommon.py +++ b/gemrb/GUIScripts/InventoryCommon.py @@ -696,7 +696,10 @@ def ReadItemWindow (): OpenErrorWindow (strref) return - slot_item = GemRB.GetSlotItem (pc, slot) + if GUICommon.GameIsPST(): + slot, slot_item = GUIINV.ItemHash[GemRB.GetVar ('ItemButton')] + else: + slot_item = GemRB.GetSlotItem (pc, slot) spell_ref = GemRB.GetItem (slot_item['ItemResRef'], pc)['Spell'] spell = GemRB.GetSpell (spell_ref) if spell: ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |