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

wacca: fix UserInfoUpdateRequest, per #5

This commit is contained in:
Hay1tsme 2023-03-03 13:03:48 -05:00
parent 524f99879f
commit 7953519e68
2 changed files with 15 additions and 3 deletions

View File

@ -840,3 +840,11 @@ class GateTutorialFlag:
self.tutorialId,
int(self.flagWatched)
]
class DateUpdate:
def __init__(self, date_id: int = 0, timestamp: int = 0) -> None:
self.id = date_id
self.timestamp = timestamp
def make(self) -> List:
return [self.id, self.timestamp]

View File

@ -1,7 +1,7 @@
from typing import List, Dict
from titles.wacca.handlers.base import BaseRequest, BaseResponse
from titles.wacca.handlers.helpers import UserOption
from titles.wacca.handlers.helpers import UserOption, DateUpdate
# ---user/info/update---
class UserInfoUpdateRequest(BaseRequest):
@ -9,13 +9,17 @@ class UserInfoUpdateRequest(BaseRequest):
super().__init__(data)
self.profileId = int(self.params[0])
self.optsUpdated: List[UserOption] = []
self.datesUpdated: List = self.params[3]
self.unknown2: List = self.params[2]
self.datesUpdated: List[DateUpdate] = []
self.favoritesAdded: List[int] = self.params[4]
self.favoritesRemoved: List[int] = self.params[5]
for x in self.params[2]:
for x in self.params[1]:
self.optsUpdated.append(UserOption(x[0], x[1]))
for x in self.params[3]:
self.datesUpdated.append(DateUpdate[x[0], x[1]])
# ---user/info/getMyroom--- TODO: Understand this better
class UserInfogetMyroomRequest(BaseRequest):
game_id = 0