aboutsummaryrefslogtreecommitdiff
path: root/src/game/NullCreatureAI.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/NullCreatureAI.h')
-rw-r--r--src/game/NullCreatureAI.h37
1 files changed, 27 insertions, 10 deletions
diff --git a/src/game/NullCreatureAI.h b/src/game/NullCreatureAI.h
index d20d727690a..84031f179b0 100644
--- a/src/game/NullCreatureAI.h
+++ b/src/game/NullCreatureAI.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,50 +22,67 @@
#define TRINITY_NULLCREATUREAI_H
#include "CreatureAI.h"
+#include "CreatureAIImpl.h"
class TRINITY_DLL_DECL PassiveAI : public CreatureAI
{
public:
- PassiveAI(Creature *c) : CreatureAI(c) {}
- ~PassiveAI() {}
+ explicit PassiveAI(Creature *c) : CreatureAI(c) {}
void MoveInLineOfSight(Unit *) {}
void AttackStart(Unit *) {}
-
void UpdateAI(const uint32);
+
static int Permissible(const Creature *) { return PERMIT_BASE_IDLE; }
};
-class TRINITY_DLL_DECL PossessedAI : public PassiveAI
+class TRINITY_DLL_DECL PossessedAI : public CreatureAI
{
public:
- PossessedAI(Creature *c) : PassiveAI(c) {}
+ explicit PossessedAI(Creature *c) : CreatureAI(c) {}
+ void MoveInLineOfSight(Unit *) {}
void AttackStart(Unit *target);
void UpdateAI(const uint32);
void EnterEvadeMode() {}
void JustDied(Unit*);
void KilledUnit(Unit* victim);
+
+ static int Permissible(const Creature *) { return PERMIT_BASE_IDLE; }
};
-class TRINITY_DLL_DECL NullCreatureAI : public PassiveAI
+class TRINITY_DLL_DECL NullCreatureAI : public CreatureAI
{
public:
- NullCreatureAI(Creature *c) : PassiveAI(c) {}
+ explicit NullCreatureAI(Creature *c) : CreatureAI(c) {}
+ void MoveInLineOfSight(Unit *) {}
+ void AttackStart(Unit *) {}
void UpdateAI(const uint32) {}
void EnterEvadeMode() {}
+ void OnCharmed(bool apply) {}
+
+ static int Permissible(const Creature *) { return PERMIT_BASE_IDLE; }
};
class TRINITY_DLL_DECL CritterAI : public PassiveAI
{
public:
- CritterAI(Creature *c) : PassiveAI(c) {}
+ explicit CritterAI(Creature *c) : PassiveAI(c) {}
void DamageTaken(Unit *done_by, uint32 & /*damage*/);
void EnterEvadeMode();
};
+class TRINITY_DLL_DECL TriggerAI : public NullCreatureAI
+{
+ public:
+ explicit TriggerAI(Creature *c) : NullCreatureAI(c), casted(false) {}
+ void UpdateAI(const uint32);
+ private:
+ bool casted;
+};
+
#endif