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
804 B
29 lines
804 B
3 years ago
|
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 NofityConstructFinish(Unit unit, long id)
|
||
|
{
|
||
|
MessageHelper.SendToClient(unit,new M2C_NotifyConstructFinish(){ConstructId = id});
|
||
|
}
|
||
|
}
|
||
|
}
|