You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OMS.NET/Instructs/GetMapDataInstruct.cs

36 lines
909 B
C#

using OMS.NET.DbClass;
namespace OMS.NET.Instructs
{
public class GetMapDataInstruct : Instruct
{
public GetMapDataInstruct()
{
this.Type = "get_mapData";
}
public override Task Handler(string wsid)
{
return Task.Run(() =>
{
if (GlobalArea.LoginCheckByID(wsid))
{
List<MapData> mapDatas = MapData.GetMapDataList().Where(m => m.Phase != 2).ToList();
this.ResponseOrBroadcastInstructs.Add(new SendMapDataInstruct()
{
IsResponse = true,
Data = mapDatas
});
}
});
}
}
public class SendMapDataInstruct : Instruct
{
public SendMapDataInstruct()
{
this.Type = "send_mapData";
}
}
}