|
@@ -290,25 +290,25 @@ namespace XmdsCommonServer.Plugin.Editor
|
|
|
|
|
|
public override void DoAction(EventTriggerAdapter api, EventArguments args)
|
|
|
{
|
|
|
- var e = new BattleReportEventB2R();
|
|
|
- e.instanceId = api.ZoneAPI.UUID;
|
|
|
+ var e = new BattleReportEventB2R
|
|
|
+ {
|
|
|
+ instanceId = api.ZoneAPI.UUID
|
|
|
+ };
|
|
|
|
|
|
- using (var a = ListObjectPool<InstancePlayer>.AllocAutoRelease(api.ZoneAPI.AllPlayers))
|
|
|
+ // using (var a = ListObjectPool<InstancePlayer>.AllocAutoRelease(api.ZoneAPI.AllPlayers))
|
|
|
+ using (var a = ListObjectPool<InstanceUnit>.AllocAutoRelease(api.ZoneAPI.AllUnits))
|
|
|
{
|
|
|
e.data = new List<UnitBattleReportDetail>();
|
|
|
|
|
|
- foreach (var b in a)
|
|
|
+ foreach (var b in a.Where(b => b.Statistic.TotalDamage > 0 || b.Statistic.TotalHealing > 0))
|
|
|
{
|
|
|
- if(b.Statistic.TotalDamage>0 || b.Statistic.TotalHealing > 0)
|
|
|
+ e.data.Add(new UnitBattleReportDetail()
|
|
|
{
|
|
|
- e.data.Add(new UnitBattleReportDetail()
|
|
|
- {
|
|
|
- PlayerUUID = b.PlayerUUID,
|
|
|
- TotalDamage = (int)b.Statistic.TotalDamage,
|
|
|
- TotalHealing = (int)b.Statistic.TotalHealing,
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
+ PlayerUUID = b.PlayerUUID,
|
|
|
+ TemplateID = b.Info.TemplateID,
|
|
|
+ TotalDamage = (int)b.Statistic.TotalDamage,
|
|
|
+ TotalHealing = (int)b.Statistic.TotalHealing,
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
api.ZoneAPI.queueEvent(e);
|