Refactor event system
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ func Connect(addr string) (ret *proto.Conn, err error) {
|
||||
return
|
||||
}
|
||||
ret.SetState(proto_base.Handshaking)
|
||||
ret.CompressionThreshold = -1
|
||||
ret.SetCompressionThreshold(-1)
|
||||
ret.Actor = proto_base.Client
|
||||
ret.Conn, err = net.Dial("tcp", addr)
|
||||
if err != nil {
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ func (s *LoginClient) OnStart(_ event.Start) (err error) {
|
||||
}
|
||||
|
||||
func (s *LoginClient) OnCompress(compress *v1_21_8.LoginToClientPacketCompress) (err error) {
|
||||
s.CompressionThreshold = compress.Threshold
|
||||
s.SetCompressionThreshold(compress.Threshold)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user