This commit is contained in:
shoopea 2019-06-06 13:56:28 +08:00
parent 5b43fc395b
commit 2b2882a1b0
3 changed files with 3 additions and 3 deletions

2
msg.go
View File

@ -48,7 +48,7 @@ func parseSubTypeMessageAuctionAnnounce(m *ChatWarsMessage, r *regexp.Regexp) (*
cwm.Price = int32(p) cwm.Price = int32(p)
cwm.Status = r.ReplaceAllString(m.Text, "${Status}") cwm.Status = r.ReplaceAllString(m.Text, "${Status}")
cwm.End, _ = fromChatWarsDate(r.ReplaceAllString(m.Text, "${End}")) cwm.End, _ = fromChatWarsDate(r.ReplaceAllString(m.Text, "${End}"))
return cwm, nil return &cwm, nil
} }
func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageStock, error) { func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageStock, error) {

2
sql.go
View File

@ -528,7 +528,7 @@ func insertMsgAuctionAnnounce(m *ChatWarsMessageAuctionAnnounce) error {
} }
defer stmt.Close() defer stmt.Close()
_, err = stmt.Exec(m.ObjID64, m.LotID, m.Item, m.Cond, m.Quality, m.SellerUserID64, m.SellerGuildID64, m.SellerCastleID64, m.BuyerUserID64, m.BuyerGuildID64, m.BuyerCastleID64, m.Price, m.Status, m.End) _, err = stmt.Exec(m.ObjID64, m.LotID, m.ItemID64, m.Cond, m.Quality, m.SellerUserID64, m.SellerGuildID64, m.SellerCastleID64, m.BuyerUserID64, m.BuyerGuildID64, m.BuyerCastleID64, m.Price, m.Status, m.End)
if err != nil { if err != nil {
return err return err
} }

View File

@ -180,7 +180,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
clientMsgGRolesAck(cwm) clientMsgGRolesAck(cwm)
case objSubTypeMessageAuctionAnnounce: case objSubTypeMessageAuctionAnnounce:
cwm, err := parseSubTypeMessageAuctionAnnounce(m, r) cwm, err := parseSubTypeMessageAuctionAnnounce(m, r)
logOonError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing objSubTypeMessageAuctionAnnounce.") logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing objSubTypeMessageAuctionAnnounce.")
err = insertMsgAuctionAnnounce(cwm) err = insertMsgAuctionAnnounce(cwm)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : insertMsgAuctionAnnounce") logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : insertMsgAuctionAnnounce")
case objSubTypeMessageTimeAck: case objSubTypeMessageTimeAck: