33 lines
861 B
C#
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;
|
|
}
|
|
}
|
|
}
|