evtc

package module
v0.0.0-...-c2acb7c Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package evtc implements a parser for arcdps event chains (combat logs).

Index

Constants

This section is empty.

Variables

View Source
var BaseNPCStats = []struct {
	Defense   int
	Power     int
	Attribute int
}{

	{123, 162, 5},
	{128, 179, 10},
	{134, 197, 17},
	{138, 214, 22},
	{143, 231, 27},
	{148, 249, 35},
	{153, 267, 45},
	{158, 286, 50},
	{162, 303, 55},
	{167, 322, 60},
	{175, 344, 68},
	{183, 367, 76},
	{185, 389, 84},
	{187, 394, 92},
	{190, 402, 94},
	{192, 412, 95},
	{202, 439, 103},
	{206, 454, 108},
	{210, 469, 112},
	{214, 483, 116},
	{220, 500, 123},
	{224, 517, 129},
	{239, 556, 140},
	{245, 575, 147},
	{250, 593, 153},
	{256, 612, 160},
	{261, 622, 166},
	{267, 632, 171},
	{285, 672, 186},
	{291, 684, 192},
	{311, 728, 208},
	{320, 744, 219},
	{328, 761, 230},
	{337, 778, 238},
	{356, 820, 253},
	{365, 839, 259},
	{385, 885, 274},
	{394, 905, 279},
	{402, 924, 284},
	{411, 943, 290},
	{432, 991, 304},
	{443, 1016, 317},
	{465, 1067, 339},
	{476, 1093, 353},
	{486, 1119, 366},
	{497, 1145, 380},
	{517, 1193, 401},
	{527, 1220, 416},
	{550, 1275, 440},
	{561, 1304, 454},
	{575, 1337, 471},
	{588, 1372, 488},
	{610, 1427, 514},
	{624, 1461, 532},
	{649, 1525, 561},
	{662, 1562, 579},
	{676, 1599, 598},
	{690, 1637, 617},
	{711, 1692, 643},
	{725, 1731, 662},
	{752, 1802, 696},
	{769, 1848, 718},
	{784, 1891, 741},
	{799, 1936, 765},
	{822, 1999, 795},
	{837, 2045, 818},
	{878, 2153, 866},
	{893, 2201, 891},
	{909, 2249, 916},
	{924, 2298, 941},
	{949, 2368, 976},
	{968, 2424, 1004},
	{1011, 2545, 1059},
	{1030, 2604, 1089},
	{1049, 2662, 1119},
	{1067, 2723, 1149},
	{1090, 2792, 1183},
	{1109, 2854, 1214},
	{1155, 2985, 1274},
	{1174, 3047, 1307},
	{1223, 3191, 1374},
	{1247, 3269, 1413},
	{1271, 3348, 1453},
	{1295, 3427, 1493},
	{1319, 3508, 1534},
}

BaseNPCStats for levels 0 to 84, provided for convenience.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

func (*Agent) Hitbox

func (a *Agent) Hitbox() (width, height int)

func (*Agent) IsGadget

func (a *Agent) IsGadget() bool

func (*Agent) MarshalJSON

func (a *Agent) MarshalJSON() ([]byte, error)

func (*Agent) Master

func (a *Agent) Master() *Agent

func (*Agent) NPC

func (a *Agent) NPC() (NPCInfo, bool)

func (*Agent) Name

func (a *Agent) Name() string

func (*Agent) Player

func (a *Agent) Player() (PlayerInfo, bool)

type ApplyBuffEvent

type ApplyBuffEvent struct {
	CommonEvent
	Duration time.Duration
	Instance uint32
	Active   bool

	WastedDuration time.Duration
	NewDuration    time.Duration
}

type BaseEvent

type BaseEvent struct {
	Type       string
	LocalTime  time.Time
	ServerTime time.Time
	Source     *Agent
}

BaseEvent is the shared implementation of Event.

func (*BaseEvent) SourceAgent

func (e *BaseEvent) SourceAgent() *Agent

SourceAgent implements Event.

func (*BaseEvent) Time

func (e *BaseEvent) Time() (local, server time.Time)

Time implements Event.

type BuffActiveEvent

type BuffActiveEvent struct {
	BaseEvent
	Instance uint32
}

type BuffDamageEvent

type BuffDamageEvent struct {
	CommonEvent
	Damage  int
	Tick    bool
	Success bool
	// contains filtered or unexported fields
}

type BuffRemoveEvent

type BuffRemoveEvent struct {
	CommonEvent
	Duration    time.Duration
	Intensity   time.Duration
	Count       int
	Instance    uint32
	Synthesized bool
	All         bool
}

type BuffResetEvent

type BuffResetEvent struct {
	BaseEvent
	Duration time.Duration
	Instance uint32
}

type CombatEvent

type CombatEvent interface {
	SkillEvent

	// TargetAgent returns the agent directly affected by this event.
	// This method may return nil.
	TargetAgent() *Agent

	IsFriend() bool
	IsFoe() bool
	IsNinety() bool
	IsFifty() bool
	IsMoving() bool
	IsFlanking() bool
}

CombatEvent is the base interface all events with targets implement.

type CommonEvent

type CommonEvent struct {
	BaseEvent
	Target    *Agent
	SkillID   int
	SkillName string

	Friend   bool
	Foe      bool
	Ninety   bool
	Fifty    bool
	Moving   bool
	Flanking bool
}

CommonEvent is the shared implementation of CombatEvent.

func (*CommonEvent) IsFifty

func (e *CommonEvent) IsFifty() bool

IsFifty implements CombatEvent.

func (*CommonEvent) IsFlanking

func (e *CommonEvent) IsFlanking() bool

IsFlanking implements CombatEvent.

func (*CommonEvent) IsFoe

func (e *CommonEvent) IsFoe() bool

IsFoe implements CombatEvent.

func (*CommonEvent) IsFriend

func (e *CommonEvent) IsFriend() bool

IsFriend implements CombatEvent.

func (*CommonEvent) IsMoving

func (e *CommonEvent) IsMoving() bool

IsMoving implements CombatEvent.

func (*CommonEvent) IsNinety

func (e *CommonEvent) IsNinety() bool

IsNinety implements CombatEvent.

func (*CommonEvent) Skill

func (e *CommonEvent) Skill() (id int, name string)

Skill implements CombatEvent.

func (*CommonEvent) TargetAgent

func (e *CommonEvent) TargetAgent() *Agent

TargetAgent implements CombatEvent.

type DirectDamageEvent

type DirectDamageEvent struct {
	CommonEvent
	Damage         int
	Barrier        int
	WasDowned      bool
	Success        bool
	Critical       bool
	Glancing       bool
	Interrupt      bool
	Blocked        bool
	Evaded         bool
	Invulnerable   bool
	Missed         bool
	BecameDefeated bool
	BecameDowned   bool
}

type EliteSpecID

type EliteSpecID int

EliteSpecID is the ID of a Guild Wars 2 elite specialization.

const (
	Druid        EliteSpecID = 5
	Daredevil    EliteSpecID = 7
	Berserker    EliteSpecID = 18
	Dragonhunter EliteSpecID = 27
	Reaper       EliteSpecID = 34
	Chronomancer EliteSpecID = 40
	Scrapper     EliteSpecID = 43
	Tempest      EliteSpecID = 48
	Herald       EliteSpecID = 52
	Soulbeast    EliteSpecID = 55
	Weaver       EliteSpecID = 56
	Holosmith    EliteSpecID = 57
	Deadeye      EliteSpecID = 58
	Mirage       EliteSpecID = 59
	Scourge      EliteSpecID = 60
	Spellbreaker EliteSpecID = 61
	Firebrand    EliteSpecID = 62
	Renegade     EliteSpecID = 63
)

func (EliteSpecID) String

func (id EliteSpecID) String() string

type EnterCombatEvent

type EnterCombatEvent struct {
	BaseEvent
	Subgroup int
}

type Event

type Event interface {
	// Time returns the local and server time of this event.
	// This is computed from an offset from the log start timestamp.
	Time() (local, server time.Time)

	// SourceAgent returns the agent that caused this event.
	// This method may return nil.
	SourceAgent() *Agent
}

Event is the base interface all events implement.

type EventChain

type EventChain struct {
	ArcDPSVersion string
	BuildID       int
	BossSpecies   int
	BossName      string
	PointOfView   *Agent
	Language      language.Tag
	Events        []Event
	WorldID       uint16
	MapID         uint16
	// contains filtered or unexported fields
}

func Parse

func Parse(r io.Reader) (*EventChain, error)

Parse parses and EVTC file.

type ExitCombatEvent

type ExitCombatEvent struct {
	BaseEvent
}

type FacingEvent

type FacingEvent struct {
	BaseEvent
	X, Y float32
}

type GuildEvent

type GuildEvent struct {
	BaseEvent
	Guild uuid.UUID
}

type HealthUpdateEvent

type HealthUpdateEvent struct {
	BaseEvent
	// Percentage is fixed-point with two decimal places.
	// (99.5% is represented as 9950)
	Percentage uint16
}

type InitialBuffEvent

type InitialBuffEvent struct {
	BaseEvent
	SkillID   int
	SkillName string
	Duration  time.Duration
	Instance  uint32
	Active    bool
}

func (*InitialBuffEvent) Skill

func (e *InitialBuffEvent) Skill() (id int, name string)

type LogEndEvent

type LogEndEvent struct {
	BaseEvent
	RealServerTime time.Time
	RealLocalTime  time.Time
}

type LogStartEvent

type LogStartEvent struct {
	BaseEvent
}

type MaxHealthUpdateEvent

type MaxHealthUpdateEvent struct {
	BaseEvent
	MaxHealth uint64
}

type NPCInfo

type NPCInfo struct {
	SpeciesID int

	Toughness     int
	Concentration int
	Healing       int
	Condition     int
}

type PlayerInfo

type PlayerInfo struct {
	Name       string
	Account    string
	Subgroup   int
	Profession ProfessionID
	EliteSpec  EliteSpecID

	Toughness     uint8
	Concentration uint8
	Healing       uint8
	Condition     uint8
}

type PositionEvent

type PositionEvent struct {
	BaseEvent
	X, Y, Z float32
}

type ProfessionID

type ProfessionID int

ProfessionID is the ID of a Guild Wars 2 profession.

const (
	Guardian     ProfessionID = 1
	Warrior      ProfessionID = 2
	Engineer     ProfessionID = 3
	Ranger       ProfessionID = 4
	Thief        ProfessionID = 5
	Elementalist ProfessionID = 6
	Mesmer       ProfessionID = 7
	Necromancer  ProfessionID = 8
	Revenant     ProfessionID = 9
)

func (ProfessionID) String

func (id ProfessionID) String() string

type RewardEvent

type RewardEvent struct {
	BaseEvent
	RewardID   int
	RewardType int
}

type SkillActivatedEvent

type SkillActivatedEvent struct {
	CommonEvent
	Duration time.Duration
	Complete bool
	Reset    bool
}

type SkillActivationEvent

type SkillActivationEvent struct {
	CommonEvent
	ExpectedDuration time.Duration
	Quickness        bool
}

type SkillEvent

type SkillEvent interface {
	Event

	// Skill returns the ID and name of the skill that was used.
	// For unknown events, name may be empty or the same as the ID.
	Skill() (id int, name string)
}

SkillEvent is the base interface for events related to skills.

type StateChangedEvent

type StateChangedEvent struct {
	BaseEvent
	Downed   bool
	Defeated bool
}

type TargetableEvent

type TargetableEvent struct {
	BaseEvent
	Targetable bool
}

type TeamChangeEvent

type TeamChangeEvent struct {
	BaseEvent
	TeamID int
}

type TrackingChangedEvent

type TrackingChangedEvent struct {
	BaseEvent
	Tracking bool
}

type VelocityEvent

type VelocityEvent struct {
	BaseEvent
	X, Y, Z float32
}

type WeakPointEvent

type WeakPointEvent struct {
	BaseEvent
	Boss       *Agent
	Targetable bool
}

type WeaponSwapEvent

type WeaponSwapEvent struct {
	BaseEvent
	WeaponSet int
}

Jump to

Keyboard shortcuts

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