aboutsummaryrefslogtreecommitdiff
path: root/src/game/ReactorAI.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 15:51:44 -0700
committermaximius <none@none>2009-10-17 15:51:44 -0700
commite585187b248f48b3c6e9247b49fa07c6565d65e5 (patch)
tree637c5b7ddacf41040bef4ea4f75a97da64c6a9bc /src/game/ReactorAI.cpp
parent26b5e033ffde3d161382fc9addbfa99738379641 (diff)
*Backed out changeset 3be01fb200a5
--HG-- branch : trunk
Diffstat (limited to 'src/game/ReactorAI.cpp')
-rw-r--r--src/game/ReactorAI.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/ReactorAI.cpp b/src/game/ReactorAI.cpp
index b50aa1825e2..3cece43a7c1 100644
--- a/src/game/ReactorAI.cpp
+++ b/src/game/ReactorAI.cpp
@@ -17,30 +17,37 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
#include "ByteBuffer.h"
#include "ReactorAI.h"
#include "Errors.h"
#include "Log.h"
#include "ObjectAccessor.h"
#include "CreatureAIImpl.h"
+
#define REACTOR_VISIBLE_RANGE (26.46f)
+
int
ReactorAI::Permissible(const Creature *creature)
{
if( creature->isCivilian() || creature->IsNeutralToAll() )
return PERMIT_BASE_REACTIVE;
+
return PERMIT_BASE_NO;
}
+
void
ReactorAI::MoveInLineOfSight(Unit *)
{
}
+
void
ReactorAI::UpdateAI(const uint32 /*time_diff*/)
{
// update i_victimGuid if m_creature->getVictim() !=0 and changed
if(!UpdateVictim())
return;
+
if( m_creature->isAttackReady() )
{
if( m_creature->IsWithinMeleeRange(m_creature->getVictim()))