Change LibrarySettings to be a pointer instead of value, to allow for overriding in implementations.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -21,7 +21,7 @@ CreateCreature* CreateCreature::WithGender(Library::Gender gender) {
|
||||
}
|
||||
|
||||
CreateCreature* CreateCreature::WithAttack(const std::string& attackName, AttackLearnMethod learnMethod) {
|
||||
if (_attacks.size() >= _library->GetSettings().GetMaximalMoves())
|
||||
if (_attacks.size() >= _library->GetSettings()->GetMaximalMoves())
|
||||
throw CreatureException("You have already set the maximum amount of allowed moves.");
|
||||
|
||||
auto attackData = _library->GetAttackLibrary()->GetAttack(attackName);
|
||||
|
||||
Reference in New Issue
Block a user