Updated Copyright year to 2013
[getmangos.git] / src / game / AggressorAI.h
blobaa3c817ca160fba20460cc2bcdaa40ff4f5a0f70
1 /*
2 * Copyright (C) 2005-2013 MaNGOS <http://getmangos.com/>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef MANGOS_AGGRESSORAI_H
20 #define MANGOS_AGGRESSORAI_H
22 #include "CreatureAI.h"
23 #include "Timer.h"
24 #include "ObjectGuid.h"
26 class Creature;
28 class MANGOS_DLL_DECL AggressorAI : public CreatureAI
30 enum AggressorState
32 STATE_NORMAL = 1,
33 STATE_LOOK_AT_VICTIM = 2
36 public:
38 explicit AggressorAI(Creature* c);
40 void MoveInLineOfSight(Unit*) override;
41 void AttackStart(Unit*) override;
42 void EnterEvadeMode() override;
43 bool IsVisible(Unit*) const override;
45 void UpdateAI(const uint32) override;
46 static int Permissible(const Creature*);
48 private:
49 ObjectGuid i_victimGuid;
50 AggressorState i_state;
51 TimeTracker i_tracker;
54 #endif