mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Pull max length using last number in array
This commit is contained in:
parent
cebe50d752
commit
c0d1776183
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ fn get_random_cards(id: i64, count: usize) -> JsonValue {
|
|||
|
||||
let mut random_id = 0;
|
||||
while random_id == 0 {
|
||||
let card = rng.gen_range(1..POOL[lottery_id.to_string()].len() + 1);
|
||||
let card = rng.gen_range(1..POOL[lottery_id.to_string()][POOL[lottery_id.to_string()].len() - 1].as_i64().unwrap() + 1);
|
||||
if !get_card_master_id(lottery_id.to_string(), card.to_string()).is_none() {
|
||||
random_id = card;
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue