MCPcopy Create free account
hub / github.com/FloatTech/ZeroBot-Plugin / setEquipFor

Method setEquipFor

plugin/mcfish/main.go:334–345  ·  view source on GitHub ↗
(uid int64)

Source from the content-addressed store, hash-verified

332}
333
334func (sql *fishdb) setEquipFor(uid int64) (err error) {
335 sql.Lock()
336 defer sql.Unlock()
337 userInfo := fishState{ID: uid}
338 err = sql.db.Create("fishState", &userInfo)
339 if err != nil {
340 return err
341 }
342 _ = sql.db.Find("fishState", &userInfo, "WHERE ID = ?", uid)
343 userInfo.Equip++
344 return sql.db.Insert("fishState", &userInfo)
345}
346
347// 获取装备信息
348func (sql *fishdb) getUserEquip(uid int64) (userInfo equip, err error) {

Callers 1

initFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected