Advertisement
Guest User

Untitled

a guest
Feb 9th, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.15 KB | None | 0 0
  1. // 93398 - 93399 - Shooting stars
  2. class custom_dru_spell_shooting_stars : public SpellScriptLoader
  3. {
  4. public:
  5.     custom_dru_spell_shooting_stars() : SpellScriptLoader("custom_dru_spell_shooting_stars") { }
  6.  
  7.     class custom_dru_spell_shooting_stars_AuraScript : public AuraScript
  8.     {
  9.         PrepareAuraScript(custom_dru_spell_shooting_stars_AuraScript);
  10.  
  11.         bool Validate(SpellInfo const* /*spellInfo*/)
  12.         {
  13.             if (!sSpellMgr->GetSpellInfo(93398) || !sSpellMgr->GetSpellInfo(93399))
  14.                 return false;
  15.             return true;
  16.         }
  17.        
  18.         void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
  19.         {
  20.             PreventDefaultAction();
  21.             Player* caster = GetCaster()->ToPlayer();
  22.  
  23.             if (caster->GetSpellHistory()->HasCooldown(78674))
  24.             {
  25.                 caster->CastSpell(caster, 93400, true);
  26.                 caster->GetSpellHistory()->ResetCooldown (78674,true);
  27.             }
  28.         }
  29.        
  30.         void Register() {
  31.             /*hook registration here*/
  32.         }
  33.     };
  34.  
  35.     AuraScript* GetAuraScript() const
  36.     {
  37.         return new custom_dru_spell_shooting_stars_AuraScript();
  38.     }
  39. };
  40.  
  41. void AddSC_custom_druid_spell_scripts()
  42. {
  43.     new custom_dru_spell_shooting_stars();
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement