Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class spell_tournament_melee : public SpellScriptLoader
- {
- public:
- spell_tournament_melee() : SpellScriptLoader("spell_tournament_melee") { }
- class spell_tournament_melee_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_tournament_melee_SpellScript);
- void HandleEffectScriptEffect(SpellEffIndex /*effIndex*/)
- {
- if (Unit* pTarget = GetHitUnit())
- {
- if (Unit *caster = GetCaster())
- {
- if (pTarget->GetTypeId() == TYPEID_UNIT && pTarget->ToCreature()->GetEntry() == 33229)
- {
- // Kill Credit
- if (Unit *player = caster->GetCharmerOrOwner())
- player->CastSpell(player,62672,true);
- }
- }
- }
- }
- void Register()
- {
- OnEffect += SpellEffectFn(spell_tournament_melee_SpellScript::HandleEffectScriptEffect, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
- }
- };
- SpellScript *GetSpellScript() const
- {
- return new spell_tournament_melee_SpellScript();
- }
- };
Add Comment
Please, Sign In to add comment