mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 01:50:50 +01:00
Fix exception on answering polls without an answer
This commit is contained in:
parent
4b207a3993
commit
aff5566451
@ -21,12 +21,15 @@ public class AnswerPollEvent extends MessageHandler {
|
||||
int pollId = this.packet.readInt();
|
||||
int questionId = this.packet.readInt();
|
||||
int count = this.packet.readInt();
|
||||
String answers = this.packet.readString();
|
||||
|
||||
StringBuilder answer = new StringBuilder();
|
||||
for (int i = 0; i < count; i++) {
|
||||
answer.append(":").append(this.packet.readString());
|
||||
answer.append(":").append(answers);
|
||||
}
|
||||
|
||||
if(answer.length() <= 0) return;
|
||||
|
||||
if (pollId == 0 && questionId <= 0) {
|
||||
this.client.getHabbo().getHabboInfo().getCurrentRoom().handleWordQuiz(this.client.getHabbo(), answer.toString());
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user