fixing get_energy for CXB

This commit is contained in:
Midorica 2023-11-06 21:54:06 -05:00
parent 40e6c018e9
commit fbd12fd6e2

View File

@ -530,7 +530,6 @@ class CxbBase:
profile = self.data.profile.get_profile_index(0, uid, self.version) profile = self.data.profile.get_profile_index(0, uid, self.version)
data1 = profile["data"] data1 = profile["data"]
p = self.data.item.get_energy(uid) p = self.data.item.get_energy(uid)
energy = p["energy"]
if not p: if not p:
self.data.item.put_energy(uid, 5) self.data.item.put_energy(uid, 5)
@ -543,6 +542,7 @@ class CxbBase:
} }
array = [] array = []
energy = p["energy"]
newenergy = int(energy) + 5 newenergy = int(energy) + 5
self.data.item.put_energy(uid, newenergy) self.data.item.put_energy(uid, newenergy)