|
@@ -26,9 +26,11 @@ class PanelResults(wx.Panel):
|
|
|
ID of the unit being optimized (default "").
|
|
ID of the unit being optimized (default "").
|
|
|
unitName : str
|
|
unitName : str
|
|
|
Name of the unit being optimized (default "").
|
|
Name of the unit being optimized (default "").
|
|
|
|
|
+ unitNameLabel : wx.StaticText
|
|
|
|
|
+ Labels for the unit name.
|
|
|
data : Python Object
|
|
data : Python Object
|
|
|
Results from RuneOptimizer (default None).
|
|
Results from RuneOptimizer (default None).
|
|
|
- currentStats : int[10]
|
|
|
|
|
|
|
+ unitStats : int[10]
|
|
|
The current stats of the unit being optimized. (default is
|
|
The current stats of the unit being optimized. (default is
|
|
|
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]).
|
|
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]).
|
|
|
page : int
|
|
page : int
|
|
@@ -87,8 +89,9 @@ class PanelResults(wx.Panel):
|
|
|
|
|
|
|
|
unitId = ""
|
|
unitId = ""
|
|
|
unitName = ""
|
|
unitName = ""
|
|
|
|
|
+ unitNameLabel = None
|
|
|
data = None
|
|
data = None
|
|
|
- currentStats = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
|
|
|
|
|
+ unitStats = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
|
page = 0
|
|
page = 0
|
|
|
totalPages = 0
|
|
totalPages = 0
|
|
|
linesPerPage = 10
|
|
linesPerPage = 10
|
|
@@ -130,9 +133,20 @@ class PanelResults(wx.Panel):
|
|
|
style=wx.FONTSTYLE_ITALIC, weight=wx.FONTWEIGHT_NORMAL
|
|
style=wx.FONTSTYLE_ITALIC, weight=wx.FONTWEIGHT_NORMAL
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+ # Unit name and id
|
|
|
|
|
+ self.unitNameLabel =wx.StaticText(
|
|
|
|
|
+ parent=self, id=wx.ID_ANY, label="Nothing yet. Optimize something!",
|
|
|
|
|
+ pos=(0, 0), size=(400, 30)
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ # Contains the results table. Hidden until they are loaded.
|
|
|
|
|
+ self.resultContainer = wx.BoxSizer(wx.VERTICAL)
|
|
|
|
|
+ # Contains all thigs to be shown once a result is selected
|
|
|
|
|
+ self.resultContent = wx.BoxSizer(wx.VERTICAL)
|
|
|
|
|
+
|
|
|
# The result list table
|
|
# The result list table
|
|
|
self.resultGrid = wx.grid.Grid(
|
|
self.resultGrid = wx.grid.Grid(
|
|
|
- parent=self, id=wx.ID_ANY, pos=(50, 30), size=(544, 220)
|
|
|
|
|
|
|
+ parent=self, id=wx.ID_ANY, pos=(0, 30), size=(525, 170)
|
|
|
)
|
|
)
|
|
|
self.resultGrid.CreateGrid(
|
|
self.resultGrid.CreateGrid(
|
|
|
numRows=10, numCols=11,
|
|
numRows=10, numCols=11,
|
|
@@ -142,7 +156,9 @@ class PanelResults(wx.Panel):
|
|
|
self.resultGrid.SetDefaultCellAlignment(
|
|
self.resultGrid.SetDefaultCellAlignment(
|
|
|
horiz=wx.ALIGN_RIGHT, vert=wx.ALIGN_CENTRE
|
|
horiz=wx.ALIGN_RIGHT, vert=wx.ALIGN_CENTRE
|
|
|
)
|
|
)
|
|
|
|
|
+ monospaceFont.PointSize -= 1
|
|
|
self.resultGrid.SetDefaultCellFont(monospaceFont)
|
|
self.resultGrid.SetDefaultCellFont(monospaceFont)
|
|
|
|
|
+ monospaceFont.PointSize += 1
|
|
|
self.resultGrid.SetRowLabelSize(width=35)
|
|
self.resultGrid.SetRowLabelSize(width=35)
|
|
|
self.resultGrid.SetColLabelValue(col=0, value="Rating")
|
|
self.resultGrid.SetColLabelValue(col=0, value="Rating")
|
|
|
self.resultGrid.SetColSize(col=0, width=50)
|
|
self.resultGrid.SetColSize(col=0, width=50)
|
|
@@ -167,34 +183,35 @@ class PanelResults(wx.Panel):
|
|
|
self.resultGrid.SetColLabelValue(col=10, value="DMG")
|
|
self.resultGrid.SetColLabelValue(col=10, value="DMG")
|
|
|
self.resultGrid.SetColSize(col=10, width=50)
|
|
self.resultGrid.SetColSize(col=10, width=50)
|
|
|
self.resultGrid.SetColLabelSize(height=20)
|
|
self.resultGrid.SetColLabelSize(height=20)
|
|
|
- self.resultGrid.SetDefaultRowSize(height=20)
|
|
|
|
|
|
|
+ self.resultGrid.SetDefaultRowSize(height=15)
|
|
|
self.Bind(
|
|
self.Bind(
|
|
|
wx.grid.EVT_GRID_SELECT_CELL, self.resultSelected, self.resultGrid
|
|
wx.grid.EVT_GRID_SELECT_CELL, self.resultSelected, self.resultGrid
|
|
|
)
|
|
)
|
|
|
|
|
+ self.resultContainer.Add(self.resultGrid)
|
|
|
|
|
|
|
|
# Paginator
|
|
# Paginator
|
|
|
self.pgPrevBt = wx.Button(
|
|
self.pgPrevBt = wx.Button(
|
|
|
- parent=self, id=wx.ID_ANY, pos=(580, 30), size=(40, 50),
|
|
|
|
|
|
|
+ parent=self, id=wx.ID_ANY, pos=(530, 30), size=(40, 50),
|
|
|
style=wx.LC_REPORT, label="Prev\npage"
|
|
style=wx.LC_REPORT, label="Prev\npage"
|
|
|
)
|
|
)
|
|
|
|
|
+ self.resultContainer.Add(self.pgPrevBt)
|
|
|
self.resultsPageIndicator = wx.StaticText(
|
|
self.resultsPageIndicator = wx.StaticText(
|
|
|
- parent=self,id=wx.ID_ANY, pos=(580, 80), size=(40, 15),
|
|
|
|
|
|
|
+ parent=self,id=wx.ID_ANY, pos=(530, 80), size=(40, 15),
|
|
|
style=wx.ALIGN_CENTRE_HORIZONTAL, label="1/1"
|
|
style=wx.ALIGN_CENTRE_HORIZONTAL, label="1/1"
|
|
|
)
|
|
)
|
|
|
|
|
+ self.resultContainer.Add(self.resultsPageIndicator)
|
|
|
self.pgNextBt = wx.Button(
|
|
self.pgNextBt = wx.Button(
|
|
|
- parent=self, id=wx.ID_ANY, pos=(580, 100), size=(40, 50),
|
|
|
|
|
|
|
+ parent=self, id=wx.ID_ANY, pos=(530, 100), size=(40, 50),
|
|
|
style=wx.LC_REPORT, label="Next\npage"
|
|
style=wx.LC_REPORT, label="Next\npage"
|
|
|
)
|
|
)
|
|
|
|
|
+ self.resultContainer.Add(self.pgNextBt)
|
|
|
self.Bind(wx.EVT_BUTTON, self.pgPrev, self.pgPrevBt)
|
|
self.Bind(wx.EVT_BUTTON, self.pgPrev, self.pgPrevBt)
|
|
|
self.Bind(wx.EVT_BUTTON, self.pgNext, self.pgNextBt)
|
|
self.Bind(wx.EVT_BUTTON, self.pgNext, self.pgNextBt)
|
|
|
|
|
|
|
|
- # Contains all thigs to be shown once a result is selected
|
|
|
|
|
- self.resultContent = wx.BoxSizer(wx.VERTICAL)
|
|
|
|
|
-
|
|
|
|
|
# Stats table
|
|
# Stats table
|
|
|
self.statGrid = wx.grid.Grid(
|
|
self.statGrid = wx.grid.Grid(
|
|
|
- parent=self, id=wx.ID_ANY, pos=(650, 30),
|
|
|
|
|
- size=(205, 220), style=wx.LC_REPORT
|
|
|
|
|
|
|
+ parent=self, id=wx.ID_ANY, pos=(0, 210),
|
|
|
|
|
+ size=(185, 220), style=wx.LC_REPORT
|
|
|
)
|
|
)
|
|
|
self.statGrid.CreateGrid(
|
|
self.statGrid.CreateGrid(
|
|
|
numRows=10, numCols=2,
|
|
numRows=10, numCols=2,
|
|
@@ -237,27 +254,27 @@ class PanelResults(wx.Panel):
|
|
|
runeListBox = [
|
|
runeListBox = [
|
|
|
wx.StaticBox(
|
|
wx.StaticBox(
|
|
|
parent=self, label="Slot1:",id=wx.ID_ANY,
|
|
parent=self, label="Slot1:",id=wx.ID_ANY,
|
|
|
- pos=(200, 255), size=(140, 160)
|
|
|
|
|
|
|
+ pos=(350, 210), size=(140, 160)
|
|
|
),
|
|
),
|
|
|
wx.StaticBox(
|
|
wx.StaticBox(
|
|
|
parent=self, label="Slot2:",id=wx.ID_ANY,
|
|
parent=self, label="Slot2:",id=wx.ID_ANY,
|
|
|
- pos=(350, 255), size=(140, 160)
|
|
|
|
|
|
|
+ pos=(500, 210), size=(140, 160)
|
|
|
),
|
|
),
|
|
|
wx.StaticBox(
|
|
wx.StaticBox(
|
|
|
parent=self, label="Slot3:",id=wx.ID_ANY,
|
|
parent=self, label="Slot3:",id=wx.ID_ANY,
|
|
|
- pos=(350, 420), size=(140, 160)
|
|
|
|
|
|
|
+ pos=(500, 375), size=(140, 160)
|
|
|
),
|
|
),
|
|
|
wx.StaticBox(
|
|
wx.StaticBox(
|
|
|
parent=self, label="Slot4:",id=wx.ID_ANY,
|
|
parent=self, label="Slot4:",id=wx.ID_ANY,
|
|
|
- pos=(200, 420), size=(140, 160)
|
|
|
|
|
|
|
+ pos=(350, 375), size=(140, 160)
|
|
|
),
|
|
),
|
|
|
wx.StaticBox(
|
|
wx.StaticBox(
|
|
|
parent=self, label="Slot5:",id=wx.ID_ANY,
|
|
parent=self, label="Slot5:",id=wx.ID_ANY,
|
|
|
- pos=(50, 420), size=(140, 160)
|
|
|
|
|
|
|
+ pos=(200, 375), size=(140, 160)
|
|
|
),
|
|
),
|
|
|
wx.StaticBox(
|
|
wx.StaticBox(
|
|
|
parent=self, label="Slot6:",id=wx.ID_ANY,
|
|
parent=self, label="Slot6:",id=wx.ID_ANY,
|
|
|
- pos=(50, 255), size=(140, 160)
|
|
|
|
|
|
|
+ pos=(200, 210), size=(140, 160)
|
|
|
)
|
|
)
|
|
|
]
|
|
]
|
|
|
for i in range(0, 6):
|
|
for i in range(0, 6):
|
|
@@ -523,16 +540,17 @@ class PanelResults(wx.Panel):
|
|
|
|
|
|
|
|
# Action buttons
|
|
# Action buttons
|
|
|
applyBt = wx.Button(
|
|
applyBt = wx.Button(
|
|
|
- parent=self, id=wx.ID_ANY, pos=(650, 330), size=(165, 60),
|
|
|
|
|
|
|
+ parent=self, id=wx.ID_ANY, pos=(10, 450), size=(165, 60),
|
|
|
style=wx.LC_REPORT, label="Apply runes"
|
|
style=wx.LC_REPORT, label="Apply runes"
|
|
|
)
|
|
)
|
|
|
self.Bind(wx.EVT_BUTTON, self.applyRunes, applyBt)
|
|
self.Bind(wx.EVT_BUTTON, self.applyRunes, applyBt)
|
|
|
self.resultContent.Add(applyBt)
|
|
self.resultContent.Add(applyBt)
|
|
|
|
|
|
|
|
- # By default, hide everything
|
|
|
|
|
|
|
+ # By default, hide everything TODO
|
|
|
|
|
+ self.resultContainer.ShowItems(False)
|
|
|
self.resultContent.ShowItems(False)
|
|
self.resultContent.ShowItems(False)
|
|
|
|
|
|
|
|
- def processResults(self, jsonData):
|
|
|
|
|
|
|
+ def processResults(self, unitId=None, jsonData=""):
|
|
|
"""Processes data obtained from RuneOptimizer.
|
|
"""Processes data obtained from RuneOptimizer.
|
|
|
|
|
|
|
|
Reads the JSON data and initializes the property data.
|
|
Reads the JSON data and initializes the property data.
|
|
@@ -545,6 +563,41 @@ class PanelResults(wx.Panel):
|
|
|
|
|
|
|
|
"""
|
|
"""
|
|
|
|
|
|
|
|
|
|
+ if unitId != None:
|
|
|
|
|
+ self.unitId = unitId
|
|
|
|
|
+ cursor = conn.execute("""
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ current_hp,
|
|
|
|
|
+ current_atk,
|
|
|
|
|
+ current_def,
|
|
|
|
|
+ current_spd,
|
|
|
|
|
+ current_crr,
|
|
|
|
|
+ current_crd,
|
|
|
|
|
+ current_res,
|
|
|
|
|
+ current_acc,
|
|
|
|
|
+ name
|
|
|
|
|
+ FROM units
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ id = '""" + unitId + """';
|
|
|
|
|
+ """)
|
|
|
|
|
+ row = cursor.fetchone()
|
|
|
|
|
+ self.unitName = row[8]
|
|
|
|
|
+ for i in range(0, 8):
|
|
|
|
|
+ self.unitStats[i] = row[i]
|
|
|
|
|
+ # Calculate EHP and DMG
|
|
|
|
|
+ hp = row[0]
|
|
|
|
|
+ dfc = row[2]
|
|
|
|
|
+ ehp = math.ceil((((dfc * 3.5) + 1140) * hp) / 1000)
|
|
|
|
|
+ self.unitStats[8] = ehp
|
|
|
|
|
+ atk = row[1]
|
|
|
|
|
+ crr = row[4]
|
|
|
|
|
+ crd = row[5]
|
|
|
|
|
+ dmg = math.ceil(
|
|
|
|
|
+ (atk * (100 - crr) / 100) +
|
|
|
|
|
+ ((atk + (atk * crd / 100)) * crr / 100)
|
|
|
|
|
+ )
|
|
|
|
|
+ self.unitStats[9] = dmg
|
|
|
|
|
+
|
|
|
self.data = json.loads(
|
|
self.data = json.loads(
|
|
|
jsonData,
|
|
jsonData,
|
|
|
object_hook=lambda d: SimpleNamespace(**d)
|
|
object_hook=lambda d: SimpleNamespace(**d)
|
|
@@ -586,18 +639,6 @@ class PanelResults(wx.Panel):
|
|
|
self.page += 1
|
|
self.page += 1
|
|
|
self.printResults()
|
|
self.printResults()
|
|
|
|
|
|
|
|
- def closeWindow(self, event):
|
|
|
|
|
- """Closes the window.
|
|
|
|
|
-
|
|
|
|
|
- Parameters
|
|
|
|
|
- ----------
|
|
|
|
|
- event : wxEvent, optional
|
|
|
|
|
- The event that triggered the call (default is None).
|
|
|
|
|
-
|
|
|
|
|
- """
|
|
|
|
|
-
|
|
|
|
|
- self.Close(True)
|
|
|
|
|
-
|
|
|
|
|
def applyRunes(self, event):
|
|
def applyRunes(self, event):
|
|
|
"""Applies the selected results and saves data to the database.
|
|
"""Applies the selected results and saves data to the database.
|
|
|
|
|
|
|
@@ -614,8 +655,8 @@ class PanelResults(wx.Panel):
|
|
|
# TODO: Show error
|
|
# TODO: Show error
|
|
|
return;
|
|
return;
|
|
|
print("self.selectedResultIndex: " + str(self.selectedResultIndex))
|
|
print("self.selectedResultIndex: " + str(self.selectedResultIndex))
|
|
|
- for i in range(0, 6):
|
|
|
|
|
- print(self.data.results[self.selectedResultIndex].runes[i])
|
|
|
|
|
|
|
+ #for i in range(0, 6):
|
|
|
|
|
+ # print(self.data.results[self.selectedResultIndex].runes[i])
|
|
|
# First, unassign all runes currently assigned to the unit
|
|
# First, unassign all runes currently assigned to the unit
|
|
|
cursor = conn.execute(
|
|
cursor = conn.execute(
|
|
|
"""
|
|
"""
|
|
@@ -668,7 +709,7 @@ class PanelResults(wx.Panel):
|
|
|
recalculteStatsOfModifiedUnits()
|
|
recalculteStatsOfModifiedUnits()
|
|
|
print("All recalculated!")
|
|
print("All recalculated!")
|
|
|
|
|
|
|
|
- # Fetch the new values for self.currentStats
|
|
|
|
|
|
|
+ # Fetch the new values for self.unitStats
|
|
|
cursor = conn.execute(
|
|
cursor = conn.execute(
|
|
|
"""
|
|
"""
|
|
|
SELECT
|
|
SELECT
|
|
@@ -689,18 +730,18 @@ class PanelResults(wx.Panel):
|
|
|
)
|
|
)
|
|
|
row = cursor.fetchone()
|
|
row = cursor.fetchone()
|
|
|
for i in range(0, 8):
|
|
for i in range(0, 8):
|
|
|
- self.currentStats[i] = int(row[i])
|
|
|
|
|
- self.currentStats[9] = math.ceil(
|
|
|
|
|
- (((self.currentStats[2] * 3.5) + 1140) * self.currentStats[0]) / 1000
|
|
|
|
|
|
|
+ self.unitStats[i] = int(row[i])
|
|
|
|
|
+ self.unitStats[9] = math.ceil(
|
|
|
|
|
+ (((self.unitStats[2] * 3.5) + 1140) * self.unitStats[0]) / 1000
|
|
|
)
|
|
)
|
|
|
- self.currentStats[10] = math.ceil(
|
|
|
|
|
- (self.currentStats[1] * (100 - self.currentStats[4]) / 100) +
|
|
|
|
|
|
|
+ self.unitStats[10] = math.ceil(
|
|
|
|
|
+ (self.unitStats[1] * (100 - self.unitStats[4]) / 100) +
|
|
|
(
|
|
(
|
|
|
(
|
|
(
|
|
|
- self.currentStats[1] +
|
|
|
|
|
- (self.currentStats[1] * self.currentStats[5] / 100)
|
|
|
|
|
|
|
+ self.unitStats[1] +
|
|
|
|
|
+ (self.unitStats[1] * self.unitStats[5] / 100)
|
|
|
) *
|
|
) *
|
|
|
- self.currentStats[4] / 100
|
|
|
|
|
|
|
+ self.unitStats[4] / 100
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|
|
|
self.resultSelected(None)
|
|
self.resultSelected(None)
|
|
@@ -746,6 +787,12 @@ class PanelResults(wx.Panel):
|
|
|
for j in range(0, 11):
|
|
for j in range(0, 11):
|
|
|
self.resultGrid.SetCellValue(row=i, col=j, s="")
|
|
self.resultGrid.SetCellValue(row=i, col=j, s="")
|
|
|
|
|
|
|
|
|
|
+ # Display the unit name
|
|
|
|
|
+ self.unitNameLabel.SetLabel(self.unitName + " #" + self.unitId)
|
|
|
|
|
+
|
|
|
|
|
+ # Make the table visible
|
|
|
|
|
+ self.resultContainer.ShowItems(True)
|
|
|
|
|
+
|
|
|
def resultSelected(self, event):
|
|
def resultSelected(self, event):
|
|
|
"""Populates and shows the runes and effective stats with the
|
|
"""Populates and shows the runes and effective stats with the
|
|
|
currently seleced result.
|
|
currently seleced result.
|
|
@@ -766,7 +813,7 @@ class PanelResults(wx.Panel):
|
|
|
s=str(self.data.results[self.selectedResultIndex].hp) + " "
|
|
s=str(self.data.results[self.selectedResultIndex].hp) + " "
|
|
|
)
|
|
)
|
|
|
diff = \
|
|
diff = \
|
|
|
- self.data.results[self.selectedResultIndex].hp - self.currentStats[0]
|
|
|
|
|
|
|
+ self.data.results[self.selectedResultIndex].hp - self.unitStats[0]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=0, col=1, s="- " + str(abs(diff)) + " "
|
|
row=0, col=1, s="- " + str(abs(diff)) + " "
|
|
@@ -789,7 +836,7 @@ class PanelResults(wx.Panel):
|
|
|
s=str(self.data.results[self.selectedResultIndex].atk) + " "
|
|
s=str(self.data.results[self.selectedResultIndex].atk) + " "
|
|
|
)
|
|
)
|
|
|
diff = \
|
|
diff = \
|
|
|
- self.data.results[self.selectedResultIndex].atk - self.currentStats[1]
|
|
|
|
|
|
|
+ self.data.results[self.selectedResultIndex].atk - self.unitStats[1]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=1, col=1, s="- " + str(abs(diff)) + " "
|
|
row=1, col=1, s="- " + str(abs(diff)) + " "
|
|
@@ -810,7 +857,7 @@ class PanelResults(wx.Panel):
|
|
|
s=str(self.data.results[self.selectedResultIndex].dfc) + " "
|
|
s=str(self.data.results[self.selectedResultIndex].dfc) + " "
|
|
|
)
|
|
)
|
|
|
diff = \
|
|
diff = \
|
|
|
- self.data.results[self.selectedResultIndex].atk - self.currentStats[2]
|
|
|
|
|
|
|
+ self.data.results[self.selectedResultIndex].atk - self.unitStats[2]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=2, col=1, s="- " + str(abs(diff)) + " "
|
|
row=2, col=1, s="- " + str(abs(diff)) + " "
|
|
@@ -833,7 +880,7 @@ class PanelResults(wx.Panel):
|
|
|
s=str(self.data.results[self.selectedResultIndex].spd) + " "
|
|
s=str(self.data.results[self.selectedResultIndex].spd) + " "
|
|
|
)
|
|
)
|
|
|
diff = \
|
|
diff = \
|
|
|
- self.data.results[self.selectedResultIndex].spd - self.currentStats[3]
|
|
|
|
|
|
|
+ self.data.results[self.selectedResultIndex].spd - self.unitStats[3]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=3, col=1, s="- " + str(abs(diff)) + " "
|
|
row=3, col=1, s="- " + str(abs(diff)) + " "
|
|
@@ -857,7 +904,7 @@ class PanelResults(wx.Panel):
|
|
|
s=str(self.data.results[self.selectedResultIndex].crr) + "%"
|
|
s=str(self.data.results[self.selectedResultIndex].crr) + "%"
|
|
|
)
|
|
)
|
|
|
diff = \
|
|
diff = \
|
|
|
- self.data.results[self.selectedResultIndex].crr - self.currentStats[4]
|
|
|
|
|
|
|
+ self.data.results[self.selectedResultIndex].crr - self.unitStats[4]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=4, col=1, s="- " + str(abs(diff)) + "%"
|
|
row=4, col=1, s="- " + str(abs(diff)) + "%"
|
|
@@ -878,7 +925,7 @@ class PanelResults(wx.Panel):
|
|
|
s=str(self.data.results[self.selectedResultIndex].crd) + "%"
|
|
s=str(self.data.results[self.selectedResultIndex].crd) + "%"
|
|
|
)
|
|
)
|
|
|
diff = \
|
|
diff = \
|
|
|
- self.data.results[self.selectedResultIndex].crd - self.currentStats[5]
|
|
|
|
|
|
|
+ self.data.results[self.selectedResultIndex].crd - self.unitStats[5]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=5, col=1, s="- " + str(abs(diff)) + "%"
|
|
row=5, col=1, s="- " + str(abs(diff)) + "%"
|
|
@@ -901,7 +948,7 @@ class PanelResults(wx.Panel):
|
|
|
s=str(self.data.results[self.selectedResultIndex].res) + "%"
|
|
s=str(self.data.results[self.selectedResultIndex].res) + "%"
|
|
|
)
|
|
)
|
|
|
diff = \
|
|
diff = \
|
|
|
- self.data.results[self.selectedResultIndex].res - self.currentStats[6]
|
|
|
|
|
|
|
+ self.data.results[self.selectedResultIndex].res - self.unitStats[6]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=6, col=1, s="- " + str(abs(diff)) + "%"
|
|
row=6, col=1, s="- " + str(abs(diff)) + "%"
|
|
@@ -921,7 +968,7 @@ class PanelResults(wx.Panel):
|
|
|
row=7, col=0, s=str(self.data.results[self.selectedResultIndex].acc) + "%"
|
|
row=7, col=0, s=str(self.data.results[self.selectedResultIndex].acc) + "%"
|
|
|
)
|
|
)
|
|
|
diff = \
|
|
diff = \
|
|
|
- self.data.results[self.selectedResultIndex].acc - self.currentStats[7]
|
|
|
|
|
|
|
+ self.data.results[self.selectedResultIndex].acc - self.unitStats[7]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=7, col=1, s="- " + str(abs(diff)) + "%"
|
|
row=7, col=1, s="- " + str(abs(diff)) + "%"
|
|
@@ -944,7 +991,7 @@ class PanelResults(wx.Panel):
|
|
|
s=str(self.data.results[self.selectedResultIndex].ehp) + " "
|
|
s=str(self.data.results[self.selectedResultIndex].ehp) + " "
|
|
|
)
|
|
)
|
|
|
diff = \
|
|
diff = \
|
|
|
- self.data.results[self.selectedResultIndex].ehp - self.currentStats[8]
|
|
|
|
|
|
|
+ self.data.results[self.selectedResultIndex].ehp - self.unitStats[8]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=8, col=1, s="- " + str(abs(diff)) + " "
|
|
row=8, col=1, s="- " + str(abs(diff)) + " "
|
|
@@ -966,7 +1013,7 @@ class PanelResults(wx.Panel):
|
|
|
row=9, col=0,
|
|
row=9, col=0,
|
|
|
s=str(self.data.results[self.selectedResultIndex].dmg) + " "
|
|
s=str(self.data.results[self.selectedResultIndex].dmg) + " "
|
|
|
)
|
|
)
|
|
|
- diff = self.data.results[self.selectedResultIndex].dmg - self.currentStats[9]
|
|
|
|
|
|
|
+ diff = self.data.results[self.selectedResultIndex].dmg - self.unitStats[9]
|
|
|
if (diff < 0):
|
|
if (diff < 0):
|
|
|
self.statGrid.SetCellValue(
|
|
self.statGrid.SetCellValue(
|
|
|
row=9, col=1, s="- " + str(abs(diff)) + " "
|
|
row=9, col=1, s="- " + str(abs(diff)) + " "
|
|
@@ -1074,3 +1121,6 @@ class PanelResults(wx.Panel):
|
|
|
else: # normal stats
|
|
else: # normal stats
|
|
|
self.runeStats[i][slot - 1].SetLabel(line)
|
|
self.runeStats[i][slot - 1].SetLabel(line)
|
|
|
i += 1
|
|
i += 1
|
|
|
|
|
+
|
|
|
|
|
+ # Make the info visible
|
|
|
|
|
+ self.resultContent.ShowItems(True)
|