zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Server/Hotfix/Game/Event/Battle/TreatEventEvent.cs

33 lines
861 B
C#

using ET.EventType;
using System;
using System.Collections.Generic;
namespace ET
{
public class TreatEventEvent : AEvent<TreatEvent>
{
public override async ETTask Run(TreatEvent args)
{
try
{
Unit attacker = args.attacker;
BattleBase battleBase = BattleMgrCompnent.Instance.GetBattle(attacker);
if (battleBase == null)
{
Log.Error($"battleBase is null");
return;
}
if (battleBase is FamilyBossBattle battle)
{
battle.ChangeTreatData(attacker, args.treat);
}
}
catch (Exception e)
{
Log.Error(e);
}
await ETTask.CompletedTask;
}
}
}