Rework of GetRandomAttack
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a54459cc57
commit
eff755a901
|
@ -38,7 +38,9 @@ namespace CreatureLib::Library {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
auto val = rand.Get(_distinctAttacks.size());
|
auto val = rand.Get(_distinctAttacks.size());
|
||||||
return *std::next(_distinctAttacks.begin(), val);
|
auto it = _distinctAttacks.begin();
|
||||||
|
std::advance(it, val);
|
||||||
|
return *it;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue