use crate::logic::role::Avatar;

use super::*;

pub async fn on_get_avatar_data(
    _session: &NetSession,
    player: &mut Player,
    _req: GetAvatarDataCsReq,
) -> NetResult<GetAvatarDataScRsp> {
    Ok(GetAvatarDataScRsp {
        retcode: Retcode::RetSucc.into(),
        avatar_list: player
            .role_model
            .avatar_list
            .iter()
            .map(Avatar::to_client)
            .collect(),
    })
}

pub async fn on_get_buddy_data(
    _session: &NetSession,
    _player: &mut Player,
    _req: GetBuddyDataCsReq,
) -> NetResult<GetBuddyDataScRsp> {
    Ok(GetBuddyDataScRsp {
        retcode: Retcode::RetSucc.into(),
        ..Default::default()
    })
}
