[2] | 1 | /* |
---|
| 2 | * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> |
---|
| 3 | * |
---|
| 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. |
---|
| 8 | * |
---|
| 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. |
---|
| 13 | * |
---|
| 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 |
---|
| 17 | */ |
---|
| 18 | |
---|
| 19 | #ifndef MANGOSSERVER_TOTEM_H |
---|
| 20 | #define MANGOSSERVER_TOTEM_H |
---|
| 21 | |
---|
| 22 | #include "Creature.h" |
---|
| 23 | |
---|
| 24 | enum TotemType |
---|
| 25 | { |
---|
| 26 | TOTEM_PASSIVE = 0, |
---|
| 27 | TOTEM_ACTIVE = 1, |
---|
| 28 | TOTEM_STATUE = 2 |
---|
| 29 | }; |
---|
| 30 | |
---|
| 31 | class Totem : public Creature |
---|
| 32 | { |
---|
| 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); |
---|
| 46 | |
---|
| 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*/) {} |
---|
| 55 | |
---|
| 56 | protected: |
---|
| 57 | TotemType m_type; |
---|
| 58 | uint32 m_duration; |
---|
| 59 | }; |
---|
| 60 | #endif |
---|