Fix CallForHelpEvent

This commit is contained in:
brenoepic 2022-04-29 19:32:51 -03:00
parent 49e7847051
commit 023183a647
2 changed files with 8 additions and 8 deletions

View File

@ -81,7 +81,7 @@ public class CallForHelpEvent extends MessageHandler {
CallForHelpEvent.this.client.sendResponse(new IssueCloseNotificationMessageComposer(cfhTopic.reply).compose());
Emulator.getGameEnvironment().getModToolManager().closeTicketAsHandled(issue, null);
}
}, 30 * 1000);
}, (long) 30 * 1000);
}
}
}
@ -111,7 +111,7 @@ public class CallForHelpEvent extends MessageHandler {
CallForHelpEvent.this.client.sendResponse(new IssueCloseNotificationMessageComposer(cfhTopic.reply).compose());
Emulator.getGameEnvironment().getModToolManager().closeTicketAsHandled(issue, null);
}
}, 30 * 1000);
}, (long) 30 * 1000);
}
}

View File

@ -35,15 +35,15 @@ public class CallForHelpFromIMEvent extends MessageHandler {
info = HabboManager.getOfflineHabboInfo(userId);
}
if (info != null) {
for (int i = 0; i < count; i++) {
int chatUserId = this.packet.readInt();
String username = this.packet.readInt() == info.getId() ? info.getUsername() : this.client.getHabbo().getHabboInfo().getUsername();
if (info == null) return;
for (int i = 0; i < count; i++) {
int chatUserId = this.packet.readInt();
String username = this.packet.readInt() == info.getId() ? info.getUsername() : this.client.getHabbo().getHabboInfo().getUsername();
chatLogs.add(new ModToolChatLog(0, chatUserId, username, this.packet.readString()));
}
chatLogs.add(new ModToolChatLog(0, chatUserId, username, this.packet.readString()));
}
ModToolIssue issue = new ModToolIssue(this.client.getHabbo().getHabboInfo().getId(), this.client.getHabbo().getHabboInfo().getUsername(), userId, info.getUsername(), 0, message, ModToolTicketType.IM);
issue.category = category;
issue.chatLogs = chatLogs;