Replaced Trait id with ordinal.
This commit is contained in:
@@ -59,8 +59,8 @@ public final class AttackTrait extends AbstractEffect
|
||||
{
|
||||
for (Entry<TraitType, Float> trait : _attackTraits.entrySet())
|
||||
{
|
||||
charStat.getAttackTraits()[trait.getKey().getId()] /= trait.getValue();
|
||||
charStat.getAttackTraitsCount()[trait.getKey().getId()]--;
|
||||
charStat.getAttackTraits()[trait.getKey().ordinal()] /= trait.getValue();
|
||||
charStat.getAttackTraitsCount()[trait.getKey().ordinal()]--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,8 +73,8 @@ public final class AttackTrait extends AbstractEffect
|
||||
{
|
||||
for (Entry<TraitType, Float> trait : _attackTraits.entrySet())
|
||||
{
|
||||
charStat.getAttackTraits()[trait.getKey().getId()] *= trait.getValue();
|
||||
charStat.getAttackTraitsCount()[trait.getKey().getId()]++;
|
||||
charStat.getAttackTraits()[trait.getKey().ordinal()] *= trait.getValue();
|
||||
charStat.getAttackTraitsCount()[trait.getKey().ordinal()]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -78,12 +78,12 @@ public final class DefenceTrait extends AbstractEffect
|
||||
{
|
||||
if (trait.getValue() < 2.0f)
|
||||
{
|
||||
charStat.getDefenceTraits()[trait.getKey().getId()] /= trait.getValue();
|
||||
charStat.getDefenceTraitsCount()[trait.getKey().getId()]--;
|
||||
charStat.getDefenceTraits()[trait.getKey().ordinal()] /= trait.getValue();
|
||||
charStat.getDefenceTraitsCount()[trait.getKey().ordinal()]--;
|
||||
}
|
||||
else
|
||||
{
|
||||
charStat.getTraitsInvul()[trait.getKey().getId()]--;
|
||||
charStat.getTraitsInvul()[trait.getKey().ordinal()]--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,12 +99,12 @@ public final class DefenceTrait extends AbstractEffect
|
||||
{
|
||||
if (trait.getValue() < 2.0f)
|
||||
{
|
||||
charStat.getDefenceTraits()[trait.getKey().getId()] *= trait.getValue();
|
||||
charStat.getDefenceTraitsCount()[trait.getKey().getId()]++;
|
||||
charStat.getDefenceTraits()[trait.getKey().ordinal()] *= trait.getValue();
|
||||
charStat.getDefenceTraitsCount()[trait.getKey().ordinal()]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
charStat.getTraitsInvul()[trait.getKey().getId()]++;
|
||||
charStat.getTraitsInvul()[trait.getKey().ordinal()]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user