From 0eee2e92a8437ae242892750c929a2c70e9326db Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Sun, 19 Nov 2023 11:43:46 -0500 Subject: [PATCH] wacca: fix bad items being given --- titles/wacca/base.py | 19 +++++-------------- titles/wacca/lily.py | 12 ++++++++++-- titles/wacca/reverse.py | 7 +++++++ 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/titles/wacca/base.py b/titles/wacca/base.py index 73cb132..dd3fe24 100644 --- a/titles/wacca/base.py +++ b/titles/wacca/base.py @@ -236,6 +236,11 @@ class WaccaBase: if profileId is None: return BaseResponse().make() + + if profileId == 0: + # We've already made this profile, just return success + new_user = self.data.profile.get_profile(aime_id=req.aimeId) + profileId = new_user['id'] # Insert starting items self.data.item.put_item(req.aimeId, WaccaConstants.ITEM_TYPES["title"], 104001) @@ -256,25 +261,11 @@ class WaccaBase: self.data.item.put_item( req.aimeId, WaccaConstants.ITEM_TYPES["note_sound"], 105001 ) - self.data.item.put_item( - req.aimeId, WaccaConstants.ITEM_TYPES["note_sound"], 205005 - ) # Added lily self.data.item.put_item( req.aimeId, WaccaConstants.ITEM_TYPES["navigator"], 210001 ) - self.data.item.put_item( - req.aimeId, WaccaConstants.ITEM_TYPES["user_plate"], 211001 - ) # Added lily - - self.data.item.put_item( - req.aimeId, WaccaConstants.ITEM_TYPES["touch_effect"], 312000 - ) # Added reverse - self.data.item.put_item( - req.aimeId, WaccaConstants.ITEM_TYPES["touch_effect"], 312001 - ) # Added reverse - return UserStatusCreateResponseV2(profileId, req.username).make() def handle_user_status_getDetail_request(self, data: Dict) -> Dict: diff --git a/titles/wacca/lily.py b/titles/wacca/lily.py index 937f66c..71ff27d 100644 --- a/titles/wacca/lily.py +++ b/titles/wacca/lily.py @@ -43,18 +43,26 @@ class WaccaLily(WaccaS): def handle_user_status_create_request(self, data: Dict) -> Dict: req = UserStatusCreateRequest(data) - super().handle_user_status_create_request(data) + ret = super().handle_user_status_create_request(data) new_user = self.data.profile.get_profile(aime_id=req.aimeId) if new_user is None: return BaseResponse().make() + + self.data.item.put_item( + req.aimeId, WaccaConstants.ITEM_TYPES["user_plate"], 211001 + ) # Added lily + + self.data.item.put_item( + req.aimeId, WaccaConstants.ITEM_TYPES["note_sound"], 205005 + ) # Added lily self.data.item.put_item( req.aimeId, WaccaConstants.ITEM_TYPES["navigator"], 210002 ) # Lily, Added Lily - return UserStatusCreateResponseV1(new_user['id'], new_user['username']).make() + return ret def handle_user_status_get_request(self, data: Dict) -> Dict: req = UserStatusGetRequest(data) diff --git a/titles/wacca/reverse.py b/titles/wacca/reverse.py index 557ac03..6206940 100644 --- a/titles/wacca/reverse.py +++ b/titles/wacca/reverse.py @@ -315,5 +315,12 @@ class WaccaReverse(WaccaLilyR): self.data.item.put_item( req.aimeId, WaccaConstants.ITEM_TYPES["navigator"], 310002 ) # Added reverse + + self.data.item.put_item( + req.aimeId, WaccaConstants.ITEM_TYPES["touch_effect"], 312000 + ) # Added reverse + self.data.item.put_item( + req.aimeId, WaccaConstants.ITEM_TYPES["touch_effect"], 312001 + ) # Added reverse return resp