Made GetRandomAttack const.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-19 17:51:36 +02:00
parent ad9cbf0670
commit aeac49d892
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ namespace CreatureLib::Library {
const List<const AttackData*>& GetAttacksForLevel(uint8_t level) const; const List<const AttackData*>& GetAttacksForLevel(uint8_t level) const;
virtual const AttackData* GetRandomAttack(Arbutils::Random rand = Arbutils::Random()) { virtual const AttackData* GetRandomAttack(Arbutils::Random rand = Arbutils::Random()) const {
auto val = rand.Get(_distinctAttacks.size()); auto val = rand.Get(_distinctAttacks.size());
return *std::next(_distinctAttacks.begin(), val); return *std::next(_distinctAttacks.begin(), val);
} }