SHOW:
|
|
- or go back to the newest paste.
| 1 | class npc_tournament_training_dummy : public CreatureScript | |
| 2 | {
| |
| 3 | public: | |
| 4 | npc_tournament_training_dummy(): CreatureScript("npc_tournament_training_dummy"){}
| |
| 5 | ||
| 6 | struct npc_tournament_training_dummyAI : Scripted_NoMovementAI | |
| 7 | {
| |
| 8 | npc_tournament_training_dummyAI(Creature* creature) : Scripted_NoMovementAI(creature) {}
| |
| 9 | ||
| 10 | void Reset() | |
| 11 | {
| |
| 12 | me->SetControlled(true, UNIT_STATE_STUNNED); | |
| 13 | me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); | |
| 14 | } | |
| 15 | ||
| 16 | void EnterEvadeMode() | |
| 17 | {
| |
| 18 | if (!_EnterEvadeMode()) | |
| 19 | return; | |
| 20 | ||
| 21 | Reset(); | |
| 22 | } | |
| 23 | ||
| 24 | void SpellHit(Unit* caster, SpellInfo const* spell) | |
| 25 | {
| |
| 26 | switch (spellInfo->Id) | |
| 27 | {
| |
| 28 | case 2098: //rogue - evicerate | |
| 29 | case 5143: //mage - arcane missles | |
| 30 | case 348: //warlock - immolate | |
| 31 | case 100: //warrior - charge | |
| 32 | case 56641: //hunter - steady shoot | |
| 33 | case 589: //priest - Shadow Word: Pain | |
| 34 | caster->KilledMonsterCredit(44175, 0); | |
| 35 | break; | |
| 36 | } | |
| 37 | } | |
| 38 | }; | |
| 39 | ||
| 40 | CreatureAI* GetAI(Creature* creature) const | |
| 41 | {
| |
| 42 | return new npc_tournament_training_dummyAI(creature); | |
| 43 | } | |
| 44 | }; |