From: Laszlo T. <ave...@us...> - 2006-06-21 18:35:33
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg1 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26619 Modified Files: GUICG9.py Log Message: using profsmax first column to limit weapon proficiencies (patch #1508804) Index: GUICG9.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg1/GUICG9.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GUICG9.py 24 May 2004 14:40:02 -0000 1.1 --- GUICG9.py 21 Jun 2006 18:35:26 -0000 1.2 *************** *** 8,11 **** --- 8,12 ---- PointsLeft = 0 ProfColumn = 0 + ProfsMax = 0 def RedrawSkills(): *************** *** 52,60 **** def OnLoad(): global SkillWindow, TextAreaControl, DoneButton ! global SkillTable, PointsLeft, ProfColumn ClassTable = GemRB.LoadTable("classes") Class = GemRB.GetVar("Class")-1 ClassID = GemRB.GetTableValue(ClassTable, Class, 5) KitList = GemRB.LoadTable("kitlist") Class = GemRB.FindTableValue(ClassTable, 5, ClassID) --- 53,65 ---- def OnLoad(): global SkillWindow, TextAreaControl, DoneButton ! global SkillTable, PointsLeft, ProfColumn, ProfsMax + ProfMaxTable = GemRB.LoadTable("profsmax") ClassTable = GemRB.LoadTable("classes") Class = GemRB.GetVar("Class")-1 ClassID = GemRB.GetTableValue(ClassTable, Class, 5) + #we always use first level column + ProfsMax = GemRB.GetTableValue(ProfMaxTable, ClassID-1, 0) + GemRB.UnloadTable(ProfMaxTable) KitList = GemRB.LoadTable("kitlist") Class = GemRB.FindTableValue(ClassTable, 5, ClassID) *************** *** 140,145 **** return MaxProf = GemRB.GetTableValue(SkillTable, Pos, ProfColumn) ! if MaxProf>5: ! MaxProf = 5 ActPoint = GemRB.GetVar("Prof "+str(Pos) ) --- 145,150 ---- return MaxProf = GemRB.GetTableValue(SkillTable, Pos, ProfColumn) ! if MaxProf>ProfsMax: ! MaxProf = ProfsMax ActPoint = GemRB.GetVar("Prof "+str(Pos) ) |