This commit is contained in:
shoopea 2019-05-25 15:39:34 +08:00
parent ca4bc33664
commit 4a7da605e0
2 changed files with 5 additions and 5 deletions

2
obj.go
View File

@ -259,7 +259,7 @@ func loadObjGuild() error {
defer guilds.Close()
for guilds.Next() {
err = rules.Scan(&id, &tag, &name)
err = guilds.Scan(&id, &tag, &name)
if err != nil {
return err
}

8
sql.go
View File

@ -382,7 +382,7 @@ func initDB() {
,(` + strconv.Itoa(objSubTypeMessageTUReportReq) + `, "tureport_req", "Trade Union War Report Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageTUReportAck) + `, "tureport_ack", "Trade Union War Report Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageFairWar) + `, "fair_war", "Fair war report", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMEssageUnionWar) + `, "union_war", "Union war report", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "union_war", "Union war report", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeJobPillage) + `, "job_pillage", "Pillage job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(objSubTypeJobTribute) + `, "job_tribute", "Tribute job", ` + strconv.Itoa(objTypeJob) + `)
,(` + strconv.Itoa(objSubTypeJobWithdrawal) + `, "job_withdraw", "Withdrawal job", ` + strconv.Itoa(objTypeJob) + `)
@ -1426,7 +1426,7 @@ func insertMsgDuelFight(m *ChatWarsMessageDuelFight) error {
}
defer stmt.Close()
_, err = stmt.Exec(m.ObjID64, CastleID(m.WinCastle), m.WinGuild, m.WinUser, m.WinLife, CastleID(m.LossCastle), m.LossGuild, m.LossUser, m.LossLife, m.Weapon)
_, err = stmt.Exec(m.ObjID64, getObjCastleID(m.WinCastle), m.WinGuild, m.WinUser, m.WinLife, getObjCastleID(m.LossCastle), m.LossGuild, m.LossUser, m.LossLife, m.Weapon)
if err != nil {
return err
}
@ -1487,7 +1487,7 @@ func insertMsgMiniWar(m *ChatWarsMessageMiniWar) error {
defer stmt2.Close()
for c, r := range m.Report {
_, err = stmt2.Exec(m.ObjID64, CastleID(c), r.Gardian, r.Result, r.Gold, r.Stock, r.Points)
_, err = stmt2.Exec(m.ObjID64, getObjCastleID(c), r.Gardian, r.Result, r.Gold, r.Stock, r.Points)
if err != nil {
return err
}
@ -1512,7 +1512,7 @@ func insertMsgPillageInc(m *ChatWarsMessagePillageInc) error {
}
defer stmt.Close()
_, err = stmt.Exec(m.ObjID64, m.Attacker, m.Guild, CastleID(m.Castle))
_, err = stmt.Exec(m.ObjID64, m.Attacker, m.Guild, getObjCastleID(m.Castle))
if err != nil {
return err