mirror of
https://github.com/yoncodes/BD2PS.git
synced 2026-08-05 06:12:14 +02:00
pushing
This commit is contained in:
45
gameserver/src/logic/game/season_reward_info.rs
Normal file
45
gameserver/src/logic/game/season_reward_info.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
use bd2::prost::Message;
|
||||
use bd2::proto::proto_net::{
|
||||
Notify, SeasonRewardDbInfo, SeasonRewardInfoRequest, SeasonRewardInfoResponse,
|
||||
};
|
||||
use common::packet_code::PacketCodeType;
|
||||
use crypto::network::GameResponse;
|
||||
use sqlx::SqlitePool;
|
||||
use tracing::info;
|
||||
|
||||
pub async fn handle(_pool: &SqlitePool, _uid: i64, req: SeasonRewardInfoRequest) -> GameResponse {
|
||||
info!("Handling SeasonRewardInfoRequest: {:?}", req);
|
||||
|
||||
let reward_info = vec![
|
||||
SeasonRewardDbInfo {
|
||||
pack_id: Some(3003),
|
||||
season: Some(57),
|
||||
is_reward_received: Some(true),
|
||||
},
|
||||
SeasonRewardDbInfo {
|
||||
pack_id: Some(3001),
|
||||
season: Some(112),
|
||||
is_reward_received: Some(true),
|
||||
},
|
||||
];
|
||||
|
||||
let response = SeasonRewardInfoResponse { reward_info };
|
||||
|
||||
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, 628, 629],
|
||||
active_contents_info: vec![],
|
||||
ll_type: Some("".to_string()),
|
||||
is_purchasing_disabled: Some(false),
|
||||
maintenance_start_date: Some(1688646600000),
|
||||
notice_last_seq: Some(8909),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let (route, code) = PacketCodeType::Common.info();
|
||||
GameResponse::success(route, &resp_bytes, code).with_notify(¬ify)
|
||||
}
|
||||
Reference in New Issue
Block a user