Working example

This commit is contained in:
stratic-dev
2024-02-26 03:07:03 +00:00
parent 746b4e8a25
commit a87c23629e
4 changed files with 3861 additions and 28 deletions

View File

@@ -275,7 +275,24 @@ func makeEventQuest(s *Session, rows *sql.Rows) ([]byte, error) {
}
bf.WriteUint8(questType)
if questType == 9 {
bf.WriteBool(false)
var state int16
s.server.db.QueryRow(`SELECT state
FROM campaign_state
WHERE character_id = $2
AND campaign_id = (
SELECT campaign_id
FROM campaign_entries
WHERE item_type = 9
AND item_no = $1
AND character_id = $2
)`, questId, s.charID).Scan(&state)
if state == 2 {
bf.WriteBool(true)
} else {
bf.WriteBool(false)
}
} else {
bf.WriteBool(true)
}