Files
TCPlayerbotCore/src/game/Totem.h
T

65 lines
2.1 KiB
C++
Raw Normal View History

2008-10-02 16:23:55 -05:00
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
2008-10-14 11:57:03 -05:00
*
2010-01-16 20:19:18 +03:00
* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
2008-10-02 16:23:55 -05:00
*
* 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
2008-10-14 11:57:03 -05:00
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2008-10-02 16:23:55 -05:00
* 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
2008-10-14 11:57:03 -05:00
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2008-10-02 16:23:55 -05:00
*/
2009-10-17 15:51:44 -07:00
2008-10-14 11:57:03 -05:00
#ifndef TRINITYCORE_TOTEM_H
#define TRINITYCORE_TOTEM_H
2009-10-17 15:51:44 -07:00
#include "TemporarySummon.h"
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
enum TotemType
{
TOTEM_PASSIVE = 0,
TOTEM_ACTIVE = 1,
2009-10-15 00:45:29 -07:00
TOTEM_STATUE = 2 // copied straight from MaNGOS, may need more implementation to work
2008-10-02 16:23:55 -05:00
};
2009-10-17 15:51:44 -07:00
#define SENTRY_TOTEM_ENTRY 3968
2009-10-17 15:51:44 -07:00
2009-05-02 19:24:22 -05:00
class Totem : public Minion
2008-10-02 16:23:55 -05:00
{
public:
2009-03-20 14:01:46 -06:00
explicit Totem(SummonPropertiesEntry const *properties, Unit *owner);
2008-10-02 16:23:55 -05:00
virtual ~Totem(){};
void Update( uint32 time );
2009-05-06 13:34:11 -05:00
void InitStats(uint32 duration);
void InitSummon();
2008-10-02 16:23:55 -05:00
void UnSummon();
uint32 GetSpell(uint8 slot=0) const { return m_spells[slot]; }
2008-10-02 16:23:55 -05:00
uint32 GetTotemDuration() const { return m_duration; }
TotemType GetTotemType() const { return m_type; }
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
bool UpdateStats(Stats /*stat*/) { return true; }
bool UpdateAllStats() { return true; }
void UpdateResistances(uint32 /*school*/) {}
void UpdateArmor() {}
void UpdateMaxHealth() {}
void UpdateMaxPower(Powers /*power*/) {}
void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
2009-10-17 15:51:44 -07:00
bool IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
protected:
TotemType m_type;
uint32 m_duration;
};
#endif
2009-02-17 20:07:49 -06:00