Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class npc_tournament_training_dummy : public CreatureScript
- {
- public:
- npc_tournament_training_dummy(): CreatureScript("npc_tournament_training_dummy"){}
- struct npc_tournament_training_dummyAI : Scripted_NoMovementAI
- {
- npc_tournament_training_dummyAI(Creature* creature) : Scripted_NoMovementAI(creature) {}
- void Reset()
- {
- me->SetControlled(true, UNIT_STATE_STUNNED);
- me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
- }
- void EnterEvadeMode()
- {
- if (!_EnterEvadeMode())
- return;
- Reset();
- }
- void SpellHit(Unit* caster, SpellInfo const* spell)
- {
- if(caster->GetTypeId() != TYPEID_PLAYER)
- return;
- Player* player = caster->ToPlayer();
- switch (spell->Id)
- {
- case 2098: //rogue - evicerate
- case 5143: //mage - arcane missles
- case 348: //warlock - immolate
- case 100: //warrior - charge
- case 56641: //hunter - steady shoot
- case 589: //priest - Shadow Word: Pain
- player->KilledMonsterCredit(44175, 0);
- break;
- }
- }
- };
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_tournament_training_dummyAI(creature);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement