func (m *FriendUpdateMessage) ReadPacket(_packet pnet.IPacket) (err error) { if m.Name, err = _packet.ReadString(); err != nil { return } removed, errRem := _packet.ReadUint8() if errRem != nil { return errRem } m.Removed = int(removed) return nil }
func (m *ChatMessage) ReadPacket(_packet pnet.IPacket) (err error) { speaktype, err := _packet.ReadUint8() if err != nil { return } m.SpeakType = int(speaktype) channelId, err := _packet.ReadUint16() if err != nil { return } m.ChannelId = int(channelId) if m.Receiver, err = _packet.ReadString(); err != nil { return } if m.Text, err = _packet.ReadString(); err != nil { return } return nil }