Replaced Trait id with ordinal.
This commit is contained in:
		| @@ -57,8 +57,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()]--; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| @@ -71,8 +71,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()]++; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
| @@ -76,12 +76,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()]--; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| @@ -97,12 +97,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
	 MobiusDev
					MobiusDev