artemis/titles/mai2/buddiesplus.py

70 lines
2.2 KiB
Python

from typing import Dict
from core.config import CoreConfig
from titles.mai2.buddies import Mai2Buddies
from titles.mai2.const import Mai2Constants
from titles.mai2.config import Mai2Config
class Mai2BuddiesPlus(Mai2Buddies):
def __init__(self, cfg: CoreConfig, game_cfg: Mai2Config) -> None:
super().__init__(cfg, game_cfg)
self.version = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS
async def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict:
user_data = await super().handle_cm_get_user_preview_api_request(data)
# hardcode lastDataVersion for CardMaker
user_data["lastDataVersion"] = "1.45.00"
return user_data
async def handle_get_game_weekly_data_api_request(self, data: Dict) -> Dict:
return {
"gameWeeklyData": {
"missionCategory": 0,
"updateDate": "2000-01-01 00:00:00",
"beforeDate": "2099-12-31 23:59:59"
}
}
async def handle_get_user_mission_data_api_request(self, data: Dict) -> Dict:
user_id = data["userId"]
return {
"userId": user_id,
"userWeeklyData":{
"lastLoginWeek": "1900/01/01",
"beforeLoginWeek": "1900/01/01",
"friendBonusFlag": False
},
"userMissionDataList":[]
}
async def handle_get_user_friend_bonus_api_request(self, data: Dict) -> Dict:
user_id = data["userId"]
return {
"userId": user_id,
"returnCode": 0,
"getMiles": 0
}
async def handle_get_user_friend_regist_api_request(self, data: Dict) -> Dict:
return {
"returnCode1": 0,
"returnCode2": 0
}
async def handle_get_user_shop_stock_api_request(self, data: Dict) -> Dict:
user_id = data["userId"]
return {
"userId": user_id,
"userShopStockList": []
}
async def handle_get_user_intimate_api_request(self, data: Dict) -> Dict:
user_id = data["userId"]
return {
"userId": user_id,
"length": 0,
"userIntimateList": []
}