1
0
forked from Hay1tsme/artemis

chuni: added use_login_bonus check to UserLoginBonusApi

This commit is contained in:
Dniel97 2023-03-28 18:54:27 +02:00
parent 1aa92458f4
commit 571a691e0e
Signed by untrusted user: Dniel97
GPG Key ID: 6180B3C768FB2E08

View File

@ -396,7 +396,8 @@ class ChuniBase:
def handle_get_user_login_bonus_api_request(self, data: Dict) -> Dict:
user_id = data["userId"]
user_login_bonus = self.data.item.get_all_login_bonus(user_id, self.version)
if user_login_bonus is None:
# ignore the loginBonus request if its disabled in config
if user_login_bonus is None or not self.game_cfg.mods.use_login_bonus:
return {"userId": user_id, "length": 0, "userLoginBonusList": []}
user_login_list = []