Ensure AddLevelAttack adds to distinctMoves
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-04-19 19:11:48 +02:00
parent 680f949df8
commit a580649224
2 changed files with 4 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
using namespace CreatureLib::Library;
void LearnableAttacks::AddLevelMove(uint8_t level, const AttackData* attack) {
void LearnableAttacks::AddLevelAttack(uint8_t level, const AttackData* attack) {
List<const AttackData*> levelData;
if (_learnedByLevel.TryGet(level, levelData)) {
@@ -11,6 +11,7 @@ void LearnableAttacks::AddLevelMove(uint8_t level, const AttackData* attack) {
levelData = {attack};
_learnedByLevel.Insert(level, levelData);
}
_distinctAttacks.insert(attack);
}
const List<const AttackData*>& LearnableAttacks::GetAttacksForLevel(uint8_t level) const {