* Fix some warlock talent work
[getmangos.git] / src / game / Totem.h
blob33ace85c6447f68191bd92f5847ae6f196cc5fc9
1 /*
2 * Copyright (C) 2005-2008 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 MANGOSSERVER_TOTEM_H
20 #define MANGOSSERVER_TOTEM_H
22 #include "Creature.h"
24 enum TotemType
26 TOTEM_PASSIVE = 0,
27 TOTEM_ACTIVE = 1,
28 TOTEM_STATUE = 2
31 class Totem : public Creature
33 public:
34 explicit Totem();
35 virtual ~Totem(){};
36 void Update( uint32 time );
37 void Summon(Unit* owner);
38 void UnSummon();
39 uint32 GetSpell() const { return m_spells[0]; }
40 uint32 GetTotemDuration() const { return m_duration; }
41 Unit *GetOwner();
42 TotemType GetTotemType() const { return m_type; }
43 void SetTypeBySummonSpell(SpellEntry const * spellProto);
44 void SetDuration(uint32 dur) { m_duration = dur; }
45 void SetOwner(uint64 guid);
47 bool UpdateStats(Stats /*stat*/) { return true; }
48 bool UpdateAllStats() { return true; }
49 void UpdateResistances(uint32 /*school*/) {}
50 void UpdateArmor() {}
51 void UpdateMaxHealth() {}
52 void UpdateMaxPower(Powers /*power*/) {}
53 void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
54 void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
56 bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false);
58 protected:
59 TotemType m_type;
60 uint32 m_duration;
62 #endif