From: <ave...@us...> - 2008-09-12 16:18:36
|
Revision: 5264 http://gemrb.svn.sourceforge.net/gemrb/?rev=5264&view=rev Author: avenger_teambg Date: 2008-09-12 16:02:58 +0000 (Fri, 12 Sep 2008) Log Message: ----------- don't die on missing spell tables Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/GUICommon.py Modified: gemrb/trunk/gemrb/GUIScripts/GUICommon.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/GUICommon.py 2008-09-12 15:59:42 UTC (rev 5263) +++ gemrb/trunk/gemrb/GUIScripts/GUICommon.py 2008-09-12 16:02:58 UTC (rev 5264) @@ -21,6 +21,7 @@ # GUICommon.py - common functions for GUIScripts of all game types import GemRB +from ie_restype import * from GUIDefines import * OtherWindowFn = None @@ -112,6 +113,11 @@ return def UnsetupSpellLevels (pc, TableName, Type, Level): + + #BG2 has no mxspldru table? (don't die on missing spell tables) + if !GemRB.HasResource (TableName, RES_2DA): + return + Table=GemRB.LoadTable (TableName) for i in range(GemRB.GetTableColumnCount (0)): GemRB.SetMemorizableSpellsCount (pc, 0, Type, i) @@ -139,4 +145,4 @@ return False def GameIsTOB (): - return GemRB.HasResource ("worldm25", 0x000003F7) + return GemRB.HasResource ("worldm25", RES_WMP) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |