Skip to content

Commit

Permalink
Merge pull request #3710 from jarveson/jake/tooltip-perf
Browse files Browse the repository at this point in the history
tooltip perf
  • Loading branch information
jarveson authored Sep 20, 2023
2 parents 26618e7 + a74c5d3 commit 7d8910d
Show file tree
Hide file tree
Showing 33 changed files with 388 additions and 407 deletions.
74 changes: 74 additions & 0 deletions sim/core/base_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,77 @@ var ClassBaseStats = map[proto.Class]stats.Stats{
func AddBaseStatsCombo(r proto.Race, c proto.Class) {
BaseStats[BaseStatsKey{Race: r, Class: c}] = ClassBaseStats[c].Add(RaceOffsets[r]).Add(ExtraClassBaseStats[c])
}

func init() {
AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassDruid)
AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassDruid)

AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassDeathknight)
AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassDeathknight)
AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassDeathknight)
AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassDeathknight)
AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassDeathknight)
AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassDeathknight)
AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassDeathknight)
AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassDeathknight)
AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassDeathknight)
AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassDeathknight)

AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassHunter)
AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassHunter)
AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassHunter)
AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassHunter)
AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassHunter)
AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassHunter)
AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassHunter)

AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassMage)
AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassMage)
AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassMage)
AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassMage)
AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassMage)
AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassMage)

AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassPaladin)
AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassPaladin)
AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassPaladin)
AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassPaladin)

AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassPriest)
AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassPriest)
AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassPriest)
AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassPriest)
AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassPriest)
AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassPriest)
AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassPriest)

AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassRogue)
AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassRogue)
AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassRogue)
AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassRogue)
AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassRogue)
AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassRogue)
AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassRogue)
AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassRogue)

AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassShaman)
AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassShaman)
AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassShaman)
AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassShaman)

AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassWarlock)
AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassWarlock)
AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassWarlock)
AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassWarlock)
AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassWarlock)

AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassWarrior)
AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassWarrior)
AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassWarrior)
AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassWarrior)
AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassWarrior)
AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassWarrior)
AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassWarrior)
AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassWarrior)
AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassWarrior)
}
13 changes: 0 additions & 13 deletions sim/deathknight/deathknight.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,19 +525,6 @@ func (dk *Deathknight) AverageDSHeal() float64 {
}
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassDeathknight)
core.AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassDeathknight)
core.AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassDeathknight)
core.AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassDeathknight)
core.AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassDeathknight)
core.AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassDeathknight)
core.AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassDeathknight)
core.AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassDeathknight)
core.AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassDeathknight)
core.AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassDeathknight)
}

// Agent is a generic way to access underlying warrior on any of the agents.

func (dk *Deathknight) GetDeathKnight() *Deathknight {
Expand Down
5 changes: 0 additions & 5 deletions sim/druid/druid.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,6 @@ func New(char core.Character, form DruidForm, selfBuffs SelfBuffs, talents strin
return druid
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassDruid)
core.AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassDruid)
}

type DruidSpell struct {
*core.Spell
FormMask DruidForm
Expand Down
10 changes: 0 additions & 10 deletions sim/hunter/hunter.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,6 @@ func NewHunter(character core.Character, options *proto.Player) *Hunter {
return hunter
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassHunter)
core.AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassHunter)
core.AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassHunter)
core.AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassHunter)
core.AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassHunter)
core.AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassHunter)
core.AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassHunter)
}

// Agent is a generic way to access underlying hunter on any of the agents.
type HunterAgent interface {
GetHunter() *Hunter
Expand Down
12 changes: 2 additions & 10 deletions sim/mage/mage.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package mage

import (
"github.com/wowsims/wotlk/sim/common/wotlk"
"time"

"github.com/wowsims/wotlk/sim/common/wotlk"

"github.com/wowsims/wotlk/sim/core"
"github.com/wowsims/wotlk/sim/core/proto"
"github.com/wowsims/wotlk/sim/core/stats"
Expand Down Expand Up @@ -212,15 +213,6 @@ func NewMage(character core.Character, options *proto.Player) *Mage {
return mage
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassMage)
core.AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassMage)
core.AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassMage)
core.AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassMage)
core.AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassMage)
core.AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassMage)
}

// Agent is a generic way to access underlying mage on any of the agents.
type MageAgent interface {
GetMage() *Mage
Expand Down
7 changes: 0 additions & 7 deletions sim/paladin/paladin.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,3 @@ func NewPaladin(character core.Character, talentsStr string) *Paladin {
func (paladin *Paladin) GetMutualLockoutDPAW() *core.Timer {
return paladin.Character.GetOrInitTimer(&paladin.mutualLockoutDPAW)
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassPaladin)
core.AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassPaladin)
core.AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassPaladin)
core.AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassPaladin)
}
10 changes: 0 additions & 10 deletions sim/priest/priest.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,6 @@ func New(char core.Character, selfBuffs SelfBuffs, talents string) *Priest {
return priest
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassPriest)
core.AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassPriest)
core.AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassPriest)
core.AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassPriest)
core.AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassPriest)
core.AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassPriest)
core.AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassPriest)
}

// Agent is a generic way to access underlying priest on any of the agents.
type PriestAgent interface {
GetPriest() *Priest
Expand Down
11 changes: 0 additions & 11 deletions sim/rogue/rogue.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,6 @@ func (rogue *Rogue) IsStealthed() bool {
return false
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassRogue)
core.AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassRogue)
core.AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassRogue)
core.AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassRogue)
core.AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassRogue)
core.AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassRogue)
core.AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassRogue)
core.AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassRogue)
}

// Agent is a generic way to access underlying rogue on any of the agents.
type RogueAgent interface {
GetRogue() *Rogue
Expand Down
7 changes: 0 additions & 7 deletions sim/shaman/shaman.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,3 @@ func (shaman *Shaman) ElementalCritMultiplier(secondary float64) float64 {
critBonus := 0.2*float64(shaman.Talents.ElementalFury) + secondary
return shaman.SpellCritMultiplier(1, critBonus)
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassShaman)
core.AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassShaman)
core.AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassShaman)
core.AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassShaman)
}
11 changes: 2 additions & 9 deletions sim/warlock/warlock.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package warlock

import (
"github.com/wowsims/wotlk/sim/common/wotlk"
"time"

"github.com/wowsims/wotlk/sim/common/wotlk"

"github.com/wowsims/wotlk/sim/core"
"github.com/wowsims/wotlk/sim/core/proto"
"github.com/wowsims/wotlk/sim/core/stats"
Expand Down Expand Up @@ -262,14 +263,6 @@ func RegisterWarlock() {
)
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceBloodElf, proto.Class_ClassWarlock)
core.AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassWarlock)
core.AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassWarlock)
core.AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassWarlock)
core.AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassWarlock)
}

// Agent is a generic way to access underlying warlock on any of the agents.
type WarlockAgent interface {
GetWarlock() *Warlock
Expand Down
12 changes: 0 additions & 12 deletions sim/warrior/warrior.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,18 +223,6 @@ func (warrior *Warrior) intensifyRageCooldown(baseCd time.Duration) time.Duratio
return []time.Duration{baseCd * 100, baseCd * 89, baseCd * 78, baseCd * 67}[warrior.Talents.IntensifyRage]
}

func init() {
core.AddBaseStatsCombo(proto.Race_RaceDraenei, proto.Class_ClassWarrior)
core.AddBaseStatsCombo(proto.Race_RaceDwarf, proto.Class_ClassWarrior)
core.AddBaseStatsCombo(proto.Race_RaceGnome, proto.Class_ClassWarrior)
core.AddBaseStatsCombo(proto.Race_RaceHuman, proto.Class_ClassWarrior)
core.AddBaseStatsCombo(proto.Race_RaceNightElf, proto.Class_ClassWarrior)
core.AddBaseStatsCombo(proto.Race_RaceOrc, proto.Class_ClassWarrior)
core.AddBaseStatsCombo(proto.Race_RaceTauren, proto.Class_ClassWarrior)
core.AddBaseStatsCombo(proto.Race_RaceTroll, proto.Class_ClassWarrior)
core.AddBaseStatsCombo(proto.Race_RaceUndead, proto.Class_ClassWarrior)
}

// Agent is a generic way to access underlying warrior on any of the agents.
type WarriorAgent interface {
GetWarrior() *Warrior
Expand Down
Loading

0 comments on commit 7d8910d

Please sign in to comment.