1 /* Copyright (C) 2006 - 2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 SDComment: Quest support: 1783
21 SDCategory: Dun Morogh
28 #include "precompiled.h"
34 #define SAY_HEAL -1000187
36 struct MANGOS_DLL_DECL npc_narm_faulkAI
: public ScriptedAI
41 npc_narm_faulkAI(Creature
* pCreature
) : ScriptedAI(pCreature
) {Reset();}
46 m_creature
->SetUInt32Value(UNIT_DYNAMIC_FLAGS
, UNIT_DYNFLAG_DEAD
);
47 m_creature
->SetStandState(UNIT_STAND_STATE_DEAD
);
51 void MoveInLineOfSight(Unit
*who
) { }
53 void UpdateAI(const uint32 diff
)
55 if (m_creature
->IsStandState())
58 m_creature
->AI()->EnterEvadeMode();
64 void SpellHit(Unit
*Hitter
, const SpellEntry
*Spellkind
)
66 if (Spellkind
->Id
== 8593 && !spellHit
)
68 DoCastSpellIfCan(m_creature
,32343);
69 m_creature
->SetStandState(UNIT_STAND_STATE_STAND
);
70 m_creature
->SetUInt32Value(UNIT_DYNAMIC_FLAGS
, 0);
71 //m_creature->RemoveAllAuras();
72 DoScriptText(SAY_HEAL
, m_creature
, Hitter
);
78 CreatureAI
* GetAI_npc_narm_faulk(Creature
* pCreature
)
80 return new npc_narm_faulkAI(pCreature
);
83 void AddSC_dun_morogh()
87 newscript
= new Script
;
88 newscript
->Name
= "npc_narm_faulk";
89 newscript
->GetAI
= &GetAI_npc_narm_faulk
;
90 newscript
->RegisterSelf();