초기커밋
This commit is contained in:
38
GameServer/Contents/Buff/Helper/BuffHelper.cs
Normal file
38
GameServer/Contents/Buff/Helper/BuffHelper.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user