-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
74 changed files
with
4,052 additions
and
2,521 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package core | ||
|
||
import ( | ||
"fmt" | ||
"time" | ||
|
||
"github.com/wowsims/wotlk/sim/core/proto" | ||
) | ||
|
||
type APLValueBossSpellIsCasting struct { | ||
DefaultAPLValueImpl | ||
spell *Spell | ||
} | ||
|
||
func (rot *APLRotation) newValueBossSpellIsCasting(config *proto.APLValueBossSpellIsCasting) APLValue { | ||
spell := rot.GetTargetAPLSpell(config.SpellId, rot.GetTargetUnit(config.TargetUnit)) | ||
if spell == nil { | ||
return nil | ||
} | ||
return &APLValueBossSpellIsCasting{ | ||
spell: spell, | ||
} | ||
} | ||
func (value *APLValueBossSpellIsCasting) Type() proto.APLValueType { | ||
return proto.APLValueType_ValueTypeBool | ||
} | ||
func (value *APLValueBossSpellIsCasting) GetBool(sim *Simulation) bool { | ||
return value.spell.Unit.Hardcast.ActionID == value.spell.ActionID && value.spell.Unit.Hardcast.Expires > sim.CurrentTime | ||
} | ||
func (value *APLValueBossSpellIsCasting) String() string { | ||
return fmt.Sprintf("Boss is Casting(%s)", value.spell.ActionID) | ||
} | ||
|
||
type APLValueBossSpellTimeToReady struct { | ||
DefaultAPLValueImpl | ||
spell *Spell | ||
} | ||
|
||
func (rot *APLRotation) newValueBossSpellTimeToReady(config *proto.APLValueBossSpellTimeToReady) APLValue { | ||
spell := rot.GetTargetAPLSpell(config.SpellId, rot.GetTargetUnit(config.TargetUnit)) | ||
if spell == nil { | ||
return nil | ||
} | ||
return &APLValueBossSpellTimeToReady{ | ||
spell: spell, | ||
} | ||
} | ||
func (value *APLValueBossSpellTimeToReady) Type() proto.APLValueType { | ||
return proto.APLValueType_ValueTypeDuration | ||
} | ||
func (value *APLValueBossSpellTimeToReady) GetDuration(sim *Simulation) time.Duration { | ||
return value.spell.TimeToReady(sim) | ||
} | ||
func (value *APLValueBossSpellTimeToReady) String() string { | ||
return fmt.Sprintf("Boss Spell Time to Ready(%s)", value.spell.ActionID) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.