Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. #define NPC_STRATHOLMES_CRATES 30996
  2.  
  3. class spell_q13149_arcane_disruption : public SpellScriptLoader
  4. {
  5. public:
  6. spell_q13149_arcane_disruption() : SpellScriptLoader("spell_q13149_arcane_disruption") { }
  7.  
  8. class spell_q13149_arcane_disruption_AuraScript : public AuraScript
  9. {
  10. PrepareAuraScript(spell_q13149_arcane_disruption_AuraScript)
  11. void ApplyEffect(AuraEffect const* /*aurEff*/, AuraApplication const* aurApp, AuraEffectHandleModes /*mode*/)
  12. {
  13. if (Unit* pTarget = aurApp->GetTarget())
  14. if (pTarget->GetTypeId() == TYPEID_UNIT && pTarget->GetEntry() == NPC_STRATHOLMES_CRATES)
  15. if (Unit* pCaster = GetCaster())
  16. if (pCaster->GetTypeId() == TYPEID_PLAYER)
  17. pCaster->ToPlayer()->KilledMonsterCredit(NPC_STRATHOLMES_CRATES, 0);
  18. }
  19.  
  20. void Register()
  21. {
  22. OnEffectApply += AuraEffectApplyFn(spell_q13149_arcane_disruption_AuraScript::ApplyEffect, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
  23. }
  24. };
  25.  
  26. AuraScript* GetAuraScript() const
  27. {
  28. return new spell_q13149_arcane_disruption_AuraScript();
  29. }
  30. };
  31.  
  32. /*
  33. -- Dispelling Illusions
  34. DELETE FROM spell_script_names WHERE spell_id = 49590;
  35. INSERT IGNORE INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
  36. (49590, 'spell_q13149_arcane_disruption');
  37. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement