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

2
def.go
View File

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

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 {
case "forest":
cwm.QuestTypeID = cacheObjSubType[`quest_forest`]
cwm.QuestTypeID64 = cacheObjSubType[`quest_forest`]
default:
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)
if err != nil {