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