forked from Hay1tsme/artemis
pokken: fix typo
This commit is contained in:
parent
20335aaebe
commit
f417be671b
@ -15,6 +15,7 @@ class PokkenConstants:
|
|||||||
AI = 2
|
AI = 2
|
||||||
LAN = 3
|
LAN = 3
|
||||||
WAN = 4
|
WAN = 4
|
||||||
|
TUTORIAL_3 = 7
|
||||||
|
|
||||||
class BATTLE_RESULT(Enum):
|
class BATTLE_RESULT(Enum):
|
||||||
WIN = 1
|
WIN = 1
|
||||||
|
@ -39,7 +39,11 @@ class PokkenItemData(BaseData):
|
|||||||
type=item_type,
|
type=item_type,
|
||||||
)
|
)
|
||||||
|
|
||||||
result = self.execute(sql)
|
conflict = sql.on_duplicate_key_update(
|
||||||
|
content=content,
|
||||||
|
)
|
||||||
|
|
||||||
|
result = self.execute(conflict)
|
||||||
if result is None:
|
if result is None:
|
||||||
self.logger.warn(f"Failed to insert reward for user {user_id}: {category}-{content}-{item_type}")
|
self.logger.warn(f"Failed to insert reward for user {user_id}: {category}-{content}-{item_type}")
|
||||||
return None
|
return None
|
||||||
|
@ -259,7 +259,7 @@ class PokkenProfileData(BaseData):
|
|||||||
illustration_book_no=illust_no,
|
illustration_book_no=illust_no,
|
||||||
bp_point_atk=atk,
|
bp_point_atk=atk,
|
||||||
bp_point_res=res,
|
bp_point_res=res,
|
||||||
bp_point_defe=defe,
|
bp_point_def=defe,
|
||||||
bp_point_sp=sp,
|
bp_point_sp=sp,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ class PokkenProfileData(BaseData):
|
|||||||
illustration_book_no=illust_no,
|
illustration_book_no=illust_no,
|
||||||
bp_point_atk=atk,
|
bp_point_atk=atk,
|
||||||
bp_point_res=res,
|
bp_point_res=res,
|
||||||
bp_point_defe=defe,
|
bp_point_def=defe,
|
||||||
bp_point_sp=sp,
|
bp_point_sp=sp,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -347,7 +347,11 @@ class PokkenProfileData(BaseData):
|
|||||||
if result is None:
|
if result is None:
|
||||||
self.logger.warn(f"Failed to update stats for user {user_id}")
|
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(
|
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_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,
|
support_set_1_2=support2 if support_id == 1 else profile.c.support_set_1_2,
|
||||||
|
Loading…
Reference in New Issue
Block a user