diff --git a/assets/database/db.bin b/assets/database/db.bin index 3b15215e34..3c9e1844e1 100644 Binary files a/assets/database/db.bin and b/assets/database/db.bin differ diff --git a/assets/database/db.json b/assets/database/db.json index 7fb482afba..dc9ec149da 100644 --- a/assets/database/db.json +++ b/assets/database/db.json @@ -9638,13 +9638,16 @@ "spellIcons":[ {"id":702,"name":"Curse of Weakness","icon":"spell_shadow_curseofmannoroth","hasBuff":true}, {"id":724,"name":"Lightwell","icon":"spell_holy_summonlightwell"}, +{"id":768,"name":"Cat Form","icon":"ability_druid_catform","hasBuff":true}, {"id":770,"name":"Faerie Fire","icon":"spell_nature_faeriefire","hasBuff":true}, {"id":974,"name":"Earth Shield","icon":"spell_nature_skinofearth","hasBuff":true}, {"id":1329,"name":"Mutilate","icon":"ability_rogue_shadowstrikes"}, +{"id":1454,"name":"Life Tap","icon":"spell_shadow_burningspirit"}, {"id":1490,"name":"Curse of the Elements","icon":"spell_shadow_chilltouch","hasBuff":true}, {"id":2825,"name":"Bloodlust","icon":"spell_nature_bloodlust","hasBuff":true}, {"id":3043,"name":"Scorpid Sting","icon":"ability_hunter_criticalshot","hasBuff":true}, {"id":3738,"name":"Wrath of Air Totem","icon":"spell_nature_slowingtotem"}, +{"id":5487,"name":"Bear Form","icon":"ability_racial_bearform","hasBuff":true}, {"id":5570,"name":"Insect Swarm","icon":"spell_nature_insectswarm","hasBuff":true}, {"id":5675,"name":"Mana Spring Totem","icon":"spell_nature_manaregentotem"}, {"id":5923,"name":"Holy Power","icon":"spell_holy_power"}, @@ -9664,7 +9667,7 @@ {"id":9318,"name":"Zandalar Signet of Serenity","icon":"spell_holy_powerwordshield"}, {"id":9331,"name":"Greater Inscription of the Blade","icon":"spell_holy_weaponmastery"}, {"id":9334,"name":"Inscription of Vengeance","icon":"spell_holy_fistofjustice"}, -{"id":9336,"name":"Zandalar Signet of Might","icon":"inv_misc_armorkit_08"}, +{"id":9336,"name":"Greater Inscription of Vengeance","icon":"spell_holy_greaterblessingofkings"}, {"id":9344,"name":"Inscription of Discipline","icon":"spell_holy_sealofwisdom"}, {"id":9346,"name":"Zandalar Signet of Mojo","icon":"inv_jewelry_ring_46"}, {"id":9408,"name":"Greater Inscription of the Oracle","icon":"spell_holy_powerinfusion"}, @@ -9955,7 +9958,7 @@ {"id":13872,"name":"Endurance","icon":"spell_shadow_shadowward"}, {"id":13875,"name":"Improved Sprint","icon":"ability_rogue_sprint"}, {"id":13877,"name":"Blade Flurry","icon":"ability_warrior_punishingblow","hasBuff":true}, -{"id":13889,"name":"Enchant Boots - Boar's Speed","icon":"inv_misc_note_01"}, +{"id":13889,"name":"Enchant Boots - Cat's Swiftness","icon":"inv_misc_note_01"}, {"id":13958,"name":"Master of Deception","icon":"spell_shadow_charm"}, {"id":13960,"name":"Sword Specialization","icon":"inv_sword_27"}, {"id":13961,"name":"Sword Specialization","icon":"inv_sword_27"}, @@ -10518,7 +10521,7 @@ {"id":17958,"name":"Emberstorm","icon":"spell_fire_selfdestruct"}, {"id":17959,"name":"Ruin","icon":"spell_shadow_shadowwordpain"}, {"id":17962,"name":"Conflagrate","icon":"spell_fire_fireball"}, -{"id":18029,"name":"Glyph of Renewal","icon":"spell_holy_healingaura"}, +{"id":18029,"name":"Enchant Gloves - Major Healing","icon":"inv_misc_note_01"}, {"id":18048,"name":"Enchant Weapon - Major Healing","icon":"inv_misc_note_01"}, {"id":18073,"name":"Pyroclasm","icon":"spell_fire_volcano"}, {"id":18094,"name":"Nightfall","icon":"spell_shadow_twilight"}, @@ -11036,7 +11039,7 @@ {"id":25064,"name":"Enchant Gloves - Shadow Power","icon":"inv_misc_note_01"}, {"id":25065,"name":"Enchant Gloves - Fire Power","icon":"inv_misc_note_01"}, {"id":25066,"name":"Enchant Gloves - Frost Power","icon":"inv_misc_note_01"}, -{"id":25067,"name":"Enchant Bracer - Superior Healing","icon":"inv_misc_note_01"}, +{"id":25067,"name":"Enchant Gloves - Healing Power","icon":"inv_misc_note_01"}, {"id":25068,"name":"Enchant Cloak - Greater Fire Resistance","icon":"inv_misc_note_01"}, {"id":25069,"name":"Enchant Cloak - Greater Nature Resistance","icon":"inv_misc_note_01"}, {"id":25070,"name":"Enchant Cloak - Subtlety","icon":"inv_misc_note_01"}, @@ -11053,6 +11056,7 @@ {"id":26022,"name":"Pursuit of Justice","icon":"spell_holy_persuitofjustice"}, {"id":26023,"name":"Pursuit of Justice","icon":"spell_holy_persuitofjustice"}, {"id":26283,"name":"Enchant Cloak - Spell Penetration","icon":"inv_misc_note_01"}, +{"id":26297,"name":"Berserking","icon":"racial_troll_berserk"}, {"id":26752,"name":"Spellfire Belt","icon":"ability_ensnare"}, {"id":26753,"name":"Spellfire Gloves","icon":"ability_ensnare"}, {"id":26754,"name":"Spellfire Robe","icon":"ability_ensnare"}, @@ -11165,6 +11169,7 @@ {"id":28593,"name":"Winter's Chill","icon":"spell_frost_chillingblast"}, {"id":28594,"name":"Winter's Chill","icon":"spell_frost_chillingblast"}, {"id":28595,"name":"Winter's Chill","icon":"spell_frost_chillingblast"}, +{"id":28730,"name":"Arcane Torrent","icon":"spell_shadow_teleport","hasBuff":true}, {"id":28996,"name":"Elemental Warding","icon":"spell_nature_spiritarmor"}, {"id":28997,"name":"Elemental Warding","icon":"spell_nature_spiritarmor"}, {"id":28998,"name":"Elemental Warding","icon":"spell_nature_spiritarmor"}, diff --git a/assets/database/leftover_db.bin b/assets/database/leftover_db.bin index aeb7e8df7a..218fed94e0 100644 Binary files a/assets/database/leftover_db.bin and b/assets/database/leftover_db.bin differ diff --git a/assets/database/leftover_db.json b/assets/database/leftover_db.json index c45f6c5dfa..a27d2ba214 100644 --- a/assets/database/leftover_db.json +++ b/assets/database/leftover_db.json @@ -71,8 +71,8 @@ {"effectId":66,"spellId":7455,"name":"Enchant Bracer - Minor Stamina","icon":"trade_engraving","type":6,"stats":[0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":66,"itemId":6376,"spellId":7455,"name":"Enchant Boots - Minor Stamina","icon":"inv_misc_note_01","type":10,"stats":[0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, {"effectId":66,"spellId":7455,"name":"Enchant Shield - Minor Stamina","icon":"trade_engraving","type":13,"enchantType":2,"stats":[0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, -{"effectId":241,"spellId":7745,"name":"Enchant 2H Weapon - Minor Impact","icon":"trade_engraving","type":13,"enchantType":1,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":241,"spellId":13503,"name":"Enchant Weapon - Lesser Striking","icon":"trade_engraving","type":13,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, +{"effectId":241,"spellId":7745,"name":"Enchant 2H Weapon - Minor Impact","icon":"trade_engraving","type":13,"enchantType":1,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":242,"spellId":7747,"name":"Enchant Chest - Lesser Health","icon":"trade_engraving","type":5,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0],"quality":1}, {"effectId":243,"itemId":6344,"spellId":7456,"name":"Enchant Bracer - Minor Spirit","icon":"inv_misc_note_01","type":6,"stats":[0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, {"effectId":246,"itemId":6346,"spellId":7773,"name":"Enchant Chest - Lesser Mana","icon":"inv_misc_note_01","type":5,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, @@ -85,8 +85,8 @@ {"effectId":254,"spellId":7850,"name":"Enchant Chest - Health","icon":"trade_engraving","type":5,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0],"quality":1}, {"effectId":255,"itemId":6375,"spellId":7851,"name":"Enchant Bracer - Lesser Spirit","icon":"inv_misc_note_01","type":6,"stats":[0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, {"effectId":255,"itemId":11167,"spellId":7851,"name":"Enchant Boots - Lesser Spirit","icon":"inv_misc_note_01","type":10,"stats":[0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, -{"effectId":255,"itemId":11038,"spellId":7851,"name":"Enchant 2H Weapon - Lesser Spirit","icon":"inv_misc_note_01","type":13,"enchantType":1,"stats":[0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, {"effectId":255,"spellId":7851,"name":"Enchant Shield - Lesser Spirit","icon":"trade_engraving","type":13,"enchantType":2,"stats":[0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, +{"effectId":255,"itemId":11038,"spellId":7851,"name":"Enchant 2H Weapon - Lesser Spirit","icon":"inv_misc_note_01","type":13,"enchantType":1,"stats":[0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, {"effectId":256,"spellId":7852,"name":"Enchant Cloak - Lesser Fire Resistance","icon":"trade_engraving","type":4,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":369,"spellId":9108,"name":"Enchant Bracer - Major Intellect","icon":"trade_engraving","type":6,"stats":[0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":463,"itemId":7967,"spellId":9782,"name":"Mithril Shield Spike","icon":"inv_misc_armorkit_02","stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, @@ -155,10 +155,10 @@ {"effectId":929,"itemId":16217,"spellId":13827,"name":"Enchant Shield - Greater Stamina","icon":"inv_misc_note_01","type":13,"enchantType":2,"stats":[0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":930,"itemId":11226,"spellId":13927,"name":"Enchant Gloves - Riding Skill","icon":"inv_misc_note_01","type":7,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, {"effectId":931,"spellId":13928,"name":"Enchant Gloves - Minor Haste","icon":"trade_engraving","type":7,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, -{"effectId":943,"spellId":13693,"name":"Enchant Weapon - Striking","icon":"trade_engraving","type":13,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":943,"spellId":13529,"name":"Enchant 2H Weapon - Lesser Impact","icon":"trade_engraving","type":13,"enchantType":1,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, -{"effectId":963,"itemId":22552,"spellId":27967,"name":"Enchant Weapon - Major Striking","icon":"inv_misc_note_01","type":13,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, +{"effectId":943,"spellId":13693,"name":"Enchant Weapon - Striking","icon":"trade_engraving","type":13,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":963,"spellId":13937,"name":"Enchant 2H Weapon - Greater Impact","icon":"trade_engraving","type":13,"enchantType":1,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, +{"effectId":963,"itemId":22552,"spellId":27967,"name":"Enchant Weapon - Major Striking","icon":"inv_misc_note_01","type":13,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":1144,"spellId":14433,"name":"Enchant Chest - Major Spirit","icon":"trade_engraving","type":5,"stats":[0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":1594,"spellId":9334,"name":"Enchant Gloves - Assault","icon":"trade_engraving","type":7,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1}, {"effectId":1704,"itemId":12645,"spellId":16624,"name":"Thorium Shield Spike","icon":"inv_misc_armorkit_20","stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2}, diff --git a/sim/druid/feralcat/feral.go b/sim/druid/feralcat/feral.go index ad456f98cb..8c358cd690 100644 --- a/sim/druid/feralcat/feral.go +++ b/sim/druid/feralcat/feral.go @@ -5,7 +5,6 @@ import ( "github.com/wowsims/tbc/sim/core" "github.com/wowsims/tbc/sim/core/proto" - "github.com/wowsims/tbc/sim/core/stats" "github.com/wowsims/tbc/sim/druid" ) @@ -105,43 +104,43 @@ func (cat *FeralDruid) Initialize() { // cat.applyOmenOfClarity() // cat.applyPredatorySwiftness() - snapshotHandler := func(aura *core.Aura, sim *core.Simulation) { - previousRipSnapshotPower := cat.Rip.NewSnapshotPower - cat.UpdateBleedPower(cat.Rip, sim, cat.CurrentTarget, false, true) - cat.UpdateBleedPower(cat.Rake, sim, cat.CurrentTarget, false, true) - cat.UpdateBleedPower(cat.ThrashCat, sim, cat.CurrentTarget, false, true) - - if cat.Rip.NewSnapshotPower > previousRipSnapshotPower+0.001 { - if !cat.tempSnapshotAura.IsActive() || (aura.ExpiresAt() < cat.tempSnapshotAura.ExpiresAt()) { - cat.tempSnapshotAura = aura - - if sim.Log != nil { - cat.Log(sim, "New bleed snapshot aura found: %s", aura.ActionID) - } - } - } else if !cat.tempSnapshotAura.IsActive() { - cat.tempSnapshotAura = nil - } - } - - cat.TigersFuryAura.ApplyOnGain(snapshotHandler) - cat.TigersFuryAura.ApplyOnExpire(snapshotHandler) - cat.AddOnTemporaryStatsChange(func(sim *core.Simulation, buffAura *core.Aura, _ stats.Stats) { - snapshotHandler(buffAura, sim) - }) - - if cat.DreamOfCenariusAura != nil { - cat.DreamOfCenariusAura.ApplyOnGain(snapshotHandler) - cat.DreamOfCenariusAura.ApplyOnExpire(snapshotHandler) - } - - cat.CatFormAura.ApplyOnGain(func(_ *core.Aura, sim *core.Simulation) { - if cat.tempSnapshotAura.IsActive() { - cat.UpdateBleedPower(cat.Rip, sim, cat.CurrentTarget, false, true) - cat.UpdateBleedPower(cat.Rake, sim, cat.CurrentTarget, false, true) - cat.UpdateBleedPower(cat.ThrashCat, sim, cat.CurrentTarget, false, true) - } - }) + // snapshotHandler := func(aura *core.Aura, sim *core.Simulation) { + // previousRipSnapshotPower := cat.Rip.NewSnapshotPower + // cat.UpdateBleedPower(cat.Rip, sim, cat.CurrentTarget, false, true) + // cat.UpdateBleedPower(cat.Rake, sim, cat.CurrentTarget, false, true) + // cat.UpdateBleedPower(cat.ThrashCat, sim, cat.CurrentTarget, false, true) + + // if cat.Rip.NewSnapshotPower > previousRipSnapshotPower+0.001 { + // if !cat.tempSnapshotAura.IsActive() || (aura.ExpiresAt() < cat.tempSnapshotAura.ExpiresAt()) { + // cat.tempSnapshotAura = aura + + // if sim.Log != nil { + // cat.Log(sim, "New bleed snapshot aura found: %s", aura.ActionID) + // } + // } + // } else if !cat.tempSnapshotAura.IsActive() { + // cat.tempSnapshotAura = nil + // } + // } + + // cat.TigersFuryAura.ApplyOnGain(snapshotHandler) + // cat.TigersFuryAura.ApplyOnExpire(snapshotHandler) + // cat.AddOnTemporaryStatsChange(func(sim *core.Simulation, buffAura *core.Aura, _ stats.Stats) { + // snapshotHandler(buffAura, sim) + // }) + + // if cat.DreamOfCenariusAura != nil { + // cat.DreamOfCenariusAura.ApplyOnGain(snapshotHandler) + // cat.DreamOfCenariusAura.ApplyOnExpire(snapshotHandler) + // } + + // cat.CatFormAura.ApplyOnGain(func(_ *core.Aura, sim *core.Simulation) { + // if cat.tempSnapshotAura.IsActive() { + // cat.UpdateBleedPower(cat.Rip, sim, cat.CurrentTarget, false, true) + // cat.UpdateBleedPower(cat.Rake, sim, cat.CurrentTarget, false, true) + // cat.UpdateBleedPower(cat.ThrashCat, sim, cat.CurrentTarget, false, true) + // } + // }) } func (cat *FeralDruid) ApplyTalents() { diff --git a/sim/hunter/hunter.go b/sim/hunter/hunter.go index e043b83519..cff91d8919 100644 --- a/sim/hunter/hunter.go +++ b/sim/hunter/hunter.go @@ -52,7 +52,20 @@ func (hunter *Hunter) GetHunter() *Hunter { } func RegisterHunter() { - + core.RegisterAgentFactory( + proto.Player_Hunter{}, + proto.Spec_SpecHunter, + func(character *core.Character, options *proto.Player) core.Agent { + return NewHunter(character, options, options.GetHunter().Options.ClassOptions) + }, + func(player *proto.Player, spec interface{}) { + playerSpec, ok := spec.(*proto.Player_Hunter) + if !ok { + panic("Invalid spec value for Hunter!") + } + player.Spec = playerSpec + }, + ) } func NewHunter(character *core.Character, options *proto.Player, hunterOptions *proto.HunterOptions) *Hunter { diff --git a/sim/mage/mage.go b/sim/mage/mage.go index d7c076e9e4..997012251e 100644 --- a/sim/mage/mage.go +++ b/sim/mage/mage.go @@ -71,7 +71,20 @@ func (mage *Mage) GetMage() *Mage { } func RegisterMage() { - + core.RegisterAgentFactory( + proto.Player_Mage{}, + proto.Spec_SpecMage, + func(character *core.Character, options *proto.Player) core.Agent { + return NewMage(character, options) + }, + func(player *proto.Player, spec interface{}) { + playerSpec, ok := spec.(*proto.Player_Mage) + if !ok { + panic("Invalid spec value for Survival Hunter!") + } + player.Spec = playerSpec + }, + ) } func (mage *Mage) AddRaidBuffs(raidBuffs *proto.RaidBuffs) { @@ -136,8 +149,8 @@ func (mage *Mage) Reset(sim *core.Simulation) { func (mage *Mage) OnEncounterStart(sim *core.Simulation) { } -func NewMage(character *core.Character, options *proto.Player, mageOptions *proto.MageOptions) *Mage { - +func NewMage(character *core.Character, options *proto.Player) *Mage { + mageOptions := options.GetMage().Options.ClassOptions mage := &Mage{ Character: *character, Talents: &proto.MageTalents{}, diff --git a/sim/warlock/warlock.go b/sim/warlock/warlock.go index 09e9bd4373..4b916df624 100644 --- a/sim/warlock/warlock.go +++ b/sim/warlock/warlock.go @@ -54,7 +54,20 @@ func (warlock *Warlock) GetWarlock() *Warlock { } func RegisterWarlock() { - + core.RegisterAgentFactory( + proto.Player_Warlock{}, + proto.Spec_SpecWarlock, + func(character *core.Character, options *proto.Player) core.Agent { + return NewWarlock(character, options, options.GetWarlock().Options.ClassOptions) + }, + func(player *proto.Player, spec interface{}) { + playerSpec, ok := spec.(*proto.Player_Warlock) + if !ok { + panic("Invalid spec value for Survival Hunter!") + } + player.Spec = playerSpec + }, + ) } func (warlock *Warlock) ApplyTalents() { diff --git a/sim/warrior/dps/dps.go b/sim/warrior/dps/dps.go index 3bf8ca08e3..55815c8050 100644 --- a/sim/warrior/dps/dps.go +++ b/sim/warrior/dps/dps.go @@ -35,7 +35,7 @@ type DpsWarrior struct { // ApplyTalents implements core.Agent. func (war *DpsWarrior) ApplyTalents() { - panic("unimplemented") + // panic("unimplemented") } func NewDpsWarrior(character *core.Character, options *proto.Player) *DpsWarrior { diff --git a/sim/warrior/protection/protection.go b/sim/warrior/protection/protection.go index 96a38bd829..c7e5c0aa6b 100644 --- a/sim/warrior/protection/protection.go +++ b/sim/warrior/protection/protection.go @@ -34,7 +34,7 @@ type ProtectionWarrior struct { // ApplyTalents implements core.Agent. func (war *ProtectionWarrior) ApplyTalents() { - panic("unimplemented") + // panic("unimplemented") } func NewProtectionWarrior(character *core.Character, options *proto.Player) *ProtectionWarrior { diff --git a/tools/database/gen_db/main.go b/tools/database/gen_db/main.go index d527092fe6..2e648a8e6e 100644 --- a/tools/database/gen_db/main.go +++ b/tools/database/gen_db/main.go @@ -11,6 +11,7 @@ import ( "slices" "strings" + "github.com/wowsims/tbc/sim" "github.com/wowsims/tbc/sim/core" "github.com/wowsims/tbc/sim/core/proto" _ "github.com/wowsims/tbc/sim/encounters" // Needed for preset encounters. @@ -280,9 +281,9 @@ func main() { addSpellIcons(db, group, icons, iconsMap) } - // for _, group := range GetAllRotationSpellIds() { - // addSpellIcons(db, group, icons, iconsMap) - // } + for _, group := range GetAllRotationSpellIds() { + addSpellIcons(db, group, icons, iconsMap) + } craftedSpellIds := []int32{} for _, item := range db.Items { @@ -692,203 +693,154 @@ type RotContainer struct { Raid *proto.Raid } -// func GetAllRotationSpellIds() map[string][]int32 { -// sim.RegisterAll() - -// rotMapping := []RotContainer{ -// // Druid -// {Name: "balanceDruid", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassDruid, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_BalanceDruid{BalanceDruid: &proto.BalanceDruid{Options: &proto.BalanceDruid_Options{ClassOptions: &proto.DruidOptions{}}}}), nil, nil, nil)}, -// {Name: "feralDruid", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassDruid, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_FeralDruid{FeralDruid: &proto.FeralDruid{Options: &proto.FeralDruid_Options{ClassOptions: &proto.DruidOptions{}}, Rotation: &proto.FeralDruid_Rotation{}}}), nil, nil, nil)}, -// // {Name: "guardianDruid", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// // Class: proto.Class_ClassDruid, -// // Equipment: &proto.EquipmentSpec{}, -// // TalentsString: "000000", -// // }, &proto.Player_FeralTankDruid{FeralTankDruid: &proto.FeralTankDruid{Options: &proto.FeralTankDruid_Options{ClassOptions: &proto.DruidOptions{}}}}), nil, nil, nil)}, -// {Name: "restorationDruid", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassDruid, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_RestorationDruid{RestorationDruid: &proto.RestorationDruid{Options: &proto.RestorationDruid_Options{ClassOptions: &proto.DruidOptions{}}}}), nil, nil, nil)}, - -// // Hunter -// {Name: "beastMasteryHunter", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassHunter, -// Race: proto.Race_RaceTroll, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_BeastMasteryHunter{BeastMasteryHunter: &proto.BeastMasteryHunter{Options: &proto.BeastMasteryHunter_Options{ClassOptions: &proto.HunterOptions{}}}}), nil, nil, nil)}, -// {Name: "marksmanshipHunter", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassHunter, -// Race: proto.Race_RaceTroll, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_MarksmanshipHunter{MarksmanshipHunter: &proto.MarksmanshipHunter{Options: &proto.MarksmanshipHunter_Options{ClassOptions: &proto.HunterOptions{}}}}), nil, nil, nil)}, -// {Name: "survivalHunter", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassHunter, -// Race: proto.Race_RaceTroll, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_SurvivalHunter{SurvivalHunter: &proto.SurvivalHunter{Options: &proto.SurvivalHunter_Options{ClassOptions: &proto.HunterOptions{}}}}), nil, nil, nil)}, - -// // Mage -// {Name: "arcaneMage", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassMage, -// Race: proto.Race_RaceTroll, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_ArcaneMage{ArcaneMage: &proto.ArcaneMage{Options: &proto.ArcaneMage_Options{ClassOptions: &proto.MageOptions{}}}}), nil, nil, nil)}, -// {Name: "fireMage", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassMage, -// Race: proto.Race_RaceTroll, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_FireMage{FireMage: &proto.FireMage{Options: &proto.FireMage_Options{ClassOptions: &proto.MageOptions{}}}}), nil, nil, nil)}, -// {Name: "frostMage", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassMage, -// Race: proto.Race_RaceTroll, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_FrostMage{FrostMage: &proto.FrostMage{Options: &proto.FrostMage_Options{ClassOptions: &proto.MageOptions{}}}}), nil, nil, nil)}, - -// // Paladin -// {Name: "holyPaladin", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassPaladin, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_HolyPaladin{HolyPaladin: &proto.HolyPaladin{Options: &proto.HolyPaladin_Options{ClassOptions: &proto.PaladinOptions{}}}}), nil, nil, nil)}, -// {Name: "protPaladin", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassPaladin, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_ProtectionPaladin{ProtectionPaladin: &proto.ProtectionPaladin{Options: &proto.ProtectionPaladin_Options{ClassOptions: &proto.PaladinOptions{}}}}), nil, nil, nil)}, -// {Name: "retPaladin", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassPaladin, -// Race: proto.Race_RaceBloodElf, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_RetributionPaladin{RetributionPaladin: &proto.RetributionPaladin{Options: &proto.RetributionPaladin_Options{ClassOptions: &proto.PaladinOptions{}}}}), nil, nil, nil)}, - -// // Priest -// {Name: "disciplinePriest", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassPriest, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_DisciplinePriest{DisciplinePriest: &proto.DisciplinePriest{Options: &proto.DisciplinePriest_Options{ClassOptions: &proto.PriestOptions{}}}}), nil, nil, nil)}, -// {Name: "holyPriest", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassPriest, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_HolyPriest{HolyPriest: &proto.HolyPriest{Options: &proto.HolyPriest_Options{ClassOptions: &proto.PriestOptions{}}}}), nil, nil, nil)}, -// {Name: "shadowPriest", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassPriest, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_ShadowPriest{ShadowPriest: &proto.ShadowPriest{Options: &proto.ShadowPriest_Options{ClassOptions: &proto.PriestOptions{}}}}), nil, nil, nil)}, - -// // Rogue -// {Name: "assassinationRogue", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassRogue, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_AssassinationRogue{AssassinationRogue: &proto.AssassinationRogue{Options: &proto.AssassinationRogue_Options{ClassOptions: &proto.RogueOptions{}}}}), nil, nil, nil)}, -// {Name: "combatRogue", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassRogue, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_CombatRogue{CombatRogue: &proto.CombatRogue{Options: &proto.CombatRogue_Options{ClassOptions: &proto.RogueOptions{}}}}), nil, nil, nil)}, -// {Name: "subtletyRogue", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassRogue, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_SubtletyRogue{SubtletyRogue: &proto.SubtletyRogue{Options: &proto.SubtletyRogue_Options{ClassOptions: &proto.RogueOptions{}}}}), nil, nil, nil)}, - -// // Shaman -// {Name: "elementalShaman", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassShaman, -// Race: proto.Race_RaceTroll, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_ElementalShaman{ElementalShaman: &proto.ElementalShaman{Options: &proto.ElementalShaman_Options{ClassOptions: &proto.ShamanOptions{}}}}), nil, nil, nil)}, -// {Name: "enhancementShaman", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassShaman, -// Race: proto.Race_RaceTroll, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_EnhancementShaman{EnhancementShaman: &proto.EnhancementShaman{Options: &proto.EnhancementShaman_Options{ClassOptions: &proto.ShamanOptions{}}}}), nil, nil, nil)}, -// {Name: "restorationShaman", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassShaman, -// Race: proto.Race_RaceTroll, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_RestorationShaman{RestorationShaman: &proto.RestorationShaman{Options: &proto.RestorationShaman_Options{ClassOptions: &proto.ShamanOptions{}}}}), nil, nil, nil)}, - -// // Warlock -// {Name: "afflictionWarlock", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassWarlock, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// Profession1: proto.Profession_Herbalism, -// }, &proto.Player_AfflictionWarlock{AfflictionWarlock: &proto.AfflictionWarlock{Options: &proto.AfflictionWarlock_Options{ClassOptions: &proto.WarlockOptions{}}}}), nil, nil, nil)}, -// {Name: "demonologyWarlock", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassWarlock, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_DemonologyWarlock{DemonologyWarlock: &proto.DemonologyWarlock{Options: &proto.DemonologyWarlock_Options{ClassOptions: &proto.WarlockOptions{}}}}), nil, nil, nil)}, -// {Name: "destructionWarlock", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassWarlock, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_DestructionWarlock{DestructionWarlock: &proto.DestructionWarlock{Options: &proto.DestructionWarlock_Options{ClassOptions: &proto.WarlockOptions{}}}}), nil, nil, nil)}, - -// // Warrior -// {Name: "armsWarrior", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassWarrior, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_ArmsWarrior{ArmsWarrior: &proto.ArmsWarrior{Options: &proto.ArmsWarrior_Options{ClassOptions: &proto.WarriorOptions{}}}}), nil, nil, nil)}, -// {Name: "furyWarrior", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassWarrior, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_FuryWarrior{FuryWarrior: &proto.FuryWarrior{Options: &proto.FuryWarrior_Options{ClassOptions: &proto.WarriorOptions{}}}}), nil, nil, nil)}, -// {Name: "protectionWarrior", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ -// Class: proto.Class_ClassWarrior, -// Equipment: &proto.EquipmentSpec{}, -// TalentsString: "000000", -// }, &proto.Player_ProtectionWarrior{ProtectionWarrior: &proto.ProtectionWarrior{Options: &proto.ProtectionWarrior_Options{ClassOptions: &proto.WarriorOptions{}}}}), nil, nil, nil)}, -// } - -// ret_db := make(map[string][]int32, 0) - -// for _, r := range rotMapping { -// f := CreateTempAgent(r.Raid).GetCharacter() - -// spells := make([]int32, 0, len(f.Spellbook)) - -// for _, s := range f.Spellbook { -// if s.SpellID != 0 { -// spells = append(spells, s.SpellID) -// } -// } - -// for _, s := range f.GetAuras() { -// if s.ActionID.SpellID != 0 { -// spells = append(spells, s.ActionID.SpellID) -// } -// } - -// ret_db[r.Name] = spells -// } -// return ret_db -// } +func GetAllRotationSpellIds() map[string][]int32 { + sim.RegisterAll() + + rotMapping := []RotContainer{ + // Druid + {Name: "balanceDruid", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassDruid, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_BalanceDruid{BalanceDruid: &proto.BalanceDruid{Options: &proto.BalanceDruid_Options{ClassOptions: &proto.DruidOptions{}}}}), nil, nil, nil)}, + {Name: "feralCatDruid", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassDruid, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_FeralDruid{FeralDruid: &proto.FeralCatDruid{Options: &proto.FeralCatDruid_Options{ClassOptions: &proto.DruidOptions{}}, Rotation: &proto.FeralCatDruid_Rotation{}}}), nil, nil, nil)}, + {Name: "feralBearDruid", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassDruid, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_GuardianDruid{GuardianDruid: &proto.FeralBearDruid{Options: &proto.FeralBearDruid_Options{ClassOptions: &proto.DruidOptions{}}}}), nil, nil, nil)}, + {Name: "restorationDruid", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassDruid, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_RestorationDruid{RestorationDruid: &proto.RestorationDruid{Options: &proto.RestorationDruid_Options{ClassOptions: &proto.DruidOptions{}}}}), nil, nil, nil)}, + + // Hunter + {Name: "hunter", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassHunter, + Race: proto.Race_RaceTroll, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_Hunter{Hunter: &proto.Hunter{Options: &proto.Hunter_Options{ClassOptions: &proto.HunterOptions{}}}}), nil, nil, nil)}, + + // Mage + {Name: "mage", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassMage, + Race: proto.Race_RaceTroll, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_Mage{Mage: &proto.Mage{Options: &proto.Mage_Options{ClassOptions: &proto.MageOptions{}}}}), nil, nil, nil)}, + + // Paladin + {Name: "holyPaladin", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassPaladin, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_HolyPaladin{HolyPaladin: &proto.HolyPaladin{Options: &proto.HolyPaladin_Options{ClassOptions: &proto.PaladinOptions{}}}}), nil, nil, nil)}, + {Name: "protPaladin", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassPaladin, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_ProtectionPaladin{ProtectionPaladin: &proto.ProtectionPaladin{Options: &proto.ProtectionPaladin_Options{ClassOptions: &proto.PaladinOptions{}}}}), nil, nil, nil)}, + {Name: "retPaladin", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassPaladin, + Race: proto.Race_RaceBloodElf, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_RetributionPaladin{RetributionPaladin: &proto.RetributionPaladin{Options: &proto.RetributionPaladin_Options{ClassOptions: &proto.PaladinOptions{}}}}), nil, nil, nil)}, + + // Priest + {Name: "disciplinePriest", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassPriest, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_DisciplinePriest{DisciplinePriest: &proto.DisciplinePriest{Options: &proto.DisciplinePriest_Options{ClassOptions: &proto.PriestOptions{}}}}), nil, nil, nil)}, + {Name: "holyPriest", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassPriest, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_HolyPriest{HolyPriest: &proto.HolyPriest{Options: &proto.HolyPriest_Options{ClassOptions: &proto.PriestOptions{}}}}), nil, nil, nil)}, + {Name: "shadowPriest", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassPriest, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_ShadowPriest{ShadowPriest: &proto.ShadowPriest{Options: &proto.ShadowPriest_Options{ClassOptions: &proto.PriestOptions{}}}}), nil, nil, nil)}, + + // Rogue + {Name: "rogue", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassRogue, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_Rogue{Rogue: &proto.Rogue{Options: &proto.Rogue_Options{ClassOptions: &proto.RogueOptions{}}}}), nil, nil, nil)}, + + // Shaman + {Name: "elementalShaman", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassShaman, + Race: proto.Race_RaceTroll, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_ElementalShaman{ElementalShaman: &proto.ElementalShaman{Options: &proto.ElementalShaman_Options{ClassOptions: &proto.ShamanOptions{}}}}), nil, nil, nil)}, + {Name: "enhancementShaman", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassShaman, + Race: proto.Race_RaceTroll, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_EnhancementShaman{EnhancementShaman: &proto.EnhancementShaman{Options: &proto.EnhancementShaman_Options{ClassOptions: &proto.ShamanOptions{}}}}), nil, nil, nil)}, + {Name: "restorationShaman", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassShaman, + Race: proto.Race_RaceTroll, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_RestorationShaman{RestorationShaman: &proto.RestorationShaman{Options: &proto.RestorationShaman_Options{ClassOptions: &proto.ShamanOptions{}}}}), nil, nil, nil)}, + + // Warlock + {Name: "warlock", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassWarlock, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + Profession1: proto.Profession_Herbalism, + }, &proto.Player_Warlock{Warlock: &proto.Warlock{Options: &proto.Warlock_Options{ClassOptions: &proto.WarlockOptions{}}}}), nil, nil, nil)}, + + // Warrior + {Name: "dpsWarrior", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassWarrior, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_DpsWarrior{DpsWarrior: &proto.DPSWarrior{Options: &proto.DPSWarrior_Options{ClassOptions: &proto.WarriorOptions{}}}}), nil, nil, nil)}, + {Name: "protectionWarrior", Raid: core.SinglePlayerRaidProto(core.WithSpec(&proto.Player{ + Class: proto.Class_ClassWarrior, + Equipment: &proto.EquipmentSpec{}, + TalentsString: "000000", + }, &proto.Player_ProtectionWarrior{ProtectionWarrior: &proto.ProtectionWarrior{Options: &proto.ProtectionWarrior_Options{ClassOptions: &proto.WarriorOptions{}}}}), nil, nil, nil)}, + } + + ret_db := make(map[string][]int32, 0) + + for _, r := range rotMapping { + f := CreateTempAgent(r.Raid).GetCharacter() + + spells := make([]int32, 0, len(f.Spellbook)) + + for _, s := range f.Spellbook { + if s.SpellID != 0 { + spells = append(spells, s.SpellID) + } + } + + for _, s := range f.GetAuras() { + if s.ActionID.SpellID != 0 { + spells = append(spells, s.ActionID.SpellID) + } + } + + ret_db[r.Name] = spells + } + return ret_db +} func addSpellIcons(db *database.WowDatabase, spellIds []int32, icons map[int]database.SpellIcon, iconsMap map[int]string) { for _, spellId := range spellIds {