Advertisement
SkullCrack

Totem.h

Aug 7th, 2011
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.18 KB | None | 0 0
  1. /*
  2.  * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
  3.  * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
  4.  *
  5.  * This program is free software; you can redistribute it and/or modify it
  6.  * under the terms of the GNU General Public License as published by the
  7.  * Free Software Foundation; either version 2 of the License, or (at your
  8.  * option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful, but WITHOUT
  11.  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12.  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13.  * more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License along
  16.  * with this program. If not, see <http://www.gnu.org/licenses/>.
  17.  */
  18.  
  19. #ifndef TRINITYCORE_TOTEM_H
  20. #define TRINITYCORE_TOTEM_H
  21.  
  22. #include "TemporarySummon.h"
  23.  
  24. enum TotemType
  25. {
  26.     TOTEM_PASSIVE    = 0,
  27.     TOTEM_ACTIVE     = 1,
  28.     TOTEM_STATUE     = 2 // copied straight from MaNGOS, may need more implementation to work
  29. };
  30.  
  31. #define SENTRY_TOTEM_ENTRY  3968
  32.  
  33. class Totem : public Minion
  34. {
  35.     public:
  36.         Totem(SummonPropertiesEntry const* properties, Unit* owner);
  37.         virtual ~Totem() {}
  38.         void Update(uint32 time);
  39.         void InitStats(uint32 duration);
  40.         void InitSummon();
  41.         void UnSummon();
  42.         uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
  43.         uint32 GetTotemDuration() const { return m_duration; }
  44.         void SetTotemDuration(uint32 duration) { m_duration = duration; }
  45.         TotemType GetTotemType() const { return m_type; }
  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.         bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
  57.  
  58.     protected:
  59.         TotemType m_type;
  60.         uint32 m_duration;
  61. };
  62. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement