using System.Collections.Generic; namespace ET { [FriendClass(typeof(Construct))] public static class ConstructHelper { public static void NtfUpdateConstructProgress(Unit unit,ConstructComponent cs) { var msg = new M2C_NotifyUpdateConstructProgress(); foreach (var v in cs.Children.Values) { msg.Ks.Add(((Construct)v).Id); msg.Vs.Add(((Construct)v).Progress); } if (msg.Ks.Count > 0) { MessageHelper.SendToClient(unit, msg); } } public static void NotifyConstructFinish(Unit unit, long id, long buildingId,long childId) { MessageHelper.SendToClient(unit,new M2C_NotifyConstructFinish(){ConstructId = id, BuildingId = buildingId,ChildId = childId}); } } }