add user guard level

This commit is contained in:
Akiba
2022-05-07 14:39:42 +08:00
parent 177c8d35b1
commit 978a4e85d3
2 changed files with 7 additions and 5 deletions

View File

@@ -74,8 +74,9 @@ func (d *Danmaku) Parse(data []byte) {
}
d.Content = info.Get("1").String()
d.Sender = &User{
Uid: int(info.Get("2.0").Int()),
Uname: info.Get("2.1").String(),
Uid: int(info.Get("2.0").Int()),
Uname: info.Get("2.1").String(),
GuardLevel: int(info.Get("7").Int()),
Medal: &Medal{
Name: info.Get("3.1").String(),
Level: int(info.Get("3.0").Int()),

View File

@@ -1,9 +1,10 @@
package message
type User struct {
Uid int
Uname string
Medal *Medal
Uid int
Uname string
Medal *Medal
GuardLevel int
}
type Medal struct {