Files
caliverse_server/GameServer/Contents/Buff/Helper/BuffHelper.cs
2025-05-01 07:20:41 +09:00

39 lines
964 B
C#

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using Google.Protobuf.WellKnownTypes;
using ServerCommon;
namespace GameServer
{
public static class BuffHelper
{
public static List<Buff> toBuffData4Client(this BuffAttribute buffAttribute)
{
var buff_list_4_client = new List<Buff>();
foreach (var buff_info in buffAttribute.BuffInfos)
{
foreach (var info in buff_info.Value)
{
Buff buff = new Buff();
buff.BuffId = (Int32)info.Value.BuffMetaID;
buff.BuffStartTime = info.Value.BuffStartTime.ToTimestamp();
buff_list_4_client.Add(buff);
}
}
return buff_list_4_client;
}
}
}