forked from Dniel97/artemis
wacca: fix type mismatch in user/music/unlock
This commit is contained in:
parent
5ddfb88182
commit
b9fd4f294d
@ -624,10 +624,10 @@ class WaccaBase:
|
||||
current_wp = profile["wp"]
|
||||
|
||||
tickets = self.data.item.get_tickets(user_id)
|
||||
new_tickets = []
|
||||
new_tickets: List[TicketItem] = []
|
||||
|
||||
for ticket in tickets:
|
||||
new_tickets.append([ticket["id"], ticket["ticket_id"], 9999999999])
|
||||
new_tickets.append(TicketItem(ticket["id"], ticket["ticket_id"], 9999999999))
|
||||
|
||||
for item in req.itemsUsed:
|
||||
if (
|
||||
@ -645,11 +645,11 @@ class WaccaBase:
|
||||
and not self.game_config.mods.infinite_tickets
|
||||
):
|
||||
for x in range(len(new_tickets)):
|
||||
if new_tickets[x][1] == item.itemId:
|
||||
if new_tickets[x].ticketId == item.itemId:
|
||||
self.logger.debug(
|
||||
f"Remove ticket ID {new_tickets[x][0]} type {new_tickets[x][1]} from {user_id}"
|
||||
f"Remove ticket ID {new_tickets[x].userTicketId} type {new_tickets[x].ticketId} from {user_id}"
|
||||
)
|
||||
self.data.item.spend_ticket(new_tickets[x][0])
|
||||
self.data.item.spend_ticket(new_tickets[x].userTicketId)
|
||||
new_tickets.pop(x)
|
||||
break
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user