Refactor: Async-ify a bunch of stuff. Change waitForMessage to template style. Disable strictPropertyInitialization in typescript config.

This commit is contained in:
Casper Warden
2018-10-07 14:59:07 +01:00
parent d45204a91c
commit 1137868932
638 changed files with 1014 additions and 1219 deletions

View File

@@ -246,9 +246,8 @@ export class GroupCommands extends CommandsBase
let totalRoleCount = 0;
this.circuit.sendMessage(grdr, PacketFlags.Reliable);
this.circuit.waitForPacket(Message.GroupRoleDataReply, 10000, (packet: Packet): FilterResponse =>
this.circuit.waitForMessage<GroupRoleDataReplyMessage>(Message.GroupRoleDataReply, 10000, (gmr: GroupRoleDataReplyMessage): FilterResponse =>
{
const gmr = packet.message as GroupRoleDataReplyMessage;
if (gmr.GroupData.RequestID.toString() === requestID.toString())
{
totalRoleCount = gmr.GroupData.RoleCount;