This commit is contained in:
yoncodes
2025-10-28 21:21:28 -04:00
commit e58fd190b4
2962 changed files with 3063199 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
use bd2::prost::Message;
use bd2::proto::proto_net::{SupporterBorrowRequest, SupporterBorrowResponse, Notify };
use common::packet_code::PacketCodeType;
use crypto::network::GameResponse;
use sqlx::SqlitePool;
use tracing::info;
pub async fn handle(_pool: &SqlitePool, _uid: i64, req: SupporterBorrowRequest) -> GameResponse {
info!("Handling SupporterBorrowRequest: {:?}", req);
// TODO: Fetch data from database
// Example:
// let data = get_something(pool, uid).await.unwrap_or_default();
// TODO: Transform to proto
// Example:
// let proto_data = data.into_iter()
// .map(|item| mapper::to_proto(item, pool).await)
// .collect();
let response = SupporterBorrowResponse {
// TODO: Fill in response fields
..Default::default()
};
let resp_bytes = response.encode_to_vec();
let notify = Notify {
achievement_update_info: vec![],
mission_update_info: vec![],
event_mission_update_info: vec![],
active_login_event: vec![1, 2, 625, 626, 627],
active_contents_info: vec![],
ll_type: Some("".to_string()),
is_purchasing_disabled: Some(false),
maintenance_start_date: Some(1688646600000),
notice_last_seq: Some(8818),
..Default::default()
};
let (route, code) = PacketCodeType::SupporterBorrow.info();
GameResponse::success(route, &resp_bytes, code).with_notify(&notify)
}