mirror of
https://github.com/solero/houdini.git
synced 2024-11-25 06:57:24 +00:00
Fix add_card
quantity bug
This commit is contained in:
parent
613510f8f7
commit
18d6f7ed32
@ -193,15 +193,15 @@ class Penguin(Spheniscidae, penguin.Penguin):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
async def add_card(self, card, quantity=1, member_quantity=0):
|
async def add_card(self, card, quantity=0, member_quantity=0):
|
||||||
if card.id in self.cards:
|
if card.id in self.cards:
|
||||||
penguin_card = self.cards[card.id]
|
penguin_card = self.cards[card.id]
|
||||||
|
|
||||||
await penguin_card.update(
|
await penguin_card.update(
|
||||||
quantity=penguin_card.quantity + quantity,
|
quantity=penguin_card.quantity + quantity,
|
||||||
member_quantity=member_quantity).apply()
|
member_quantity=penguin_card.member_quantity + member_quantity).apply()
|
||||||
else:
|
else:
|
||||||
await self.cards.insert(card_id=card.id)
|
await self.cards.insert(card_id=card.id, quantity=quantity, member_quantity=member_quantity)
|
||||||
|
|
||||||
self.logger.info(f'{self.username} added \'{card.name}\' to their ninja deck')
|
self.logger.info(f'{self.username} added \'{card.name}\' to their ninja deck')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user