NetModuleChat
public struct NetModuleChat : NetModule
This is a struct for the ChatCommand NetModule.
-
Undocumented
Declaration
Swift
public var command: ChatCommandType -
Undocumented
Declaration
Swift
public var commandData: ChatCommandData -
Declaration
Swift
public init() -
Call this function to initialize the NetModule with Client message data.
Usage Example:
var load = PacketLoadNetModule() load.netModuleType = .Chat load.netModule = NetModuleChat(command: .Say, message: "this is a test") do{ try load.encode() }catch {}Declaration
Swift
public init(command: ChatCommandType, message: String)Parameters
commandThe vanilla chat command you wish to perform as a NetModuleChat.ChatCommandType
messageThe Chat Message String to send.
-
Declaration
Swift
public mutating func decode(_ reader: BinaryReader, _ context: TerrariaPacketContext) throws -
Declaration
Swift
public mutating func encode(_ writer: BinaryWriter, _ context: TerrariaPacketContext) throws -
Undocumented
See moreDeclaration
Swift
public enum ChatCommandType : String -
Undocumented
See moreDeclaration
Swift
public struct ClientMsg : ChatCommandData -
Undocumented
See moreDeclaration
Swift
public struct ServerMsg : ChatCommandData
NetModuleChat Structure Reference