mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 16:30:52 +01:00
Merge branch 'fix-polls' into 'dev'
Fix exception on answering polls without an answer See merge request morningstar/Arcturus-Community!482
This commit is contained in:
commit
b587f865d8
@ -21,12 +21,15 @@ public class AnswerPollEvent extends MessageHandler {
|
|||||||
int pollId = this.packet.readInt();
|
int pollId = this.packet.readInt();
|
||||||
int questionId = this.packet.readInt();
|
int questionId = this.packet.readInt();
|
||||||
int count = this.packet.readInt();
|
int count = this.packet.readInt();
|
||||||
|
String answers = this.packet.readString();
|
||||||
|
|
||||||
StringBuilder answer = new StringBuilder();
|
StringBuilder answer = new StringBuilder();
|
||||||
for (int i = 0; i < count; i++) {
|
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) {
|
if (pollId == 0 && questionId <= 0) {
|
||||||
this.client.getHabbo().getHabboInfo().getCurrentRoom().handleWordQuiz(this.client.getHabbo(), answer.toString());
|
this.client.getHabbo().getHabboInfo().getCurrentRoom().handleWordQuiz(this.client.getHabbo(), answer.toString());
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user