fight

package
v0.0.0-...-4ee4993 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ChannelFinishedFights = "finishedFights"

Variables

This section is empty.

Functions

func RegisterReport

func RegisterReport(factory FightReportFactory)

func ReportNames

func ReportNames() []string

Types

type Fight

type Fight struct {
	// Id is a unique identifier for the fight
	Id int

	// Target is the NPC that the fight is with
	Target string

	// Reports collect all of the information involved in the fight
	Reports FightReportSet

	// StartTime is when we first noticed we were involved
	StartTime time.Time

	// LastActivity is the last time we noticed a log message involving this fight
	LastActivity time.Time
}

Fight is a collection of reports about an encounter with a specific NPC

type FightReportFactory

type FightReportFactory interface {
	// Type of fight this factory creates
	Type() string

	// NewEmpty creates a fight of this type focused on a fight with the specified target
	NewEmpty(target string) FightReport

	// Merge a collection of reports of this type
	Merge(reports []FightReport) FightReport
}

type FightReportSet

type FightReportSet map[string]FightReport

FightReportSet represents the whole collection of reports for a fight

func MergeFightReports

func MergeFightReports(sets []FightReportSet) FightReportSet

func NewFightReports

func NewFightReports(target string) FightReportSet

NewFightReports create a collection of reports specialized to a fight against the specified target

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL