public StatusEffectAttributesWrapper(StatusEffectAttributes other) : base(other.Name)
 {
     Lifetime = other.Lifetime;
     Duration = other.Duration;
     WeaponFireTriggerEndEvent = other.WeaponFireTriggerEndEvent;
     MaxStacks            = other.MaxStacks;
     StackingBehaviour    = other.StackingBehaviour;
     BuffsToApplyToTarget = other.BuffsToApplyToTarget?.ToArray();
     UnitTypeBuffsToApply = other.UnitTypeBuffsToApply?.ToArray();
     Modifiers            = other.Modifiers?.ToArray();
 }
Пример #2
0
        protected void OutputForStatusEffect(StatusEffectAttributes statusEffect)
        {
            Print($"lifetime: {statusEffect.Lifetime}");
            Print($"duration: {statusEffect.Duration}");
            Print($"stackingBehaviour: {statusEffect.StackingBehaviour}");
            Print($"maxStacks: {statusEffect.MaxStacks}");
            Print($"weaponFireTriggerEndEvent: {statusEffect.WeaponFireTriggerEndEvent}");

            if (statusEffect.UnitTypeBuffsToApply.Length > 0)
            {
                using (BeginScope("unitTypeBuffs"))
                {
                    for (int i = 0; i < statusEffect.UnitTypeBuffsToApply.Length; ++i)
                    {
                        OutputForUnitTypeBuff(statusEffect.UnitTypeBuffsToApply[i]);
                    }
                }
            }

            if (statusEffect.BuffsToApplyToTarget.Length > 0)
            {
                using (BeginScope("buffsToApplyToTarget"))
                {
                    for (int i = 0; i < statusEffect.BuffsToApplyToTarget.Length; ++i)
                    {
                        OutputForUnitTypeBuff(statusEffect.BuffsToApplyToTarget[i]);
                    }
                }
            }

            if (statusEffect.Modifiers.Length > 0)
            {
                using (BeginScope("modifiers"))
                {
                    for (int i = 0; i < statusEffect.Modifiers.Length; ++i)
                    {
                        ModifierAttributes modifier = statusEffect.Modifiers[i];
                        using (BeginScope())
                        {
                            Print($"modifierType: {modifier.ModifierType}");
                            switch (modifier.ModifierType)
                            {
                            case ModifierType.EnableWeapon:
                                Print($"weaponID: {modifier.EnableWeaponAttributes.WeaponID}");
                                break;

                            case ModifierType.SwapWeapons:
                                Print($"swapFromWeaponID: {modifier.SwapWeaponAttributes.SwapFromWeaponID}");
                                Print($"swapToWeaponID: {modifier.SwapWeaponAttributes.SwapToWeaponID}");
                                break;

                            case ModifierType.HealthOverTime:
                                Print($"id: {modifier.HealthOverTimeAttributes.ID}");
                                Print($"tickDurationMS: {modifier.HealthOverTimeAttributes.MSTickDuration}");
                                Print($"damageType: {modifier.HealthOverTimeAttributes.DamageType}");
                                Print($"amount: {modifier.HealthOverTimeAttributes.Amount}");
                                break;

                            default:
                                break;
                            }
                        }
                    }
                }
            }
        }