aboutsummaryrefslogtreecommitdiff
path: root/src/game/CombatAI.h
diff options
context:
space:
mode:
authorRat <none@none>2010-04-29 21:22:25 +0200
committerRat <none@none>2010-04-29 21:22:25 +0200
commit757fbfba83f466bd3f757998a705407cfe156868 (patch)
treee8b238532f1d342532b20279bdd71bf70cca69aa /src/game/CombatAI.h
parent946ded461927ddb352d2f20041b70ecb7f568cf6 (diff)
*implemented 'empty' VehicleAI
NOTE: VehicleAI::UpdateAI runs even while the vehicle is mounted! --HG-- branch : trunk
Diffstat (limited to 'src/game/CombatAI.h')
-rw-r--r--src/game/CombatAI.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/game/CombatAI.h b/src/game/CombatAI.h
index ee13180f9b5..1c043a1aad1 100644
--- a/src/game/CombatAI.h
+++ b/src/game/CombatAI.h
@@ -100,5 +100,22 @@ struct AOEAI : public CreatureAI
static int Permissible(const Creature *);
};
+#define VEHICLE_RESET_TIME 5000
+struct VehicleAI : public CreatureAI
+{
+ public:
+ explicit VehicleAI(Creature *c) : CreatureAI(c), m_vehicle(c->GetVehicleKit()), m_IsVehicleInUse(false) {}
+
+ void UpdateAI(const uint32 diff);
+ static int Permissible(const Creature *);
+ void Reset();
+ void MoveInLineOfSight(Unit *) {}
+ void AttackStart(Unit *) {}
+ void OnCharmed(bool apply);
+
+ private:
+ Vehicle* m_vehicle;
+ bool m_IsVehicleInUse;
+};
#endif