MCPcopy Index your code
hub / github.com/FloatTech/ZeroBot-Plugin / refresh

Method refresh

plugin/warframeapi/world.go:72–87  ·  view source on GitHub ↗

根据API返回内容修正游戏时间

(api *wfapi)

Source from the content-addressed store, hash-verified

70
71// 根据API返回内容修正游戏时间
72func (w *world) refresh(api *wfapi) {
73 for _, t := range w.w {
74 t.Lock()
75 }
76 w.w[0].NextTime = api.CetusCycle.Expiry.Local()
77 w.w[0].IsDay = api.CetusCycle.IsDay
78
79 w.w[1].NextTime = api.VallisCycle.Expiry.Local()
80 w.w[1].IsDay = api.VallisCycle.IsWarm
81
82 w.w[2].NextTime = api.CambionCycle.Expiry.Local()
83 w.w[2].IsDay = api.CambionCycle.Active == "fass"
84 for _, t := range w.w {
85 t.Unlock()
86 }
87}
88
89// 游戏时间更新
90func (w *world) update() {

Callers 1

initFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected