server/src/game/TotemAI.h
VladimirMangos 69fb9736cc [7667] Add to CreatureAI field pointing to creature itself. Use it instead diff. fields in subclases.
Also send pointer to AI constructors ans mark constructors as explicit.

This changes allow move now some generic often used AI code to CreatureAI helper functions.
2009-04-14 06:52:16 +04:00

47 lines
1.3 KiB
C++

/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_TOTEMAI_H
#define MANGOS_TOTEMAI_H
#include "CreatureAI.h"
#include "Timer.h"
class Creature;
class Totem;
class MANGOS_DLL_DECL TotemAI : public CreatureAI
{
public:
explicit TotemAI(Creature *c);
void MoveInLineOfSight(Unit *);
void AttackStart(Unit *);
void EnterEvadeMode();
bool IsVisible(Unit *) const;
void UpdateAI(const uint32);
static int Permissible(const Creature *);
protected:
Totem& getTotem();
private:
uint64 i_victimGuid;
};
#endif