From: Laszlo T. <ave...@us...> - 2004-09-19 20:38:48
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/pst In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31860/GUIScripts/pst Modified Files: GUICommonWindows.py GUIREC.py Log Message: fixed multi class records window in PST Index: GUICommonWindows.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/pst/GUICommonWindows.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** GUICommonWindows.py 19 Sep 2004 20:04:52 -0000 1.17 --- GUICommonWindows.py 19 Sep 2004 20:38:38 -0000 1.18 *************** *** 335,339 **** ClassTable = GemRB.LoadTable ("classes") Class = GemRB.FindTableValue (ClassTable, 5, Class) ! Multi = GemRB.GetTableValue (ClassTable, 4, Class) if Multi: if Class == 7: --- 335,339 ---- ClassTable = GemRB.LoadTable ("classes") Class = GemRB.FindTableValue (ClassTable, 5, Class) ! Multi = GemRB.GetTableValue (ClassTable, Class, 4) if Multi: if Class == 7: Index: GUIREC.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/pst/GUIREC.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** GUIREC.py 19 Sep 2004 20:04:52 -0000 1.20 --- GUIREC.py 19 Sep 2004 20:38:38 -0000 1.21 *************** *** 222,226 **** Label = GemRB.GetControl (Window, 0x10000015) GemRB.SetText (Window, Label, text) - #print "SEX:", GemRB.GetPlayerStat (pc, IE_SEX) --- 222,225 ---- *************** *** 232,247 **** Label = GemRB.GetControl (Window, 0x10000016) GemRB.SetText (Window, Label, text) - #print "CLASS:", GemRB.GetPlayerStat (pc, IE_CLASS) # alignment align = GemRB.GetPlayerStat (pc, IE_ALIGNMENT) - #print 'ALIGN:', align ss = GemRB.LoadSymbol ("ALIGN") sym = GemRB.GetSymbolValue (ss, align) - #print "ALIGN SYM:", sym AlignmentTable = GemRB.LoadTable ("ALIGNS") - #print "ALIGN DESC:", GemRB.GetTableValue (AlignmentTable, align + 1, 0) - #print "ALIGN DESC2:", GemRB.GetTableValue (AlignmentTable, sym, 'DESC_REF') alignment_help = GemRB.GetString (GemRB.GetTableValue (AlignmentTable, sym, 'DESC_REF')) frame = (3 * int (align / 16) + align % 16) - 4 --- 231,241 ---- *************** *** 256,260 **** # faction faction = GemRB.GetPlayerStat (pc, IE_FACTION) - #print 'FACTION:', faction FactionTable = GemRB.LoadTable ("FACTIONS") --- 250,253 ---- *************** *** 447,450 **** --- 440,460 ---- return + def GetClassHeader (pc, ClassName, Class, Level, Experience): + + # 19674 Next Level + NextLevelTable = GemRB.LoadTable ("XPLEVEL") + if (Level < 21): + NextLevel = GemRB.GetString (19674) + ': ' + str (GemRB.GetTableValue (NextLevelTable, Class, str(Level+1) ) ) + else: + After21ExpTable = GemRB.LoadTable ("LVL21PLS") + ExpGap = GemRB.GetTableValue (After21ExpTable, Class, 'XPGAP') + #GemRB.UnloadTable (After21ExpTable) + LevDiff = Level - 19 + Lev20Exp = GemRB.GetTableValue (NextLevelTable, Class, "20") + NextLevel = GemRB.GetString (19674) + ': ' + str (Lev20Exp + (LevDiff * ExpGap)) + + Level = GemRB.GetString (48156) + ': ' + str (Level) + return ClassName + "\n" + Level + "\n" + Experience + "\n" + NextLevel + "\n\n" + def GetStatOverview (pc): won = "[color=FFFFFF]" *************** *** 459,486 **** ClassTable = GemRB.LoadTable ("classes") Class = GemRB.GetPlayerStat (pc, IE_CLASS) - 1; ! RowName = GemRB.GetTableRowName (ClassTable, Class) ! ClassName = GemRB.GetString (GemRB.GetTableValue (ClassTable, Class, 0)) ! GemRB.UnloadTable (ClassTable) ! ! # 48156 Level ! LevelNum = GemRB.GetPlayerStat (pc, IE_LEVEL) ! Level = GemRB.GetString (48156) + ': ' + str (LevelNum) # 19673 Experience ! Experience = GemRB.GetString (19673) + ': ' + str (GemRB.GetPlayerStat (pc, IE_XP)) ! # 19674 Next Level ! NextLevelTable = GemRB.LoadTable ("XPLEVEL") ! if (GemRB.GetPlayerStat (pc, IE_LEVEL) < 21): ! NextLevel = GemRB.GetString (19674) + ': ' + str (GemRB.GetTableValue (NextLevelTable, RowName, str(LevelNum+1) ) ) ! else: ! After21ExpTable = GemRB.LoadTable ("LVL21PLS") ! ExpGap = GemRB.GetTableValue (After21ExpTable, RowName, 'XPGAP') ! #GemRB.UnloadTable (After21ExpTable) ! LevDiff = LevelNum - 19 ! Lev20Exp = GemRB.GetTableValue (NextLevelTable, RowName, "20") ! NextLevel = GemRB.GetString (19674) + ': ' + str (Lev20Exp + (LevDiff * ExpGap)) ! #GemRB.UnloadTable(NextLevelTable) ! Main = ClassName + "\n" + Level + "\n" + Experience + "\n" + NextLevel + "\n\n" # 59856 Current State --- 469,501 ---- ClassTable = GemRB.LoadTable ("classes") Class = GemRB.GetPlayerStat (pc, IE_CLASS) - 1; ! Multi = GemRB.GetTableValue (ClassTable, Class, 4) ! if Multi: ! RowName1 = "FIGHTER" ! if Multi == 3: ! #fighter/mage ! Class = 0 ! else: ! #fighter/thief ! Class = 3 ! RowName2 = GemRB.GetTableRowName (ClassTable, Class) ! else: ! RowName1 = GemRB.GetTableRowName (ClassTable, Class) ! RowName2 = "*" # 19673 Experience ! XP = GemRB.GetPlayerStat (pc, IE_XP) ! if Multi: ! XP = XP/2 ! Experience = GemRB.GetString (19673) + ': ' + str (XP) ! Level = GemRB.GetPlayerStat (pc, IE_LEVEL) ! ClassName = GemRB.GetString (GemRB.GetTableValue (ClassTable, RowName1, "NAME_REF")) ! Main = GetClassHeader (pc, ClassName, RowName1, Level, Experience) ! if Multi: ! Level = GemRB.GetPlayerStat (pc, IE_LEVEL2) ! ClassName = GemRB.GetString (GemRB.GetTableValue (ClassTable, RowName2, "NAME_REF")) ! Main = Main + GetClassHeader (pc, ClassName, RowName2, Level, Experience) ! ! GemRB.UnloadTable (ClassTable) # 59856 Current State |