Client LuaCsForBarotrauma
CharacterAbilityResetPermanentStat.cs
1
2
namespace
Barotrauma.Abilities
3
{
4
class
CharacterAbilityResetPermanentStat
:
CharacterAbility
5
{
6
private
readonly Identifier statIdentifier;
7
public
override
bool
AppliesEffectOnIntervalUpdate
=>
true
;
8
public
override
bool
AllowClientSimulation
=>
true
;
9
10
public
CharacterAbilityResetPermanentStat
(
CharacterAbilityGroup
characterAbilityGroup,
ContentXElement
abilityElement) : base(characterAbilityGroup, abilityElement)
11
{
12
statIdentifier = abilityElement.
GetAttributeIdentifier
(
"statidentifier"
, Identifier.Empty);
13
if
(statIdentifier.IsEmpty)
14
{
15
DebugConsole.ThrowError($
"Error in talent {CharacterTalent.DebugIdentifier}, {nameof(CharacterAbilityResetPermanentStat)} - statIdentifier is empty."
,
16
contentPackage: abilityElement.
ContentPackage
);
17
}
18
}
19
protected
override
void
ApplyEffect
(
AbilityObject
abilityObject)
20
{
21
ApplyEffectSpecific();
22
}
23
24
protected
override
void
ApplyEffect
()
25
{
26
ApplyEffectSpecific();
27
}
28
29
private
void
ApplyEffectSpecific()
30
{
31
Character
?.
Info
.
ResetSavedStatValue
(statIdentifier);
32
}
33
}
34
}
Barotrauma.Abilities.AbilityObject
Definition:
AbilityObjects.cs:6
Barotrauma.Abilities.CharacterAbilityGroup
Definition:
CharacterAbilityGroup.cs:9
Barotrauma.Abilities.CharacterAbility
Definition:
CharacterAbility.cs:7
Barotrauma.Abilities.CharacterAbilityResetPermanentStat
Definition:
CharacterAbilityResetPermanentStat.cs:5
Barotrauma.Abilities.CharacterAbilityResetPermanentStat.AppliesEffectOnIntervalUpdate
override bool AppliesEffectOnIntervalUpdate
Definition:
CharacterAbilityResetPermanentStat.cs:7
Barotrauma.Abilities.CharacterAbilityResetPermanentStat.CharacterAbilityResetPermanentStat
CharacterAbilityResetPermanentStat(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
Definition:
CharacterAbilityResetPermanentStat.cs:10
Barotrauma.Abilities.CharacterAbilityResetPermanentStat.AllowClientSimulation
override bool AllowClientSimulation
Definition:
CharacterAbilityResetPermanentStat.cs:8
Barotrauma.Abilities.CharacterAbilityResetPermanentStat.ApplyEffect
override void ApplyEffect()
Definition:
CharacterAbilityResetPermanentStat.cs:24
Barotrauma.Abilities.CharacterAbilityResetPermanentStat.ApplyEffect
override void ApplyEffect(AbilityObject abilityObject)
Definition:
CharacterAbilityResetPermanentStat.cs:19
Barotrauma.Character
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:32
Barotrauma.Character.Info
CharacterInfo Info
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:556
Barotrauma.CharacterInfo.ResetSavedStatValue
void ResetSavedStatValue(Identifier statIdentifier)
Definition:
BarotraumaShared/SharedSource/Characters/CharacterInfo.cs:1990
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.ContentPackage
ContentPackage? ContentPackage
Definition:
ContentXElement.cs:14
Barotrauma.ContentXElement.GetAttributeIdentifier
Identifier GetAttributeIdentifier(string key, string def)
Barotrauma.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
CharacterAbilityResetPermanentStat.cs
Generated by
1.9.1