Minor tweak to /8ball

clean up that code and fix the index
This commit is contained in:
MangosArentLiterature 2021-04-09 03:24:54 -05:00
parent cff51674bb
commit 9c4a1a99a5

View File

@ -1254,8 +1254,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(" ");