mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-17 17:04:45 +01:00
39 lines
1018 B
C#
39 lines
1018 B
C#
namespace MoleMole.Config
|
|
{
|
|
[GeneratePartialHash(CombineGeneratedFile = true)]
|
|
public class OnSwitchChargeMixin : ConfigAbilityMixin, IHashable
|
|
{
|
|
public ConfigAbilityAction[] Actions = ConfigAbilityAction.EMPTY;
|
|
|
|
public string[] AfterSkillIDs;
|
|
|
|
public void ObjectContentHashOnto(ref int lastHash)
|
|
{
|
|
if (Actions != null)
|
|
{
|
|
ConfigAbilityAction[] actions = Actions;
|
|
foreach (ConfigAbilityAction configAbilityAction in actions)
|
|
{
|
|
if (configAbilityAction is IHashable)
|
|
{
|
|
HashUtils.ContentHashOnto((IHashable)configAbilityAction, ref lastHash);
|
|
}
|
|
}
|
|
}
|
|
if (AfterSkillIDs != null)
|
|
{
|
|
string[] afterSkillIDs = AfterSkillIDs;
|
|
foreach (string value in afterSkillIDs)
|
|
{
|
|
HashUtils.ContentHashOnto(value, ref lastHash);
|
|
}
|
|
}
|
|
}
|
|
|
|
public override BaseAbilityMixin CreateInstancedMixin(ActorAbility instancedAbility, ActorModifier instancedModifier)
|
|
{
|
|
return new AbilityOnSwitchChargeMixin(instancedAbility, instancedModifier, this);
|
|
}
|
|
}
|
|
}
|