All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
13 lines
421 B
C++
13 lines
421 B
C++
#include "LearnableAttacks.hpp"
|
|
|
|
using namespace CreatureLib::Library;
|
|
|
|
void LearnableAttacks::AddLevelAttack(uint8_t level, ArbUt::BorrowedPtr<const AttackData> attack) {
|
|
if (_learnedByLevel.Has(level)) {
|
|
_learnedByLevel[level].Append(attack);
|
|
} else {
|
|
_learnedByLevel.Insert(level, {attack});
|
|
}
|
|
if (!_distinctLevelAttacks.Contains(attack))
|
|
_distinctLevelAttacks.Append(attack);
|
|
} |