update display for shops

This commit is contained in:
shoopea 2020-02-14 10:58:48 +08:00
parent 2c30cd80e4
commit 874a6c1a53

9
job.go
View File

@ -2269,12 +2269,17 @@ func jobShops(j Job) {
}
}
out = fmt.Sprintf("%s [%4d💧]", out, cwm.Mana)
out = fmt.Sprintf("%s <a href=\"https://t.me/share/url?url=/ws_%s\">%s</a>", out, cwm.Link, cwm.User)
out = fmt.Sprintf("%s <a href=\"https://t.me/share/url?url=/ws_%s\">%s</a> ", out, cwm.Link, cwm.User)
if cwm.Mana < cwm.ManaTotal {
t := (cwm.ManaTotal - cwm.Mana) / ((cwm.ManaTotal / 250) + 1)
d := time.Duration(t) * time.Minute
out = fmt.Sprintf("%s %s\n", out, d.String())
if d.Hours() > 0 {
out = fmt.Sprintf("%s%dh\n", out, d.Hours)
}
if d.Minutes() > 0 {
out = fmt.Sprintf("%s%dm\n", out, d.Minutes)
}
} else {
out = fmt.Sprintf("%s\n", out)
}