shared

package
v0.0.221 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ItemVersionLFR = iota
	ItemVersionNormal
	ItemVersionHeroic
	ItemVersionThunderforged
	ItemVersionHeroicThunderforged
	ItemVersionWarforged
	ItemVersionHeroicWarforged
	ItemVersionFlexible
)

Variables

This section is empty.

Functions

func GetOutcome

func GetOutcome(spell *core.Spell, outcome OutcomeType) core.OutcomeApplier

func NewProcDamageEffect

func NewProcDamageEffect(config ProcDamageEffect)

func NewProcStatBonusEffect

func NewProcStatBonusEffect(config ProcStatBonusEffect)

func NewProcStatBonusEffectWithDamageProc

func NewProcStatBonusEffectWithDamageProc(config ProcStatBonusEffect, damage DamageEffect)

func NewProcStatBonusEffectWithVariants

func NewProcStatBonusEffectWithVariants(config ProcStatBonusEffect, variants []ItemVariant)

func NewSimpleStatActive

func NewSimpleStatActive(itemID int32)

func NewSimpleStatActiveWithVariants added in v0.0.221

func NewSimpleStatActiveWithVariants(variants []ItemVariant)

func NewStackingStatBonusCD

func NewStackingStatBonusCD(config StackingStatBonusCD)

Creates a new stacking stats bonus aura based on the configuration.

func NewStackingStatBonusEffect

func NewStackingStatBonusEffect(config StackingStatBonusEffect)

func RegisterIgniteEffect

func RegisterIgniteEffect(unit *core.Unit, config IgniteConfig) *core.Spell

func RegisterRiposteEffect added in v0.0.6

func RegisterRiposteEffect(character *core.Character, auraSpellID int32, triggerSpellID int32)

Types

type CustomProcHandler

type CustomProcHandler func(sim *core.Simulation, procAura *core.StatBuffAura)

type DamageEffect

type DamageEffect struct {
	SpellID          int32
	School           core.SpellSchool
	MinDmg           float64
	MaxDmg           float64
	BonusCoefficient float64
	IsMelee          bool
	ProcMask         core.ProcMask
	Outcome          OutcomeType
}

type ExtraSpellInfo

type ExtraSpellInfo struct {
	Spell   *core.Spell
	Trigger func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult)
}

type IgniteConfig

type IgniteConfig struct {
	ActionID           core.ActionID
	ClassSpellMask     int64
	SpellSchool        core.SpellSchool
	CritMultiplier     float64 // Optional crit multiplier in case the Ignite DoT can crit (Such as the legendary caster cloak)
	DisableCastMetrics bool
	DotAuraLabel       string
	DotAuraTag         string
	ProcTrigger        core.ProcTrigger // Ignores the Handler field and creates a custom one, but uses all others.
	DamageCalculator   IgniteDamageCalculator
	IncludeAuraDelay   bool // "munching" and "free roll-over" interactions
	NumberOfTicks      int32
	TickImmediately    bool
	OnTick             core.OnTick // Overrides default OnTick
	TickLength         time.Duration
	ParentAura         *core.Aura
}

type IgniteDamageCalculator

type IgniteDamageCalculator func(result *core.SpellResult) float64

Takes in the SpellResult for the triggering spell, and returns the total damage of a *fresh* Ignite triggered by that spell. Roll-over damage calculations for existing Ignites are handled internally.

type ItemVariant

type ItemVariant struct {
	ItemID   int32
	ItemName string
}

type ItemVersion

type ItemVersion byte

func (ItemVersion) GetLabel

func (version ItemVersion) GetLabel() string

type ItemVersionFactory

type ItemVersionFactory func(version ItemVersion, id int32, versionLabel string)

type ItemVersionMap

type ItemVersionMap map[ItemVersion]int32

func (ItemVersionMap) RegisterAll

func (versions ItemVersionMap) RegisterAll(fac ItemVersionFactory)

type OutcomeType

type OutcomeType uint64
const (
	OutcomeDefault                  = 0
	OutcomeMeleeCanCrit OutcomeType = iota
	OutcomeMeleeNoCrit
	OutcomeMeleeNoBlockDodgeParryCrit
	OutcomeSpellCanCrit
	OutcomeSpellNoCrit
	OutcomeSpellNoMissCanCrit
	OutcomeRangedCanCrit
)

type ProcDamageEffect

type ProcDamageEffect struct {
	ItemID     int32
	SpellID    int32
	EnchantID  int32
	Trigger    core.ProcTrigger
	TriggerDPM func(*core.Character) *core.DynamicProcManager
	School     core.SpellSchool
	MinDmg     float64
	MaxDmg     float64
	IsMelee    bool
	Flags      core.SpellFlag
	Outcome    OutcomeType
}

type ProcStatBonusEffect

type ProcStatBonusEffect struct {
	Name               string
	ItemID             int32
	EnchantID          int32
	Callback           core.AuraCallback
	ProcMask           core.ProcMask
	Outcome            core.HitOutcome
	RequireDamageDealt bool

	// Any other custom proc conditions not covered by the above fields.
	CustomProcCondition core.CustomStatBuffProcCondition
}

type StackingStatBonusCD

type StackingStatBonusCD struct {
	Name               string
	ItemID             int32
	AuraID             int32
	Bonus              stats.Stats
	Duration           time.Duration
	MaxStacks          int32
	CD                 time.Duration
	Callback           core.AuraCallback
	ProcMask           core.ProcMask
	SpellFlags         core.SpellFlag
	Outcome            core.HitOutcome
	RequireDamageDealt bool
	ProcChance         float64
	IsDefensive        bool
	Rppm               core.RPPMConfig

	// The stacks will only be granted as long as the trinket is active
	TrinketLimitsDuration bool
}

type StackingStatBonusEffect

type StackingStatBonusEffect struct {
	Name               string
	ItemID             int32
	AuraID             int32
	Bonus              stats.Stats
	Duration           time.Duration
	MaxStacks          int32
	Callback           core.AuraCallback
	ProcMask           core.ProcMask
	Rppm               core.RPPMConfig
	SpellFlags         core.SpellFlag
	Outcome            core.HitOutcome
	RequireDamageDealt bool
	ProcChance         float64
	Icd                time.Duration
}

Jump to

Keyboard shortcuts

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