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

Private Member Functions

 PrepareSpellScript (spell_icc_sprit_alarm_SpellScript)
 
void HandleEvent (SpellEffIndex effIndex)
 
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 bool Load ()
 
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_icc_sprit_alarm::spell_icc_sprit_alarm_SpellScript::HandleEvent ( SpellEffIndex  effIndex)
inlineprivate
1799  {
1800  PreventHitDefaultEffect(effIndex);
1801  uint32 trapId = 0;
1802  switch (GetSpellInfo()->GetEffect(effIndex)->MiscValue)
1803  {
1804  case EVENT_AWAKEN_WARD_1:
1805  trapId = GO_SPIRIT_ALARM_1;
1806  break;
1807  case EVENT_AWAKEN_WARD_2:
1808  trapId = GO_SPIRIT_ALARM_2;
1809  break;
1810  case EVENT_AWAKEN_WARD_3:
1811  trapId = GO_SPIRIT_ALARM_3;
1812  break;
1813  case EVENT_AWAKEN_WARD_4:
1814  trapId = GO_SPIRIT_ALARM_4;
1815  break;
1816  default:
1817  return;
1818  }
1819 
1820  if (GameObject* trap = GetCaster()->FindNearestGameObject(trapId, 5.0f))
1821  trap->SetRespawnTime(trap->GetGOInfo()->GetAutoCloseTime());
1822 
1823  std::list<Creature*> wards;
1826  for (std::list<Creature*>::iterator itr = wards.begin(); itr != wards.end(); ++itr)
1827  {
1828  if ((*itr)->IsAlive() && (*itr)->HasAura(SPELL_STONEFORM))
1829  {
1830  (*itr)->AI()->Talk(SAY_TRAP_ACTIVATE);
1831  (*itr)->RemoveAurasDueToSpell(SPELL_STONEFORM);
1832  if (Unit* target = (*itr)->SelectNearestTarget(150.0f))
1833  (*itr)->AI()->AttackStart(target);
1834  break;
1835  }
1836  }
1837  }
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Definition: SpellScript.cpp:583
Definition: icecrown_citadel.h:144
Definition: icecrown_citadel.h:338
Definition: icecrown_citadel.cpp:70
Definition: Object.h:668
Definition: icecrown_citadel.h:340
Definition: icecrown_citadel.cpp:280
Definition: icecrown_citadel.cpp:277
void GetCreatureListWithEntryInGrid(std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
Definition: Object.cpp:2483
Definition: icecrown_citadel.h:46
Definition: icecrown_citadel.h:339
uint32_t uint32
Definition: Define.h:150
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:404
Definition: GameObject.h:880
Unit * GetCaster()
Definition: SpellScript.cpp:394
Definition: icecrown_citadel.h:337
Definition: icecrown_citadel.cpp:279
Definition: icecrown_citadel.cpp:278
Definition: Unit.h:1305

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

spell_icc_sprit_alarm::spell_icc_sprit_alarm_SpellScript::PrepareSpellScript ( spell_icc_sprit_alarm_SpellScript  )
private
void spell_icc_sprit_alarm::spell_icc_sprit_alarm_SpellScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1840  {
1842  }
Definition: SharedDefines.h:29
HookList< EffectHandler > OnEffectHit
Definition: SpellScript.h:294
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:297
Definition: SharedDefines.h:1071
void HandleEvent(SpellEffIndex effIndex)
Definition: icecrown_citadel.cpp:1798

+ Here is the call graph for this function:


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