Merge pull request #68 from AttorneyOnline/8ball

Minor fix to /8ball
This commit is contained in:
scatterflower 2021-04-14 00:30:44 -05:00 committed by GitHub
commit e51fc8de37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1250,8 +1250,7 @@ void AOClient::cmd8Ball(int argc, QStringList argv)
sendServerMessage("8ball.txt is empty."); sendServerMessage("8ball.txt is empty.");
} }
else { else {
int answerindex = server->magic_8ball_answers.size(); QString response = server->magic_8ball_answers[(genRand(1, server->magic_8ball_answers.size() - 1))];
QString response = server->magic_8ball_answers[(genRand(1, answerindex))];
QString sender_name = ooc_name; QString sender_name = ooc_name;
QString sender_message = argv.join(" "); QString sender_message = argv.join(" ");