fixes
This commit is contained in:
parent
55f9f8c81e
commit
81d04dd752
2
bot.go
2
bot.go
@ -940,7 +940,7 @@ func botAlchAll(m *ChatWarsMessage) {
|
||||
MsgID64: m.ID64,
|
||||
ChatID64: m.ChatID64,
|
||||
Status: 0,
|
||||
Mana: 0,
|
||||
ManaNow: 0,
|
||||
ManaMax: 0,
|
||||
}
|
||||
|
||||
|
6
job.go
6
job.go
@ -2064,7 +2064,7 @@ func jobAlchAll(j Job) {
|
||||
|
||||
cwm, err := parseSubTypeMessageMeAck(m, rule.re)
|
||||
p.Status = 2
|
||||
p.Mana = cwm.ManaNow
|
||||
p.ManaNow = cwm.ManaNow
|
||||
p.ManaMax = cwm.ManaMax
|
||||
|
||||
err = setJobPayloadJSON(j.ID64, p)
|
||||
@ -2084,7 +2084,7 @@ func jobAlchAll(j Job) {
|
||||
rule, err := getMsgParsingRule(m)
|
||||
logOnError(err, "jobAlchAll : getMsgParsingRule")
|
||||
if rule.MsgTypeID64 == cacheObjSubType[`msg_alch_stock_ack`] {
|
||||
cwm, err := parseSubTypeMessageAlchStockAck(m, rule)
|
||||
cwm, err := parseSubTypeMessageAlchStockAck(m, rule.re)
|
||||
logOnError(err, "jobAlchAll : parseSubTypeMessageAlchStockAck")
|
||||
if err == nil {
|
||||
maxManaItems = make(map[int64]int64)
|
||||
@ -2094,7 +2094,7 @@ func jobAlchAll(j Job) {
|
||||
muxObjItem.RLock()
|
||||
for _, o := range objItems {
|
||||
if (o.ItemTypeID == cacheObjSubType[`item_misc`] || o.ItemTypeID == cacheObjSubType[`item_misc`]) && o.Craftable && o.Craft != nil {
|
||||
rx := regexp.MustCompile("\/brew.*")
|
||||
rx := regexp.MustCompile(`\/brew.*`)
|
||||
if rx.MatchString(o.Craft.Command) {
|
||||
maxManaItems[o.ObjID64] = p.ManaMax / o.Craft.Mana
|
||||
maxResItems[o.ObjID64] = maxManaItems[o.ObjID64]
|
||||
|
Loading…
Reference in New Issue
Block a user