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 toBuffData4Client(this BuffAttribute buffAttribute) { var buff_list_4_client = new List(); 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; } } }