TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
spell_hun_pet_scaling_04::spell_hun_pet_scaling_04_AuraScript Class Reference

Private Member Functions

 PrepareAuraScript (spell_hun_pet_scaling_04_AuraScript)
 
bool Load () override
 
void CalculateAmountMeleeHit (AuraEffect const *, int32 &amount, bool &)
 
void CalculateAmountSpellHit (AuraEffect const *, int32 &amount, bool &)
 
void CalculateAmountExpertise (AuraEffect const *, int32 &amount, bool &)
 
void Register () override
 

Additional Inherited Members

- Public Member Functions inherited from AuraScript
 AuraScript ()
 
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Aura *aura)
 
void _PrepareScriptCall (AuraScriptHookType hookType, AuraApplication const *aurApp=NULL)
 
void _FinishScriptCall ()
 
bool _IsDefaultActionPrevented ()
 
void PreventDefaultAction ()
 
SpellInfo constGetSpellInfo () const
 
uint32 GetId () const
 
ObjectGuid GetCasterGUID () const
 
UnitGetCaster () const
 
WorldObjectGetOwner () const
 
UnitGetUnitOwner () const
 
DynamicObjectGetDynobjOwner () const
 
void Remove (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
AuraGetAura () const
 
AuraObjectType GetType () const
 
int32 GetDuration () const
 
void SetDuration (int32 duration, bool withMods=false)
 
void RefreshDuration ()
 
time_t GetApplyTime () const
 
int32 GetMaxDuration () const
 
void SetMaxDuration (int32 duration)
 
int32 CalcMaxDuration () const
 
bool IsExpired () const
 
bool IsPermanent () const
 
uint8 GetCharges () const
 
void SetCharges (uint8 charges)
 
uint8 CalcMaxCharges () const
 
bool ModCharges (int8 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool DropCharge (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
uint8 GetStackAmount () const
 
void SetStackAmount (uint8 num)
 
bool ModStackAmount (int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool IsPassive () const
 
bool IsDeathPersistent () const
 
bool HasEffect (uint8 effIndex) const
 
AuraEffectGetEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
UnitGetTarget () const
 
AuraApplication constGetTargetApplication () const
 
- Public Member Functions inherited from _SpellScript
 _SpellScript ()
 
virtual ~_SpellScript ()
 
virtual void _Register ()
 
virtual void _Unload ()
 
virtual void _Init (std::string const *scriptname, uint32 spellId)
 
std::string const_GetScriptName () const
 
virtual bool Validate (SpellInfo const *)
 
virtual void Unload ()
 
- Public Attributes inherited from AuraScript
HookList< CheckAreaTargetHandlerDoCheckAreaTarget
 
HookList< AuraDispelHandlerOnDispel
 
HookList< AuraDispelHandlerAfterDispel
 
HookList< EffectApplyHandlerOnEffectApply
 
HookList< EffectApplyHandlerAfterEffectApply
 
HookList< EffectApplyHandlerOnEffectRemove
 
HookList< EffectApplyHandlerAfterEffectRemove
 
HookList< EffectPeriodicHandlerOnEffectPeriodic
 
HookList
< EffectUpdatePeriodicHandler
OnEffectUpdatePeriodic
 
HookList< EffectCalcAmountHandlerDoEffectCalcAmount
 
HookList
< EffectCalcPeriodicHandler
DoEffectCalcPeriodic
 
HookList
< EffectCalcSpellModHandler
DoEffectCalcSpellMod
 
HookList< EffectAbsorbHandlerOnEffectAbsorb
 
HookList< EffectAbsorbHandlerAfterEffectAbsorb
 
HookList< EffectManaShieldHandlerOnEffectManaShield
 
HookList< EffectManaShieldHandlerAfterEffectManaShield
 
HookList< EffectSplitHandlerOnEffectSplit
 
HookList< CheckProcHandlerDoCheckProc
 
HookList< AuraProcHandlerDoPrepareProc
 
HookList< AuraProcHandlerOnProc
 
HookList< AuraProcHandlerAfterProc
 
HookList< EffectProcHandlerOnEffectProc
 
HookList< EffectProcHandlerAfterEffectProc
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string constm_scriptName
 
uint32 m_scriptSpellId
 

Member Function Documentation

void spell_hun_pet_scaling_04::spell_hun_pet_scaling_04_AuraScript::CalculateAmountExpertise ( AuraEffect const ,
int32 amount,
bool  
)
inlineprivate
1216  {
1217  if (!GetCaster() || !GetCaster()->GetOwner())
1218  return;
1219  if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1220  {
1221  // For others recalculate it from:
1222  float Expertise = 0.0f;
1223  // Increase hit from SPELL_AURA_MOD_EXPERTISE
1224  Expertise += owner->GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE);
1225  // Increase Expertise from Expertise ratings
1226  Expertise += owner->GetRatingBonusValue(CR_EXPERTISE);
1227 
1228  amount += int32(Expertise);
1229  }
1230  }
Definition: SpellAuraDefines.h:300
Definition: Unit.h:648
WorldObject * GetOwner() const
Definition: SpellScript.cpp:1011
Unit * GetCaster() const
Definition: SpellScript.cpp:1006
int32_t int32
Definition: g3dmath.h:167

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void spell_hun_pet_scaling_04::spell_hun_pet_scaling_04_AuraScript::CalculateAmountMeleeHit ( AuraEffect const ,
int32 amount,
bool  
)
inlineprivate
1182  {
1183  if (!GetCaster() || !GetCaster()->GetOwner())
1184  return;
1185  if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1186  {
1187  // For others recalculate it from:
1188  float HitMelee = 0.0f;
1189  // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
1190  HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE);
1191  // Increase hit melee from meele hit ratings
1192  HitMelee += owner->GetRatingBonusValue(CR_HIT_MELEE);
1193 
1194  amount += int32(HitMelee);
1195  }
1196  }
Definition: Unit.h:630
WorldObject * GetOwner() const
Definition: SpellScript.cpp:1011
Definition: SpellAuraDefines.h:114
Unit * GetCaster() const
Definition: SpellScript.cpp:1006
int32_t int32
Definition: g3dmath.h:167

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void spell_hun_pet_scaling_04::spell_hun_pet_scaling_04_AuraScript::CalculateAmountSpellHit ( AuraEffect const ,
int32 amount,
bool  
)
inlineprivate
1199  {
1200  if (!GetCaster() || !GetCaster()->GetOwner())
1201  return;
1202  if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1203  {
1204  // For others recalculate it from:
1205  float HitSpell = 0.0f;
1206  // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
1207  HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
1208  // Increase hit spell from spell hit ratings
1209  HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
1210 
1211  amount += int32(HitSpell);
1212  }
1213  }
Definition: Unit.h:632
WorldObject * GetOwner() const
Definition: SpellScript.cpp:1011
Unit * GetCaster() const
Definition: SpellScript.cpp:1006
int32_t int32
Definition: g3dmath.h:167
Definition: SpellAuraDefines.h:115

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool spell_hun_pet_scaling_04::spell_hun_pet_scaling_04_AuraScript::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

1175  {
1176  if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1177  return false;
1178  return true;
1179  }
WorldObject * GetOwner() const
Definition: SpellScript.cpp:1011
Definition: ObjectGuid.h:33
Unit * GetCaster() const
Definition: SpellScript.cpp:1006

+ Here is the call graph for this function:

spell_hun_pet_scaling_04::spell_hun_pet_scaling_04_AuraScript::PrepareAuraScript ( spell_hun_pet_scaling_04_AuraScript  )
private
void spell_hun_pet_scaling_04::spell_hun_pet_scaling_04_AuraScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1233  {
1237  }
Definition: SpellAuraDefines.h:300
Definition: SharedDefines.h:29
Definition: SharedDefines.h:28
#define AuraEffectCalcAmountFn(F, I, N)
Definition: SpellScript.h:722
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1198
Definition: SpellAuraDefines.h:114
void CalculateAmountExpertise(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1215
Definition: SpellAuraDefines.h:115
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1181
Definition: SharedDefines.h:30
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Definition: SpellScript.h:721

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: