|
| | MOCK_METHOD (bool, IsPlayer,(),(const, override)) |
| |
| | MOCK_METHOD (bool, IsAlive,(),(const, override)) |
| |
| | MOCK_METHOD (bool, IsFriendlyTo,(UnitStub const *unit),(const, override)) |
| |
| | MOCK_METHOD (bool, HasAura,(uint32_t spellId),(const, override)) |
| |
| | MOCK_METHOD (uint32_t, GetMaxHealth,(),(const, override)) |
| |
| | MOCK_METHOD (uint32_t, GetHealth,(),(const, override)) |
| |
| | MOCK_METHOD (uint32_t, CountPctFromMaxHealth,(int32_t pct),(const, override)) |
| |
| | MOCK_METHOD (uint32_t, GetAttackTime,(uint8_t attType),(const, override)) |
| |
| | MOCK_METHOD (bool, HasSpellCooldown,(uint32_t spellId),(const, override)) |
| |
| | MOCK_METHOD (uint8_t, GetClass,(),(const, override)) |
| |
| | MOCK_METHOD (uint8_t, GetLevel,(),(const, override)) |
| |
| | MOCK_METHOD (float, GetPPMProcChance,(uint32_t weaponSpeed, float ppm, uint32_t spellId),(const, override)) |
| |
| | UnitStub ()=default |
| |
| virtual | ~UnitStub ()=default |
| |
| virtual bool | IsPlayer () const |
| |
| virtual bool | IsAlive () const |
| |
| virtual bool | IsFriendlyTo (UnitStub const *unit) const |
| |
| void | SetIsPlayer (bool isPlayer) |
| |
| void | SetIsAlive (bool isAlive) |
| |
| void | SetIsFriendly (bool isFriendly) |
| |
| virtual bool | HasAura (uint32_t spellId) const |
| |
| virtual void | AddAuraStub (uint32_t spellId) |
| |
| virtual void | RemoveAuraStub (uint32_t spellId) |
| |
| virtual void | RecordCast (uint32_t spellId, bool triggered=true, int32_t bp0=0, int32_t bp1=0, int32_t bp2=0) |
| |
| std::vector< CastRecord > const & | GetCastHistory () const |
| |
| bool | WasCast (uint32_t spellId) const |
| |
| size_t | CountCasts (uint32_t spellId) const |
| |
| void | ClearCastHistory () |
| |
| virtual uint32_t | GetMaxHealth () const |
| |
| virtual uint32_t | GetHealth () const |
| |
| virtual uint32_t | CountPctFromMaxHealth (int32_t pct) const |
| |
| void | SetMaxHealth (uint32_t maxHealth) |
| |
| void | SetHealth (uint32_t health) |
| |
| virtual uint32_t | GetAttackTime (uint8_t attType) const |
| |
| void | SetAttackTime (uint8_t attType, uint32_t time) |
| |
| void | SetPPMModifier (uint32_t spellId, float modifier) |
| |
| void | ClearPPMModifiers () |
| |
| virtual float | GetPPMProcChance (uint32_t weaponSpeed, float ppm, uint32_t spellId=0) const |
| | Calculate PPM proc chance with modifiers Mimics Unit::GetPPMProcChance() formula: (WeaponSpeed * PPM) / 600.0f.
|
| |
| void | SetChanceModifier (uint32_t spellId, float modifier) |
| |
| void | ClearChanceModifiers () |
| |
| float | ApplyChanceModifier (uint32_t spellId, float baseChance) const |
| | Apply chance modifier for a spell.
|
| |
| virtual bool | HasSpellCooldown (uint32_t spellId) const |
| |
| virtual void | AddSpellCooldown (uint32_t spellId) |
| |
| virtual void | RemoveSpellCooldown (uint32_t spellId) |
| |
| virtual uint8_t | GetClass () const |
| |
| virtual uint8_t | GetLevel () const |
| |
| void | SetClass (uint8_t unitClass) |
| |
| void | SetLevel (uint8_t level) |
| |
GMock-enabled Unit stub for verification.