Client LuaCsForBarotrauma
AbilityConditionAffliction.cs
1
using
System.Linq;
2
3
namespace
Barotrauma.Abilities
4
{
5
class
AbilityConditionAffliction
:
AbilityConditionData
6
{
7
private
readonly
string
[] afflictions;
8
public
AbilityConditionAffliction
(
CharacterTalent
characterTalent
,
ContentXElement
conditionElement) : base(
characterTalent
, conditionElement)
9
{
10
afflictions = conditionElement.
GetAttributeStringArray
(
"afflictions"
,
new
string
[0], convertToLowerInvariant:
true
);
11
}
12
13
protected
override
bool
MatchesConditionSpecific
(
AbilityObject
abilityObject)
14
{
15
if
(abilityObject is
IAbilityAffliction
{
Affliction
:
Affliction
affliction })
16
{
17
return
afflictions.Any(a => a == affliction.Identifier || a == affliction.Prefab.AfflictionType);
18
}
19
else
20
{
21
LogAbilityConditionError
(abilityObject, typeof(
IAbilityAttackResult
));
22
return
false
;
23
}
24
}
25
}
26
}
Barotrauma.Abilities.AbilityConditionAffliction
Definition:
AbilityConditionAffliction.cs:6
Barotrauma.Abilities.AbilityConditionAffliction.MatchesConditionSpecific
override bool MatchesConditionSpecific(AbilityObject abilityObject)
Definition:
AbilityConditionAffliction.cs:13
Barotrauma.Abilities.AbilityConditionAffliction.AbilityConditionAffliction
AbilityConditionAffliction(CharacterTalent characterTalent, ContentXElement conditionElement)
Definition:
AbilityConditionAffliction.cs:8
Barotrauma.Abilities.AbilityConditionData
Definition:
AbilityConditionData.cs:6
Barotrauma.Abilities.AbilityConditionData.LogAbilityConditionError
void LogAbilityConditionError(AbilityObject abilityObject, Type expectedData)
Definition:
AbilityConditionData.cs:18
Barotrauma.Abilities.AbilityCondition.characterTalent
CharacterTalent characterTalent
Definition:
AbilityCondition.cs:8
Barotrauma.Abilities.AbilityObject
Definition:
AbilityObjects.cs:6
Barotrauma.Affliction
Definition:
Affliction.cs:11
Barotrauma.CharacterTalent
Definition:
CharacterTalent.cs:8
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.GetAttributeStringArray
string?[] GetAttributeStringArray(string key, string[]? def, bool convertToLowerInvariant=false)
Barotrauma.Abilities.IAbilityAffliction
Definition:
AbilityInterfaces.cs:39
Barotrauma.Abilities.IAbilityAttackResult
Definition:
AbilityInterfaces.cs:44
Barotrauma.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
AbilityConditionals
AbilityConditionData
AbilityConditionAffliction.cs
Generated by
1.9.1