using System.Collections.Generic;
using Gameplay.Net;
using NLDPB;
public partial class LegionManager
{
///
/// 缓存的服务器下发军团列表信息数据 LegionInfoData
///
public List NetLegionInfoDataList;
///
/// 缓存服务器下发军团Base数据
///
public Lg_Clt_LegionBase NetLegionBaseData;
public readonly List NetLegionApplyDataList = new List();
public readonly List NetLegionMemberList = new();
public void _RegisterNetAck()
{
}
public void _UnregisterNetAck()
{
}
///
/// 解析服务器下发LegionData数据
///
private Legion _ParseLegionData(MSG_LegionData legionData)
{
var legion = new Legion(legionData);
return legion;
}
private Legion _ParseLegionData(Lg_Clt_LegionBase legionData)
{
var legion = new Legion(legionData);
return legion;
}
#region API
///
/// 请求军团详细信息
///
public void ReqLegionInfo(uint id)
{
if (id > 0)
{
//NetHelper.ReqLegionInfo(id);
}
}
///
/// 请求创建军团
///
public void ReqCreateLegion(Legion legion)
{
var legionData = _TranslateLegion(legion);
if (legionData.Id != 0)
{
DebugUtil.LogError($"创建军团数据有误,ID:{legionData.Id}");
return;
}
NetHelper.ReqCreateLegion(legionData);
}
///
/// 请求存储军团信息,编辑军团信息
///
public void ReqSaveLegionInfo(Legion legion)
{
if (legion.ID == 0)
{
DebugUtil.LogError($"编辑军团数据有误,ID:{legion.ID}");
return;
}
var legionData = _TranslateLegion(legion);
NetHelper.ReqSaveEditLegion(legionData);
}
///
/// 根据页数请求军团列表信息
///
///
public void ReqLegionListByPage(int page)
{
NetHelper.ReqLegionListByPage((uint)page);
}
///
/// 根据key搜索军团列表信息
///
///
public void ReqLegionListByKey(string key)
{
NetHelper.ReqLegionListByKey(key);
}
///
/// 获取军团战绩
///
///
public void ReqLegionRecord(uint id)
{
}
///
/// 请求加入军团
///
///
public void ReqJoinLegion(uint id)
{
if (id > 0)
{
NetHelper.ReqJoinLegion(id);
}
}
///
/// 请求退出军团
///
///
public void ReqLeaveLegion()
{
NetHelper.ReqLeaveLegion();
}
///
/// 请求编辑加入申请
///
///
///
public void ReqExamineApply(uint id, LegionExamineStatus status)
{
NetHelper.ReqExamineApply(id, (uint)status);
}
///
/// 团长请求申请加入玩家列表
///
public void ReqApplyList()
{
NetHelper.ReqApplyList();
}
///
/// 请求编辑成员
///
public void ReqEditMember()
{
}
#endregion
}