Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyt857 committed Aug 13, 2023
2 parents 3ff9bac + 834804a commit b5535fb
Show file tree
Hide file tree
Showing 25 changed files with 952 additions and 643 deletions.
Binary file modified assets/database/db.bin
Binary file not shown.
227 changes: 226 additions & 1 deletion assets/database/db.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions proto/apl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ message APLAction {
// Misc
APLActionAutocastOtherCooldowns autocast_other_cooldowns = 7;
APLActionChangeTarget change_target = 9;
APLActionActivateAura activate_aura = 13;
APLActionCancelAura cancel_aura = 10;
APLActionTriggerICD trigger_icd = 11;
APLActionWait wait = 4;
Expand Down Expand Up @@ -162,6 +163,10 @@ message APLActionCancelAura {
ActionID aura_id = 1;
}

message APLActionActivateAura {
ActionID aura_id = 1;
}

message APLActionTriggerICD {
ActionID aura_id = 1;
}
Expand Down
1 change: 1 addition & 0 deletions proto/ui.proto
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ message SimSettings {
bool show_threat_metrics = 4;
bool show_healing_metrics = 7;
bool show_experimental = 5;
bool show_ep_values = 11;
string language = 9;
Faction faction = 6;
DatabaseFilters filters = 10;
Expand Down
2 changes: 2 additions & 0 deletions sim/core/apl_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ func (rot *APLRotation) newAPLActionImpl(config *proto.APLAction) APLActionImpl
return rot.newActionAutocastOtherCooldowns(config.GetAutocastOtherCooldowns())
case *proto.APLAction_ChangeTarget:
return rot.newActionChangeTarget(config.GetChangeTarget())
case *proto.APLAction_ActivateAura:
return rot.newActionActivateAura(config.GetActivateAura())
case *proto.APLAction_CancelAura:
return rot.newActionCancelAura(config.GetCancelAura())
case *proto.APLAction_TriggerIcd:
Expand Down
32 changes: 31 additions & 1 deletion sim/core/apl_actions_misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package core

import (
"fmt"

"github.com/wowsims/wotlk/sim/core/proto"
)

Expand Down Expand Up @@ -39,6 +38,11 @@ type APLActionCancelAura struct {
aura *Aura
}

type APLActionActivateAura struct {
defaultAPLActionImpl
aura *Aura
}

func (rot *APLRotation) newActionCancelAura(config *proto.APLActionCancelAura) APLActionImpl {
aura := rot.aplGetAura(rot.getSourceUnit(&proto.UnitReference{Type: proto.UnitReference_Self}), config.AuraId)
if aura.Get() == nil {
Expand All @@ -48,6 +52,17 @@ func (rot *APLRotation) newActionCancelAura(config *proto.APLActionCancelAura) A
aura: aura.Get(),
}
}

func (rot *APLRotation) newActionActivateAura(config *proto.APLActionActivateAura) APLActionImpl {
aura := rot.aplGetAura(rot.getSourceUnit(&proto.UnitReference{Type: proto.UnitReference_Self}), config.AuraId)
if aura.Get() == nil {
return nil
}
return &APLActionActivateAura{
aura: aura.Get(),
}
}

func (action *APLActionCancelAura) IsReady(sim *Simulation) bool {
return action.aura.IsActive()
}
Expand All @@ -61,6 +76,21 @@ func (action *APLActionCancelAura) String() string {
return fmt.Sprintf("Cancel Aura(%s)", action.aura.ActionID)
}

func (action *APLActionActivateAura) IsReady(sim *Simulation) bool {
return true
}

func (action *APLActionActivateAura) Execute(sim *Simulation) {
if sim.Log != nil {
action.aura.Unit.Log(sim, "Activating aura %s", action.aura.ActionID)
}
action.aura.Activate(sim)
}

func (action *APLActionActivateAura) String() string {
return fmt.Sprintf("Activate Aura(%s)", action.aura.ActionID)
}

type APLActionTriggerICD struct {
defaultAPLActionImpl
aura *Aura
Expand Down
3 changes: 3 additions & 0 deletions sim/core/aura.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ func (at *auraTracker) GetAura(label string) *Aura {
}
return nil
}
func (at *auraTracker) GetAuras() []*Aura {
return at.auras
}
func (at *auraTracker) GetAuraByID(actionID ActionID) *Aura {
for _, aura := range at.auras {
if aura.ActionID.SameAction(actionID) {
Expand Down
2 changes: 1 addition & 1 deletion sim/core/debuffs.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ func GiftOfArthasAura(target *Unit) *Aura {
func MangleAura(target *Unit) *Aura {
return bleedDamageAura(target, Aura{
Label: "Mangle",
ActionID: ActionID{SpellID: 33876},
ActionID: ActionID{SpellID: 48566},
Duration: time.Minute,
}, 1.3)
}
Expand Down
3 changes: 2 additions & 1 deletion sim/deathknight/deathknight.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ func (dk *Deathknight) Initialize() {
dk.registerArmyOfTheDeadCD()
dk.registerDancingRuneWeaponCD()
dk.registerDeathPactSpell()

dk.registerUnholyFrenzyCD()

dk.RegisterAura(core.Aura{
Expand Down Expand Up @@ -470,6 +469,8 @@ func NewDeathknight(character core.Character, inputs DeathknightInputs, talents
}

dk.RotationSequence = &Sequence{}
// done here so enchants that modify stats are applied before stats are calculated
dk.registerItems()

return dk
}
Expand Down
91 changes: 0 additions & 91 deletions sim/deathknight/dps/TestBlood.results
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,6 @@ dps_results: {
tps: 3056.65868
}
}
dps_results: {
key: "TestBlood-AllItems-DeadlyGladiator'sSigilofStrife-42620"
value: {
dps: 7310.694
tps: 3614.97286
}
}
dps_results: {
key: "TestBlood-AllItems-Death'sChoice-47464"
value: {
Expand Down Expand Up @@ -368,13 +361,6 @@ dps_results: {
tps: 3595.99061
}
}
dps_results: {
key: "TestBlood-AllItems-FuriousGladiator'sSigilofStrife-42621"
value: {
dps: 7312.07604
tps: 3615.45198
}
}
dps_results: {
key: "TestBlood-AllItems-FuryoftheFiveFlights-40431"
value: {
Expand Down Expand Up @@ -410,13 +396,6 @@ dps_results: {
tps: 3551.08226
}
}
dps_results: {
key: "TestBlood-AllItems-HatefulGladiator'sSigilofStrife-42619"
value: {
dps: 7305.81839
tps: 3613.64772
}
}
dps_results: {
key: "TestBlood-AllItems-IllustrationoftheDragonSoul-40432"
value: {
Expand Down Expand Up @@ -572,13 +551,6 @@ dps_results: {
tps: 3671.42095
}
}
dps_results: {
key: "TestBlood-AllItems-RelentlessGladiator'sSigilofStrife-42622"
value: {
dps: 7313.68843
tps: 3616.01095
}
}
dps_results: {
key: "TestBlood-AllItems-RevitalizingSkyflareDiamond"
value: {
Expand All @@ -593,13 +565,6 @@ dps_results: {
tps: 3475.9395
}
}
dps_results: {
key: "TestBlood-AllItems-SavageGladiator'sSigilofStrife-42618"
value: {
dps: 7305.58806
tps: 3613.52654
}
}
dps_results: {
key: "TestBlood-AllItems-ScourgeborneBattlegear"
value: {
Expand Down Expand Up @@ -649,55 +614,6 @@ dps_results: {
tps: 3475.9395
}
}
dps_results: {
key: "TestBlood-AllItems-SigilofDeflection-45144"
value: {
dps: 7303.78378
tps: 3612.57727
}
}
dps_results: {
key: "TestBlood-AllItems-SigilofHauntedDreams-40715"
value: {
dps: 7331.86443
tps: 3628.1546
}
}
dps_results: {
key: "TestBlood-AllItems-SigilofInsolence-47672"
value: {
dps: 7303.78378
tps: 3612.57727
}
}
dps_results: {
key: "TestBlood-AllItems-SigilofVirulence-47673"
value: {
dps: 7637.06987
tps: 3780.59019
}
}
dps_results: {
key: "TestBlood-AllItems-SigiloftheBoneGryphon-50462"
value: {
dps: 7303.78378
tps: 3612.57727
}
}
dps_results: {
key: "TestBlood-AllItems-SigiloftheHangedMan-50459"
value: {
dps: 7641.29245
tps: 3785.73995
}
}
dps_results: {
key: "TestBlood-AllItems-SigiloftheUnfalteringKnight-40714"
value: {
dps: 7303.78378
tps: 3612.57727
}
}
dps_results: {
key: "TestBlood-AllItems-Sindragosa'sFlawlessFang-50361"
value: {
Expand Down Expand Up @@ -894,13 +810,6 @@ dps_results: {
tps: 3475.9395
}
}
dps_results: {
key: "TestBlood-AllItems-WrathfulGladiator'sSigilofStrife-51417"
value: {
dps: 7315.53115
tps: 3616.64977
}
}
dps_results: {
key: "TestBlood-Average-Default"
value: {
Expand Down
Loading

0 comments on commit b5535fb

Please sign in to comment.