You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
877 B

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});
}
}
}