mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
add in sql and nil pointer fix
This commit is contained in:
5
schemas/patch-schema/event-ancientdragon.sql
Normal file
5
schemas/patch-schema/event-ancientdragon.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TYPE event_type ADD VALUE 'ancientdragon';
|
||||
|
||||
END;
|
||||
@@ -45,9 +45,12 @@ func handleMsgMhfEnumerateEvent(s *Session, p mhfpacket.MHFPacket) {
|
||||
id, start := uint32(0xCAFEBEEF), uint32(0)
|
||||
|
||||
rows, _ := s.server.db.Queryx("SELECT id, (EXTRACT(epoch FROM start_time)::int) as start_time FROM events WHERE event_type='ancientdragon'")
|
||||
if !rows.Next() {
|
||||
for rows.Next() {
|
||||
rows.Scan(&id, &start)
|
||||
}
|
||||
}
|
||||
|
||||
var timestamps []uint32
|
||||
events := []Event{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user