1
0
mirror of synced 2024-11-28 07:50:48 +01:00

pokken: fix typo

This commit is contained in:
Kevin Trocolli 2023-07-23 12:47:37 -04:00
parent 20335aaebe
commit f417be671b
3 changed files with 13 additions and 4 deletions

View File

@ -15,6 +15,7 @@ class PokkenConstants:
AI = 2
LAN = 3
WAN = 4
TUTORIAL_3 = 7
class BATTLE_RESULT(Enum):
WIN = 1

View File

@ -39,7 +39,11 @@ class PokkenItemData(BaseData):
type=item_type,
)
result = self.execute(sql)
conflict = sql.on_duplicate_key_update(
content=content,
)
result = self.execute(conflict)
if result is None:
self.logger.warn(f"Failed to insert reward for user {user_id}: {category}-{content}-{item_type}")
return None

View File

@ -259,7 +259,7 @@ class PokkenProfileData(BaseData):
illustration_book_no=illust_no,
bp_point_atk=atk,
bp_point_res=res,
bp_point_defe=defe,
bp_point_def=defe,
bp_point_sp=sp,
)
@ -267,7 +267,7 @@ class PokkenProfileData(BaseData):
illustration_book_no=illust_no,
bp_point_atk=atk,
bp_point_res=res,
bp_point_defe=defe,
bp_point_def=defe,
bp_point_sp=sp,
)
@ -347,7 +347,11 @@ class PokkenProfileData(BaseData):
if result is None:
self.logger.warn(f"Failed to update stats for user {user_id}")
def update_support_team(self, user_id: int, support_id: int, support1: int = 4294967295, support2: int = 4294967295) -> None:
def update_support_team(self, user_id: int, support_id: int, support1: int = None, support2: int = None) -> None:
if support1 == 4294967295:
support1 = None
if support2 == 4294967295:
support2 = None
sql = update(profile).where(profile.c.user==user_id).values(
support_set_1_1=support1 if support_id == 1 else profile.c.support_set_1_1,
support_set_1_2=support2 if support_id == 1 else profile.c.support_set_1_2,