track fish; use new go tooling
This commit is contained in:
parent
7332fd6fad
commit
2bfd19339c
6 changed files with 51 additions and 47 deletions
|
@ -32,7 +32,7 @@ func (eh *EventHandler) HandleEvent(ctx context.Context, event types.ESSEvent) {
|
|||
return
|
||||
}
|
||||
|
||||
if event.EventName == "Death" || event.EventName == "VehicleDestroy" {
|
||||
if event.EventName == "Death" || event.EventName == "VehicleDestroy" || event.EventName == "FishScan" {
|
||||
go eh.HandleDeath(ctx, event)
|
||||
} else if event.EventName == "GainExperience" {
|
||||
go eh.HandleExperience(ctx, event)
|
||||
|
|
|
@ -16,7 +16,7 @@ func getEventNames() []string {
|
|||
events := util.Map(experienceIDs, func(i int) string {
|
||||
return fmt.Sprintf("GainExperience_experience_id_%d", i)
|
||||
})
|
||||
events = append(events, "Death", "VehicleDestroy")
|
||||
events = append(events, "Death", "VehicleDestroy", "FishScan")
|
||||
|
||||
return events
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ func (wsm *WebsocketManager) Start() {
|
|||
log.Fatalln("wsm: read failed:", err)
|
||||
}
|
||||
|
||||
// log.Printf("raw event: %s", string(data))
|
||||
log.Printf("raw event: %s", string(data))
|
||||
|
||||
err = json.Unmarshal(data, &event)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue