add equip/unequip msg

This commit is contained in:
shoopea 2019-09-15 14:54:08 +08:00
parent 61e85b3e41
commit 04e2bcf825
3 changed files with 13 additions and 1 deletions

4
def.go
View File

@ -463,6 +463,10 @@ const (
objSubTypeMessageCastleAck = 381 // Castle msg (not done) objSubTypeMessageCastleAck = 381 // Castle msg (not done)
objSubTypeMessageExchangeReq = 382 // ⚖Exchange (done) objSubTypeMessageExchangeReq = 382 // ⚖Exchange (done)
objSubTypeMessageExchangeAck = 383 // List of deals (done) objSubTypeMessageExchangeAck = 383 // List of deals (done)
objSubTypeMessageEquipGearReq = 384 // /on_item (done)
objSubTypeMessageEquipGearAck = 385 // Item equipped (done)
objSubTypeMessageUnequipGearReq = 386 // /off_item (done)
objSubTypeMessageUnequipGearAck = 387 // Item unequipped (done)
objSubTypeJobPillage = 601 objSubTypeJobPillage = 601
objSubTypeJobTribute = 602 objSubTypeJobTribute = 602
objSubTypeJobStatus = 603 objSubTypeJobStatus = 603

View File

@ -225,6 +225,10 @@ func resetMsgParsingRules() {
`Your deals \\((?P<ActiveDeals>[0-9]+)/(?P<MaxDeals>[0-9]+)\\):\\n` + `Your deals \\((?P<ActiveDeals>[0-9]+)/(?P<MaxDeals>[0-9]+)\\):\\n` +
`(?P<Deals>(?s:.*))\\n` + `(?P<Deals>(?s:.*))\\n` +
`Your last 10 comitted trades: /trades$") `Your last 10 comitted trades: /trades$")
,(5000, ` + strconv.Itoa(objSubTypeMessageEquipGearReq) + `, "Equip Req", "^/on_(?P<Item>[a-z0-9]+)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageEquipGearAck) + `, "Equip Ack", "^Item equipped: (?P<Item>.+)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageUnequipGearReq) + `, "Unequip Req", "^/off_(?P<Item>[a-z0-9]+)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageUnequipGearAck) + `, "Unequip Ack", "^Item unequipped: (?P<Item>.+)$")
;`) ;`)
failOnError(err, "resetMsgParsingRules : populate table msg_rules") failOnError(err, "resetMsgParsingRules : populate table msg_rules")
} }

4
sql.go
View File

@ -537,6 +537,10 @@ func initDB() {
,(` + strconv.Itoa(objSubTypeMessageCastleAck) + `, "castle_ack", "Castle Ack", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageCastleAck) + `, "castle_ack", "Castle Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageExchangeReq) + `, "exchange_req", "Exchange Req", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageExchangeReq) + `, "exchange_req", "Exchange Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageExchangeAck) + `, "exchange_ack", "Exchange Ack", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageExchangeAck) + `, "exchange_ack", "Exchange Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageEquipGearReq) + `, "equip_req", "Equip Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageEquipGearAck) + `, "equip_ack", "Equip Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageUnequipGearReq) + `, "unequip_req", "Unequip Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageUnequipGearAck) + `, "unequip_ack", "Unequip Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeJobPillage) + `, "job_pillage", "Pillage job", ` + strconv.Itoa(objTypeJob) + `) ,(` + strconv.Itoa(objSubTypeJobPillage) + `, "job_pillage", "Pillage job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(objSubTypeJobTribute) + `, "job_tribute", "Tribute job", ` + strconv.Itoa(objTypeJob) + `) ,(` + strconv.Itoa(objSubTypeJobTribute) + `, "job_tribute", "Tribute job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(objSubTypeJobWithdrawal) + `, "job_withdraw", "Withdrawal job", ` + strconv.Itoa(objTypeJob) + `) ,(` + strconv.Itoa(objSubTypeJobWithdrawal) + `, "job_withdraw", "Withdrawal job", ` + strconv.Itoa(objTypeJob) + `)