From aeac49d89288820a85c31b04f18f7f6fefb11e14 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 19 Apr 2020 17:51:36 +0200 Subject: [PATCH] Made GetRandomAttack const. --- src/Library/CreatureData/LearnableAttacks.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Library/CreatureData/LearnableAttacks.hpp b/src/Library/CreatureData/LearnableAttacks.hpp index 469ff1c..f636b45 100644 --- a/src/Library/CreatureData/LearnableAttacks.hpp +++ b/src/Library/CreatureData/LearnableAttacks.hpp @@ -32,7 +32,7 @@ namespace CreatureLib::Library { const List& 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()); return *std::next(_distinctAttacks.begin(), val); }