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

Private Member Functions

 PrepareSpellScript (spell_dru_t10_restoration_4p_bonus_SpellScript)
 
bool Load () override
 
void FilterTargets (std::list< WorldObject * > &targets)
 
void Register () override
 

Additional Inherited Members

- Public Member Functions inherited from SpellScript
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Spell *spell)
 
void _InitHit ()
 
bool _IsEffectPrevented (SpellEffIndex effIndex)
 
bool _IsDefaultEffectPrevented (SpellEffIndex effIndex)
 
void _PrepareScriptCall (SpellScriptHookType hookType)
 
void _FinishScriptCall ()
 
bool IsInCheckCastHook () const
 
bool IsInTargetHook () const
 
bool IsInHitPhase () const
 
bool IsInEffectHook () const
 
UnitGetCaster ()
 
UnitGetOriginalCaster ()
 
SpellInfo constGetSpellInfo ()
 
SpellValue constGetSpellValue ()
 
SpellEffectInfo constGetEffectInfo (SpellEffIndex) const
 
WorldLocation constGetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObjectGetExplTargetWorldObject ()
 
UnitGetExplTargetUnit ()
 
GameObjectGetExplTargetGObj ()
 
ItemGetExplTargetItem ()
 
UnitGetHitUnit ()
 
CreatureGetHitCreature ()
 
PlayerGetHitPlayer ()
 
ItemGetHitItem ()
 
GameObjectGetHitGObj ()
 
WorldLocationGetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
SpellGetSpell ()
 
AuraGetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
SpellEffectInfo constGetEffectInfo () const
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
ItemGetCastItem ()
 
void CreateItem (uint32 effIndex, uint32 itemId)
 
SpellInfo constGetTriggeringSpell ()
 
void FinishCast (SpellCastResult result)
 
void SetCustomCastResultMessage (SpellCustomErrors result)
 
- 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 SpellScript
HookList< CastHandlerBeforeCast
 
HookList< CastHandlerOnCast
 
HookList< CastHandlerAfterCast
 
HookList< CheckCastHandlerOnCheckCast
 
HookList< EffectHandlerOnEffectLaunch
 
HookList< EffectHandlerOnEffectLaunchTarget
 
HookList< EffectHandlerOnEffectHit
 
HookList< EffectHandlerOnEffectHitTarget
 
HookList< EffectHandlerOnEffectSuccessfulDispel
 
HookList< HitHandlerBeforeHit
 
HookList< HitHandlerOnHit
 
HookList< HitHandlerAfterHit
 
HookList
< ObjectAreaTargetSelectHandler
OnObjectAreaTargetSelect
 
HookList
< ObjectTargetSelectHandler
OnObjectTargetSelect
 
HookList
< DestinationTargetSelectHandler
OnDestinationTargetSelect
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string constm_scriptName
 
uint32 m_scriptSpellId
 

Member Function Documentation

void spell_dru_t10_restoration_4p_bonus::spell_dru_t10_restoration_4p_bonus_SpellScript::FilterTargets ( std::list< WorldObject * > &  targets)
inlineprivate
1066  {
1067  if (!GetCaster()->ToPlayer()->GetGroup())
1068  {
1069  targets.clear();
1070  targets.push_back(GetCaster());
1071  }
1072  else
1073  {
1074  targets.remove(GetExplTargetUnit());
1075  std::list<Unit*> tempTargets;
1076  for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
1077  if ((*itr)->GetTypeId() == TYPEID_PLAYER && GetCaster()->IsInRaidWith((*itr)->ToUnit()))
1078  tempTargets.push_back((*itr)->ToUnit());
1079 
1080  if (tempTargets.empty())
1081  {
1082  targets.clear();
1084  return;
1085  }
1086 
1088  targets.clear();
1089  targets.push_back(target);
1090  }
1091  }
Unit * GetExplTargetUnit()
Definition: SpellScript.cpp:426
C::value_type const & SelectRandomContainerElement(C const &container)
Definition: Containers.h:68
Definition: SharedDefines.h:1297
void FinishCast(SpellCastResult result)
Definition: SpellScript.cpp:637
Definition: ObjectGuid.h:33
Unit * GetCaster()
Definition: SpellScript.cpp:394
bool IsInRaidWith(Unit const *unit) const
Definition: Unit.cpp:14391
Definition: Unit.h:1305

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool spell_dru_t10_restoration_4p_bonus::spell_dru_t10_restoration_4p_bonus_SpellScript::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

1061  {
1062  return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1063  }
TypeID GetTypeId() const
Definition: Object.h:113
Definition: ObjectGuid.h:33
Unit * GetCaster()
Definition: SpellScript.cpp:394

+ Here is the call graph for this function:

spell_dru_t10_restoration_4p_bonus::spell_dru_t10_restoration_4p_bonus_SpellScript::PrepareSpellScript ( spell_dru_t10_restoration_4p_bonus_SpellScript  )
private
void spell_dru_t10_restoration_4p_bonus::spell_dru_t10_restoration_4p_bonus_SpellScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1094  {
1096  }
Definition: SharedDefines.h:1900
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:310
Definition: SharedDefines.h:28
void FilterTargets(std::list< WorldObject * > &targets)
Definition: spell_druid.cpp:1065
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition: SpellScript.h:311

+ Here is the call graph for this function:


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