This commit is contained in:
shoopea 2020-01-02 23:36:28 +08:00
parent 13579fa786
commit 111387f876
2 changed files with 5 additions and 5 deletions

6
def.go
View File

@ -222,9 +222,9 @@ type ChatWarsMessageGRolesAck struct {
} }
type ChatWarsMessageGoQuestAck struct { type ChatWarsMessageGoQuestAck struct {
Msg *ChatWarsMessage `json:"msg"` Msg *ChatWarsMessage `json:"msg"`
QuestTypeID int `json:"quest"` QuestTypeID64 int64 `json:"quest"`
Duration time.Duration `json:"duration"` Duration time.Duration `json:"duration"`
} }
type ChatWarsMessageQuestResult struct { type ChatWarsMessageQuestResult struct {

4
msg.go
View File

@ -353,10 +353,10 @@ func parseSubTypeMessageGoQuestAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatW
*/ */
switch quest := strings.ToLower(r.ReplaceAllString(m.Text, "${Place}")); quest { switch quest := strings.ToLower(r.ReplaceAllString(m.Text, "${Place}")); quest {
case "forest": case "forest":
cwm.QuestTypeID = cacheObjSubType[`quest_forest`] cwm.QuestTypeID64 = cacheObjSubType[`quest_forest`]
default: default:
log.Printf("parseSubTypeMessageGoQuestAck : no reference for quest `%s`\n", quest) log.Printf("parseSubTypeMessageGoQuestAck : no reference for quest `%s`\n", quest)
cwm.QuestTypeID = cacheObjSubType[`quest_forest`] cwm.QuestTypeID64 = cacheObjSubType[`quest_forest`]
} }
i, err := strconv.ParseInt(r.ReplaceAllString(m.Text, "${Time}"), 10, 64) i, err := strconv.ParseInt(r.ReplaceAllString(m.Text, "${Time}"), 10, 64)
if err != nil { if err != nil {