This commit is contained in:
shoopea 2020-01-02 23:33:41 +08:00
parent 8f2bdd549f
commit 13579fa786
5 changed files with 165 additions and 165 deletions

6
bot.go
View File

@ -287,7 +287,7 @@ func botMsgRescan(m *tb.Message) {
r := regexp.MustCompile("^[0-9]+$")
if r.MatchString(m.Payload) {
p := JobPayloadRescanMsg{
Query: fmt.Sprintf("SELECT o.id FROM obj o WHERE o.id = %s AND o.obj_type_id = %d AND o.obj_sub_type_id = %d;", m.Payload, objTypeMessage, cacheObjSubType[`msg`]),
Query: fmt.Sprintf("SELECT o.id FROM obj o WHERE o.id = %s AND o.obj_type_id = %d AND o.obj_sub_type_id = %d;", m.Payload, cacheObjType[`msg`], cacheObjSubType[`msg`]),
MsgID64: int64(m.ID),
ChatID64: m.Chat.ID,
}
@ -347,7 +347,7 @@ func botMsgRescanAll(m *tb.Message) {
return
}
p := JobPayloadRescanMsg{
Query: fmt.Sprintf("SELECT o.id FROM obj o WHERE o.obj_type_id = %d AND o.obj_sub_type_id = %d ORDER BY id ASC;", objTypeMessage, cacheObjSubType[`msg`]),
Query: fmt.Sprintf("SELECT o.id FROM obj o WHERE o.obj_type_id = %d AND o.obj_sub_type_id = %d ORDER BY id ASC;", cacheObjType[`msg`], cacheObjSubType[`msg`]),
MsgID64: int64(m.ID),
ChatID64: m.Chat.ID,
}
@ -500,7 +500,7 @@ func botMsgDump(m *tb.Message) {
logOnError(err, "botMsgDump : getObjSubTypeId")
if err != nil {
res = `Error retrieving the message`
} else if objTypeId != objTypeMessage {
} else if objTypeId != cacheObjType[`msg`] {
res = `This is not a message reference`
} else {
cwm, _ := getObjMsg(objId)

4
job.go
View File

@ -30,8 +30,8 @@ func createJob(jobTypeID64 int64, priority int32, userID64 int64, trigger int64,
}
defer stmt.Close()
res, err := stmt.Exec(objTypeJob, jobTypeID64)
s := fmt.Sprintf("createJob, insert obj(%d, %d)", objTypeJob, jobTypeID64)
res, err := stmt.Exec(cacheObjType[`job`], jobTypeID64)
s := fmt.Sprintf("createJob, insert obj(%d, %d)", cacheObjType[`job`], jobTypeID64)
logOnError(err, s)
if err != nil {
return 0, err

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 = objSubTypeQuestForest
cwm.QuestTypeID = cacheObjSubType[`quest_forest`]
default:
log.Printf("parseSubTypeMessageGoQuestAck : no reference for quest `%s`\n", quest)
cwm.QuestTypeID = objSubTypeQuestForest
cwm.QuestTypeID = cacheObjSubType[`quest_forest`]
}
i, err := strconv.ParseInt(r.ReplaceAllString(m.Text, "${Time}"), 10, 64)
if err != nil {

12
obj.go
View File

@ -232,7 +232,7 @@ func addObjMsg(msgID64 int64, msgChatID64 int64, msgTGUserID64 int64, msgTGSende
}
res, err := tx.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
VALUES (` + strconv.Itoa(objTypeMessage) + `,` + strconv.FormatInt(cacheObjSubType[`msg`], 10) + `);`)
VALUES (` + strconv.Itoa(cacheObjType[`msg`]) + `,` + strconv.FormatInt(cacheObjSubType[`msg`], 10) + `);`)
if err != nil {
err2 := tx.Rollback()
logOnError(err2, "addObjMsg : rollback insert obj")
@ -359,7 +359,7 @@ func addObjCastle(logo string, name string) (int64, error) {
}
res, err := tx.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
VALUES (` + strconv.Itoa(objTypeCastle) + `,` + strconv.Itoa(objSubTypeCastle) + `);`)
VALUES (` + strconv.Itoa(cacheObjType[`castle`]) + `,` + strconv.Itoa(cacheObjSubType[`castle`]) + `);`)
logOnError(err, "addObjCastle : exec insert obj")
if err != nil {
err2 := tx.Rollback()
@ -451,7 +451,7 @@ func addObjGuild(tag string, name string) (int64, error) {
}
res, err := tx.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
VALUES (` + strconv.Itoa(objTypeGuild) + `,` + strconv.Itoa(objSubTypeGuild) + `);`)
VALUES (` + strconv.Itoa(cacheObjType[`guild`]) + `,` + strconv.Itoa(cacheObjSubType[`guild`]) + `);`)
logOnError(err, "addObjGuild : exec insert obj")
if err != nil {
err2 := tx.Rollback()
@ -546,7 +546,7 @@ func addObjUser(name string) (int64, error) {
}
res, err := tx.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
VALUES (` + strconv.Itoa(objTypeUser) + `,` + strconv.Itoa(objSubTypeUser) + `);`)
VALUES (` + strconv.Itoa(cacheObjType[`user`]) + `,` + strconv.Itoa(cacheObjSubType[`user`]) + `);`)
logOnError(err, "addObjUser : exec insert obj")
if err != nil {
err2 := tx.Rollback()
@ -696,7 +696,7 @@ func addObjQuest(userID64 int64, questTypeID int, duration time.Duration, date t
}
res, err := tx.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
VALUES (` + strconv.Itoa(objTypeQuest) + `,` + strconv.Itoa(questTypeID) + `);`)
VALUES (` + strconv.Itoa(cacheObjType[`quest`]) + `,` + strconv.Itoa(questTypeID) + `);`)
logOnError(err, "addObjQuest : exec insert obj")
if err != nil {
err2 := tx.Rollback()
@ -764,7 +764,7 @@ func addObjItem(code string, name string, itemTypeID64 int64, weight int64, exch
}
res, err := tx.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
VALUES (` + strconv.Itoa(objTypeItem) + `,` + fmt.Sprintf("%d", itemTypeID64) + `);`)
VALUES (` + strconv.Itoa(cacheObjType[`item`]) + `,` + fmt.Sprintf("%d", itemTypeID64) + `);`)
logOnError(err, "addObjItem : exec insert obj")
if err != nil {
err2 := tx.Rollback()

304
sql.go
View File

@ -436,163 +436,163 @@ func initDB() {
log.Println("initDB : obj_item_name_v created ...")
/*
_, err = db.Exec(`INSERT INTO code_obj_type (id, intl_id, name)
VALUES (` + strconv.Itoa(objTypeUser) + `, "user", "User")
,(` + strconv.Itoa(objTypeGuild) + `, "guild", "Guild")
,(` + strconv.Itoa(objTypeMessage) + `, "msg", "Message")
,(` + strconv.Itoa(objTypeWar) + `, "war", "War")
,(` + strconv.Itoa(objTypeWarReport) + `, "war_report", "War Report")
,(` + strconv.Itoa(objTypeJob) + `, "job", "Job")
,(` + strconv.Itoa(objTypeItem) + `, "item", "Item")
,(` + strconv.Itoa(objTypeCastle) + `, "castle", "Castle")
,(` + strconv.Itoa(objTypeFair) + `, "fair", "Fair")
,(` + strconv.Itoa(objTypeUnion) + `, "union", "Trade Union")
,(` + strconv.Itoa(objTypeTribute) + `, "tribute", "Tribute")
,(` + strconv.Itoa(objTypeExperience) + `, "xp", "Experience")
,(` + strconv.Itoa(objTypeQuest) + `, "quest", "Quest")
VALUES (` + strconv.Itoa(cacheObjType[`user`]) + `, "user", "User")
,(` + strconv.Itoa(cacheObjType[`guild`]) + `, "guild", "Guild")
,(` + strconv.Itoa(cacheObjType[`msg`]) + `, "msg", "Message")
,(` + strconv.Itoa(cacheObjType[`war`]) + `, "war", "War")
,(` + strconv.Itoa(cacheObjType[`war_report`]) + `, "war_report", "War Report")
,(` + strconv.Itoa(cacheObjType[`job`]) + `, "job", "Job")
,(` + strconv.Itoa(cacheObjType[`item`]) + `, "item", "Item")
,(` + strconv.Itoa(cacheObjType[`castle`]) + `, "castle", "Castle")
,(` + strconv.Itoa(cacheObjType[`fair`]) + `, "fair", "Fair")
,(` + strconv.Itoa(cacheObjType[`union`]) + `, "union", "Trade Union")
,(` + strconv.Itoa(cacheObjType[`tribute`]) + `, "tribute", "Tribute")
,(` + strconv.Itoa(cacheObjType[`xp`]) + `, "xp", "Experience")
,(` + strconv.Itoa(cacheObjType[`quest`]) + `, "quest", "Quest")
;`)
failOnError(err, "initDB : populate table code_obj_type")
log.Println("initDB : code_obj_type populated ...")
*/
/*
_, err = db.Exec(`INSERT INTO code_obj_sub_type (id, intl_id, name, obj_type_id)
VALUES (` + strconv.Itoa(objSubTypeUser) + `, "user", "User", ` + strconv.Itoa(objTypeUser) + `)
,(` + strconv.Itoa(objSubTypeGuild) + `, "guild", "Guild", ` + strconv.Itoa(objTypeGuild) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg`]) + `, "unknown", "Unknown", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_war`]) + `, "war", "War report", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_guild_war`]) + `, "guild_war", "Guilds war report", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_report_req`]) + `, "report_req", "Player war report request", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_report_ack`]) + `, "report_ack", "Player war report ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_g_report_req`]) + `, "g_report_req", "Player guilds war report request", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_g_report_ack`]) + `, "g_report_ack", "Player guilds war report ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_quest_res`]) + `, "quest_res", "Quest result", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_quest_res_ambush`]) + `, "quest_res_ambush", "Quest result with Ambush", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_duel_fight`]) + `, "duel_fight", "Duel fight result", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_hero_req`]) + `, "hero_req", "Hero summary request", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_hero_ack`]) + `, "hero_ack", "Hero summary ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_me_req`]) + `, "me_req", "Hero short summary request", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_me_ack`]) + `, "me_ack", "Hero short summary ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_inv_req`]) + `, "inv_req", "Inventory request", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_inv_ack`]) + `, "inv_ack", "Inventory ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_inc`]) + `, "pillage_inc", "Pillage incoming", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_go`]) + `, "pillage_go", "Pillage go", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_timeout`]) + `, "pillage_timeout", "Pillage timeout", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_win`]) + `, "pillage_win", "Pillage win", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_loss`]) + `, "pillage_loss", "Pillage loss", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_tribute_inc`]) + `, "tribute_inc", "Tribute incoming", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_tribute_ack`]) + `, "tribute_ack", "Tribute acknowledged", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_auction_announce`]) + `, "auction_announce", "Auction announce", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_auction_upd_req`]) + `, "auction_upd_req", "Auction update request", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_auction_upd_ack`]) + `, "auction_upd_ack", "Auction update acknowledgment", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_time_ack`]) + `, "time_ack", "Time Acknowledgment", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_time_req`]) + `, "time_req", "Time Request", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go`]) + `, "go", "Go", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pledge`]) + `, "pledge", "Pledge", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go_quest_req`]) + `, "go_quest_req", "Go quest Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_fast_fight`]) + `, "fast_fight", "Arena fast fight", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go_arena`]) + `, "go_arena", "Go arena", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_top`]) + `, "top", "Top", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_menu`]) + `, "menu", "Menu", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_buy_req`]) + `, "buy_req", "Sell Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_sell_req`]) + `, "sell_req", "Buy Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_orderbook_req`]) + `, "orderbook_req", "Orderbook Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_orderbook_acl`]) + `, "orderbook_acl", "Orderbook Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_withdraw_req`]) + `, "withdraw_req", "Withdraw Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_withdraw_code`]) + `, "withdraw_code", "Withdraw Code", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_withdraw_rcv`]) + `, "withdraw_rcv", "Withdraw Received", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stock_req`]) + `, "stock_req", "Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stock_ack`]) + `, "stock_ack", "Stock Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_misc_req`]) + `, "misc_req", "Misc Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_misc_ack`]) + `, "misc_ack", "Misc Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_tureport_req`]) + `, "tureport_req", "Trade Union War Report Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_tureport_ack`]) + `, "tureport_ack", "Trade Union War Report Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_union_war`]) + `, "union_war", "Union war report", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_timeout`]) + `, "timeout", "Generic timeout", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go_quest_ack`]) + `, "go_quest_ack", "Go Quest Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_groles_req`]) + `, "groles_req", "Guild roles Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_groles_ack`]) + `, "groles_ack", "Guild roles Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_res_req`]) + `, "gstock_res_req", "GStock Res Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_alch_req`]) + `, "gstock_alch_req", "GStock Alch Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_misc_req`]) + `, "gstock_misc_req", "GStock Misc Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_rec_req`]) + `, "gstock_rec_req", "GStock Rec Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_part_req`]) + `, "gstock_part_req", "GStock Part Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_oth_req`]) + `, "gstock_oth_req", "Gstock Oth Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_any_ack`]) + `, "gstock_any_ack", "Gstock Any Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_req`]) + `, "gstock_req", "GStock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_ack`]) + `, "gstock_ack", "GStock Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_busy`]) + `, "busy", "Busy", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_res_stock_req`]) + `, "res_stock_req", "Resources Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_alch_stock_req`]) + `, "alch_stock_req", "Alchemy Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_misc_stock_req`]) + `, "misc_stock_req", "Misc Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_equip_stock_req`]) + `, "equip_stock_req", "Equipment Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_craft_stock_req`]) + `, "craft_stock_req", "Equipment Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stock_empty`]) + `, "stock_empty", "Stock Empty", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stock_any_ack`]) + `, "stock_any_ack", "Stock Any Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_g_deposit_req`]) + `, "g_deposit_req", "GDeposit Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_g_deposit_ack`]) + `, "g_deposit_ack", "GDeposit Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_attack_req`]) + `, "castle_attack_req", "Castle Attack Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_attack_ack`]) + `, "castle_attack_ack", "Castle Attack Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_target_req`]) + `, "castle_target_req", "Castle Target Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_target_ack`]) + `, "castle_target_ack", "Castle Target Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_def_req`]) + `, "castle_def_req", "Castle Defense Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_def_ack`]) + `, "castle_def_ack", "Castle Defense Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_back`]) + `, "back", "Back", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_req`]) + `, "castle_req", "Castle Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_ack`]) + `, "castle_ack", "Castle Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_exchange_req`]) + `, "exchange_req", "Exchange Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_exchange_ack`]) + `, "exchange_ack", "Exchange Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_equip_req`]) + `, "equip_req", "Equip Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_equip_ack`]) + `, "equip_ack", "Equip Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_unequip_req`]) + `, "unequip_req", "Unequip Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_unequip_ack`]) + `, "unequip_ack", "Unequip Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_no_stamina`]) + `, "no_stamina", "No Stamina", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_orderbook_search`]) + `, "orderbook_search", "Orderbook search", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_quest_req`]) + `, "quest_req", "Quest Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_quest_ack`]) + `, "quest_ack", "Quest Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_battle`]) + `, "battle", "Battle", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_order_cancel_req`]) + `, "order_cancel_req", "Order Cancel Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_order_cancel_ack`]) + `, "order_cancel_ack", "Order Cancel Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stamina_restored`]) + `, "stamina_restored", "Stamina Restored", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_heal_up`]) + `, "heal_up", "Heal Up", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_arena_fight_ack`]) + `, "arena_fight_ack", "Arena Fight Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go_arena`]Ack) + `, "go_arena_ack", "Go Arena Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_withdraw_nack`]) + `, "withdraw_nack", "Withdraw NAck", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_defeat`]) + `, "pillage_defeat", "Pillage Defeat", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_level_up_req`]) + `, "level_up_req", "Level Up Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_level_up_ack`]) + `, "level_up_ack", "Level Up Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_top`]Req) + `, "top_req", "Top Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_pillage`]) + `, "job_pillage", "Pillage job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_tribute`]) + `, "job_tribute", "Tribute job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_gwithdraw`]) + `, "job_gwithdraw", "GWithdrawal job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_gstock`]) + `, "job_gstock", "GStock job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_rescan_msg`]) + `, "job_rescan_msg", "Rescan message job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_set_done`]) + `, "job_set_done", "Set job as done job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_msg_client`]) + `, "job_msg_client", "Send message via client", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_msg_refresh`]) + `, "job_msg_refresh", "Refresh message from client", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_backup_export`]) + `, "job_backup_export", "Export Backup", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_backup_import`]) + `, "job_backup_import", "Import Backup", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_gdeposit`]) + `, "job_gdeposit", "GDeposit job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_gdeposit_fwd`]) + `, "job_gdeposit_fwd", "GDeposit Forward job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_save_res`]) + `, "job_save_res", "Save resources job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_vault_user_status`]) + `, "job_vault_user_status", "Vault User Status job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_vault_item_status`]) + `, "job_vault_item_status", "Vault Item Status job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_msg_fwd`]) + `, "job_fwd_msg", "Forward Message job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_set_def`]) + `, "job_set_def", "Set Defense job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_msg_del`]) + `, "job_msg_del", "Msg Del job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_get_hammer_time`]) + `, "job_get_hammer_time", "Get Hammer Time job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_res`]) + `, "item_res", "Resource", ` + strconv.Itoa(objTypeItem) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_alch`]) + `, "item_alch", "Alchemy", ` + strconv.Itoa(objTypeItem) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_misc`]) + `, "item_misc", "Miscelaneous", ` + strconv.Itoa(objTypeItem) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_recipe`]) + `, "item_recipe", "Recipe", ` + strconv.Itoa(objTypeItem) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_part`]) + `, "item_part", "Part", ` + strconv.Itoa(objTypeItem) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_other`]) + `, "item_other", "Other", ` + strconv.Itoa(objTypeItem) + `)
,(` + strconv.Itoa(objSubTypeCastle) + `, "castle", "Castle", ` + strconv.Itoa(objTypeCastle) + `)
,(` + strconv.Itoa(objSubTypeUnion) + `, "union", "Union", ` + strconv.Itoa(objTypeUnion) + `)
,(` + strconv.Itoa(objSubTypeFair) + `, "fair", "Fair", ` + strconv.Itoa(objTypeFair) + `)
,(` + strconv.Itoa(objSubTypeTribute) + `, "tribute", "Tribute", ` + strconv.Itoa(objTypeTribute) + `)
,(` + strconv.Itoa(objSubTypeExperience) + `, "xp", "Experience", ` + strconv.Itoa(objTypeExperience) + `)
,(` + strconv.Itoa(objSubTypeQuestForest) + `, "forest", "Forest", ` + strconv.Itoa(objTypeQuest) + `)
,(` + strconv.Itoa(objSubTypeQuestSwamp) + `, "swamp", "Swamp", ` + strconv.Itoa(objTypeQuest) + `)
,(` + strconv.Itoa(objSubTypeQuestValley) + `, "valley", "Valley", ` + strconv.Itoa(objTypeQuest) + `)
VALUES (` + strconv.Itoa(cacheObjSubType[`user`]) + `, "user", "User", ` + strconv.Itoa(cacheObjType[`user`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`guild`]) + `, "guild", "Guild", ` + strconv.Itoa(cacheObjType[`guild`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg`]) + `, "unknown", "Unknown", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_war`]) + `, "war", "War report", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_guild_war`]) + `, "guild_war", "Guilds war report", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_report_req`]) + `, "report_req", "Player war report request", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_report_ack`]) + `, "report_ack", "Player war report ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_g_report_req`]) + `, "g_report_req", "Player guilds war report request", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_g_report_ack`]) + `, "g_report_ack", "Player guilds war report ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_quest_res`]) + `, "quest_res", "Quest result", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_quest_res_ambush`]) + `, "quest_res_ambush", "Quest result with Ambush", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_duel_fight`]) + `, "duel_fight", "Duel fight result", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_hero_req`]) + `, "hero_req", "Hero summary request", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_hero_ack`]) + `, "hero_ack", "Hero summary ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_me_req`]) + `, "me_req", "Hero short summary request", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_me_ack`]) + `, "me_ack", "Hero short summary ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_inv_req`]) + `, "inv_req", "Inventory request", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_inv_ack`]) + `, "inv_ack", "Inventory ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_inc`]) + `, "pillage_inc", "Pillage incoming", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_go`]) + `, "pillage_go", "Pillage go", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_timeout`]) + `, "pillage_timeout", "Pillage timeout", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_win`]) + `, "pillage_win", "Pillage win", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_loss`]) + `, "pillage_loss", "Pillage loss", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_tribute_inc`]) + `, "tribute_inc", "Tribute incoming", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_tribute_ack`]) + `, "tribute_ack", "Tribute acknowledged", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_auction_announce`]) + `, "auction_announce", "Auction announce", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_auction_upd_req`]) + `, "auction_upd_req", "Auction update request", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_auction_upd_ack`]) + `, "auction_upd_ack", "Auction update acknowledgment", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_time_ack`]) + `, "time_ack", "Time Acknowledgment", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_time_req`]) + `, "time_req", "Time Request", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go`]) + `, "go", "Go", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pledge`]) + `, "pledge", "Pledge", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go_quest_req`]) + `, "go_quest_req", "Go quest Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_fast_fight`]) + `, "fast_fight", "Arena fast fight", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go_arena`]) + `, "go_arena", "Go arena", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_top`]) + `, "top", "Top", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_menu`]) + `, "menu", "Menu", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_buy_req`]) + `, "buy_req", "Sell Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_sell_req`]) + `, "sell_req", "Buy Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_orderbook_req`]) + `, "orderbook_req", "Orderbook Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_orderbook_acl`]) + `, "orderbook_acl", "Orderbook Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_withdraw_req`]) + `, "withdraw_req", "Withdraw Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_withdraw_code`]) + `, "withdraw_code", "Withdraw Code", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_withdraw_rcv`]) + `, "withdraw_rcv", "Withdraw Received", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stock_req`]) + `, "stock_req", "Stock Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stock_ack`]) + `, "stock_ack", "Stock Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_misc_req`]) + `, "misc_req", "Misc Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_misc_ack`]) + `, "misc_ack", "Misc Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_tureport_req`]) + `, "tureport_req", "Trade Union War Report Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_tureport_ack`]) + `, "tureport_ack", "Trade Union War Report Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_union_war`]) + `, "union_war", "Union war report", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_timeout`]) + `, "timeout", "Generic timeout", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go_quest_ack`]) + `, "go_quest_ack", "Go Quest Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_groles_req`]) + `, "groles_req", "Guild roles Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_groles_ack`]) + `, "groles_ack", "Guild roles Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_res_req`]) + `, "gstock_res_req", "GStock Res Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_alch_req`]) + `, "gstock_alch_req", "GStock Alch Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_misc_req`]) + `, "gstock_misc_req", "GStock Misc Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_rec_req`]) + `, "gstock_rec_req", "GStock Rec Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_part_req`]) + `, "gstock_part_req", "GStock Part Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_oth_req`]) + `, "gstock_oth_req", "Gstock Oth Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_any_ack`]) + `, "gstock_any_ack", "Gstock Any Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_req`]) + `, "gstock_req", "GStock Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_gstock_ack`]) + `, "gstock_ack", "GStock Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_busy`]) + `, "busy", "Busy", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_res_stock_req`]) + `, "res_stock_req", "Resources Stock Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_alch_stock_req`]) + `, "alch_stock_req", "Alchemy Stock Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_misc_stock_req`]) + `, "misc_stock_req", "Misc Stock Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_equip_stock_req`]) + `, "equip_stock_req", "Equipment Stock Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_craft_stock_req`]) + `, "craft_stock_req", "Equipment Stock Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stock_empty`]) + `, "stock_empty", "Stock Empty", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stock_any_ack`]) + `, "stock_any_ack", "Stock Any Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_g_deposit_req`]) + `, "g_deposit_req", "GDeposit Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_g_deposit_ack`]) + `, "g_deposit_ack", "GDeposit Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_attack_req`]) + `, "castle_attack_req", "Castle Attack Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_attack_ack`]) + `, "castle_attack_ack", "Castle Attack Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_target_req`]) + `, "castle_target_req", "Castle Target Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_target_ack`]) + `, "castle_target_ack", "Castle Target Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_def_req`]) + `, "castle_def_req", "Castle Defense Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_def_ack`]) + `, "castle_def_ack", "Castle Defense Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_back`]) + `, "back", "Back", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_req`]) + `, "castle_req", "Castle Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_castle_ack`]) + `, "castle_ack", "Castle Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_exchange_req`]) + `, "exchange_req", "Exchange Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_exchange_ack`]) + `, "exchange_ack", "Exchange Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_equip_req`]) + `, "equip_req", "Equip Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_equip_ack`]) + `, "equip_ack", "Equip Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_unequip_req`]) + `, "unequip_req", "Unequip Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_unequip_ack`]) + `, "unequip_ack", "Unequip Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_no_stamina`]) + `, "no_stamina", "No Stamina", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_orderbook_search`]) + `, "orderbook_search", "Orderbook search", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_quest_req`]) + `, "quest_req", "Quest Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_quest_ack`]) + `, "quest_ack", "Quest Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_battle`]) + `, "battle", "Battle", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_order_cancel_req`]) + `, "order_cancel_req", "Order Cancel Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_order_cancel_ack`]) + `, "order_cancel_ack", "Order Cancel Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_stamina_restored`]) + `, "stamina_restored", "Stamina Restored", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_heal_up`]) + `, "heal_up", "Heal Up", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_arena_fight_ack`]) + `, "arena_fight_ack", "Arena Fight Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_go_arena`]Ack) + `, "go_arena_ack", "Go Arena Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_withdraw_nack`]) + `, "withdraw_nack", "Withdraw NAck", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_pillage_defeat`]) + `, "pillage_defeat", "Pillage Defeat", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_level_up_req`]) + `, "level_up_req", "Level Up Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_level_up_ack`]) + `, "level_up_ack", "Level Up Ack", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`msg_top`]Req) + `, "top_req", "Top Req", ` + strconv.Itoa(cacheObjType[`msg`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_pillage`]) + `, "job_pillage", "Pillage job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_tribute`]) + `, "job_tribute", "Tribute job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_gwithdraw`]) + `, "job_gwithdraw", "GWithdrawal job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_gstock`]) + `, "job_gstock", "GStock job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_rescan_msg`]) + `, "job_rescan_msg", "Rescan message job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_set_done`]) + `, "job_set_done", "Set job as done job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_msg_client`]) + `, "job_msg_client", "Send message via client", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_msg_refresh`]) + `, "job_msg_refresh", "Refresh message from client", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_backup_export`]) + `, "job_backup_export", "Export Backup", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_backup_import`]) + `, "job_backup_import", "Import Backup", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_gdeposit`]) + `, "job_gdeposit", "GDeposit job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_gdeposit_fwd`]) + `, "job_gdeposit_fwd", "GDeposit Forward job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_save_res`]) + `, "job_save_res", "Save resources job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_vault_user_status`]) + `, "job_vault_user_status", "Vault User Status job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_vault_item_status`]) + `, "job_vault_item_status", "Vault Item Status job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_msg_fwd`]) + `, "job_fwd_msg", "Forward Message job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_set_def`]) + `, "job_set_def", "Set Defense job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_msg_del`]) + `, "job_msg_del", "Msg Del job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`job_get_hammer_time`]) + `, "job_get_hammer_time", "Get Hammer Time job", ` + strconv.Itoa(cacheObjType[`job`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_res`]) + `, "item_res", "Resource", ` + strconv.Itoa(cacheObjType[`item`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_alch`]) + `, "item_alch", "Alchemy", ` + strconv.Itoa(cacheObjType[`item`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_misc`]) + `, "item_misc", "Miscelaneous", ` + strconv.Itoa(cacheObjType[`item`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_recipe`]) + `, "item_recipe", "Recipe", ` + strconv.Itoa(cacheObjType[`item`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_part`]) + `, "item_part", "Part", ` + strconv.Itoa(cacheObjType[`item`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`item_other`]) + `, "item_other", "Other", ` + strconv.Itoa(cacheObjType[`item`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`castle`]) + `, "castle", "Castle", ` + strconv.Itoa(cacheObjType[`castle`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`union`]) + `, "union", "Union", ` + strconv.Itoa(cacheObjType[`union`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`fair`]) + `, "fair", "Fair", ` + strconv.Itoa(cacheObjType[`fair`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`tribute`]) + `, "tribute", "Tribute", ` + strconv.Itoa(cacheObjType[`tribute`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`xp`]) + `, "xp", "Experience", ` + strconv.Itoa(cacheObjType[`xp`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`quest_forest`]) + `, "forest", "Forest", ` + strconv.Itoa(cacheObjType[`quest`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`quest_swamp`]) + `, "swamp", "Swamp", ` + strconv.Itoa(cacheObjType[`quest`]) + `)
,(` + strconv.Itoa(cacheObjSubType[`quest_valley`]) + `, "valley", "Valley", ` + strconv.Itoa(cacheObjType[`quest`]) + `)
;`)
failOnError(err, "initDB : populate table code_obj_sub_type")
log.Println("initDB : code_obj_sub_type populated ...")
@ -609,7 +609,7 @@ func initDB() {
,obj_msg obm
,obj oi
,obj_msg_item omi
WHERE om.obj_type_id = ` + strconv.Itoa(objTypeMessage) + `
WHERE om.obj_type_id = ` + strconv.Itoa(cacheObjType[`msg`]) + `
AND om.obj_sub_type_id in (` + strconv.FormatInt(cacheObjSubType[`msg_withdraw_rcv`], 10) + `, ` + strconv.FormatInt(cacheObjSubType[`msg_g_deposit_ack`], 10) + `)
AND obm.obj_id = om.id
AND omi.obj_id = om.id