[2] | 1 | /* |
---|
[102] | 2 | * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> |
---|
| 3 | * |
---|
[44] | 4 | * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> |
---|
[2] | 5 | * |
---|
| 6 | * This program is free software; you can redistribute it and/or modify |
---|
| 7 | * it under the terms of the GNU General Public License as published by |
---|
| 8 | * the Free Software Foundation; either version 2 of the License, or |
---|
| 9 | * (at your option) any later version. |
---|
| 10 | * |
---|
| 11 | * This program is distributed in the hope that it will be useful, |
---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
[44] | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
[2] | 14 | * GNU General Public License for more details. |
---|
| 15 | * |
---|
| 16 | * You should have received a copy of the GNU General Public License |
---|
| 17 | * along with this program; if not, write to the Free Software |
---|
[44] | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
[2] | 19 | */ |
---|
| 20 | |
---|
[44] | 21 | #ifndef TRINITYCORE_TOTEM_H |
---|
| 22 | #define TRINITYCORE_TOTEM_H |
---|
[2] | 23 | |
---|
| 24 | #include "Creature.h" |
---|
| 25 | |
---|
| 26 | enum TotemType |
---|
| 27 | { |
---|
| 28 | TOTEM_PASSIVE = 0, |
---|
| 29 | TOTEM_ACTIVE = 1, |
---|
| 30 | TOTEM_STATUE = 2 |
---|
| 31 | }; |
---|
| 32 | |
---|
| 33 | class Totem : public Creature |
---|
| 34 | { |
---|
| 35 | public: |
---|
| 36 | explicit Totem(); |
---|
| 37 | virtual ~Totem(){}; |
---|
| 38 | void Update( uint32 time ); |
---|
| 39 | void Summon(Unit* owner); |
---|
| 40 | void UnSummon(); |
---|
| 41 | uint32 GetSpell() const { return m_spells[0]; } |
---|
| 42 | uint32 GetTotemDuration() const { return m_duration; } |
---|
| 43 | Unit *GetOwner(); |
---|
| 44 | TotemType GetTotemType() const { return m_type; } |
---|
| 45 | void SetTypeBySummonSpell(SpellEntry const * spellProto); |
---|
| 46 | void SetDuration(uint32 dur) { m_duration = dur; } |
---|
| 47 | void SetOwner(uint64 guid); |
---|
| 48 | |
---|
| 49 | bool UpdateStats(Stats /*stat*/) { return true; } |
---|
| 50 | bool UpdateAllStats() { return true; } |
---|
| 51 | void UpdateResistances(uint32 /*school*/) {} |
---|
| 52 | void UpdateArmor() {} |
---|
| 53 | void UpdateMaxHealth() {} |
---|
| 54 | void UpdateMaxPower(Powers /*power*/) {} |
---|
| 55 | void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {} |
---|
| 56 | void UpdateDamagePhysical(WeaponAttackType /*attType*/) {} |
---|
[72] | 57 | |
---|
| 58 | bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false); |
---|
[2] | 59 | |
---|
| 60 | protected: |
---|
| 61 | TotemType m_type; |
---|
| 62 | uint32 m_duration; |
---|
| 63 | }; |
---|
| 64 | #endif |
---|