Skip to content

Commit

Permalink
Merge pull request #104 from UnownHash/small-fixes
Browse files Browse the repository at this point in the history
small fixes
  • Loading branch information
TurtIeSocks authored Apr 15, 2023
2 parents 9a729d3 + d165050 commit 5f1b50f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/pokestop.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func GetQuestStatus(db DbDetails, fence geo.Geofence) (QuestStatus, error) {
"SELECT COUNT(*) AS total, "+
"COUNT(CASE WHEN quest_type IS NOT NULL THEN 1 END) AS ar_quests, "+
"COUNT(CASE WHEN alternative_quest_type IS NOT NULL THEN 1 END) AS no_ar_quests FROM pokestop "+
"WHERE lat > ? AND lon > ? AND lat < ? AND lon < ? AND enabled = 1 "+
"WHERE lat > ? AND lon > ? AND lat < ? AND lon < ? AND enabled = 1 AND deleted = 0 "+
"AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON(("+fence.ToPolygonString()+"))'), point(lat,lon)) ",
bbox.MinimumLatitude, bbox.MinimumLongitude, bbox.MaximumLatitude, bbox.MaximumLongitude,
)
Expand Down
4 changes: 3 additions & 1 deletion decoder/incident.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ func (incident *Incident) updateFromOpenInvasionCombatSessionOut(protoRes *pogo.
}

func (incident *Incident) updateFromStartIncidentOut(proto *pogo.StartIncidentOutProto) {
incident.Character = int16(proto.Incident.Step[0].GetInvasionBattle().GetCharacter())
incident.Character = int16(proto.GetIncident().GetStep()[0].GetPokestopDialogue().GetDialogueLine()[0].GetCharacter())
incident.Confirmed = true
incident.StartTime = int64(proto.Incident.GetCompletionDisplay().GetIncidentStartMs() / 1000)
incident.ExpirationTime = int64(proto.Incident.GetCompletionDisplay().GetIncidentExpirationMs() / 1000)
}

0 comments on commit 5f1b50f

Please sign in to comment.