6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
32 lines
896 B
C#
32 lines
896 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using GameData;
|
|
using Server.Config;
|
|
|
|
namespace Server.Core
|
|
{
|
|
public class GameResHelper
|
|
{
|
|
public static GameMessage.ResData[] Convert(ResData[] resDatas, int num = 1)
|
|
{
|
|
GameMessage.ResData[] result = new GameMessage.ResData[resDatas.Length];
|
|
for (int i = 0; i < resDatas.Length; i++)
|
|
{
|
|
result[i] = resDatas[i].Convert(num);
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
public static List<GameMessage.ResData> Convert(List<ResData> resDatas)
|
|
{
|
|
List<GameMessage.ResData> result = new List<GameMessage.ResData>();
|
|
foreach (var resData in resDatas)
|
|
{
|
|
result.Add(resData.Convert());
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|
|
} |