Rework of GetRandomAttack
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-21 12:41:26 +02:00
parent a54459cc57
commit eff755a901
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ namespace CreatureLib::Library {
return nullptr;
}
auto val = rand.Get(_distinctAttacks.size());
return *std::next(_distinctAttacks.begin(), val);
auto it = _distinctAttacks.begin();
std::advance(it, val);
return *it;
}
};
}