31 lines
661 B
TypeScript
31 lines
661 B
TypeScript
import Packet from "../packet";
|
|
import Stream from "../stream";
|
|
|
|
export class PacketCreateGroup extends Packet {
|
|
|
|
private groupId: string = "";
|
|
|
|
public getPacketId(): number {
|
|
return 0x11;
|
|
}
|
|
|
|
public _receive(stream: Stream): void {
|
|
this.groupId = stream.readString();
|
|
}
|
|
|
|
public _send(): Promise<Stream> | Stream {
|
|
const stream = new Stream();
|
|
stream.writeInt16(this.getPacketId());
|
|
stream.writeString(this.groupId);
|
|
return stream;
|
|
}
|
|
|
|
public setGroupId(groupId: string) {
|
|
this.groupId = groupId;
|
|
}
|
|
|
|
public getGroupId(): string {
|
|
return this.groupId;
|
|
}
|
|
|
|
} |