test alch all
This commit is contained in:
parent
c374507a89
commit
85c084bf1a
12
job.go
12
job.go
@ -2035,6 +2035,7 @@ func jobAlchAll(j Job) {
|
||||
maxManaItems map[int64]int64
|
||||
maxResItems map[int64]int64
|
||||
itemInStock bool
|
||||
eta, out string
|
||||
)
|
||||
|
||||
err := setJobStart(j.ID64)
|
||||
@ -2117,7 +2118,6 @@ func jobAlchAll(j Job) {
|
||||
}
|
||||
}
|
||||
muxObjItem.RUnlock()
|
||||
var eta string
|
||||
if p.ManaNow < p.ManaMax {
|
||||
t := (p.ManaMax - p.ManaNow) / ((p.ManaMax / 250) + 1)
|
||||
d := time.Duration(t) * time.Minute
|
||||
@ -2128,11 +2128,19 @@ func jobAlchAll(j Job) {
|
||||
if d.Minutes() > 0 {
|
||||
eta = fmt.Sprintf("%s%.0fm", eta, d.Minutes())
|
||||
}
|
||||
} else {
|
||||
eta = "0m"
|
||||
}
|
||||
for k, q := range maxManaItems {
|
||||
if q == maxResItems[k] {
|
||||
o, _ := getObjItem(k)
|
||||
out = fmt.Sprintf("%s\n<code>%s - %s - %d</code>", out, o.Code, o.Name, q)
|
||||
}
|
||||
}
|
||||
|
||||
c := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
Text: "Success.",
|
||||
Text: fmt.Sprintf("ETA : %s\n%s", eta, out),
|
||||
FromMsgID64: p.MsgID64,
|
||||
FromChatID64: p.ChatID64,
|
||||
ParseMode: cmdParseModeHTML,
|
||||
|
Loading…
Reference in New Issue
Block a user