33 lines
853 B
C#
33 lines
853 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
|
|||
|
{
|
|||
|
var attacker = args.attacker;
|
|||
|
var 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;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|