Skip to content

Commit

Permalink
update player class also when updating player object.
Browse files Browse the repository at this point in the history
  • Loading branch information
uduntuntu committed Dec 14, 2015
1 parent 6ead03a commit e7c10e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def getPlayer():
return player

def updatePlayer(player):
sql = "SELECT Name,RoomID,HP,Points FROM ZL_Player"
sql = "SELECT Name,RoomID,HP,Points,Class FROM ZL_Player"
result = doQuery(sql)
sql = "Select ZL_Item.Name FROM ZL_Item " \
"WHERE ZL_Item.PlayerName = '{}'".format(result[0][0])
Expand All @@ -448,6 +448,7 @@ def updatePlayer(player):
player.roomID = result[0][1]
player.HP = result[0][2]
player.points = result[0][3]
player.playerClass = result[0][4]
inventory = []
for i in range(0,len(inv)):
inventory.append(inv[i][0])
Expand Down

0 comments on commit e7c10e4

Please sign in to comment.