TrinityCore
Loading...
Searching...
No Matches
Totem.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef TRINITYCORE_TOTEM_H
19#define TRINITYCORE_TOTEM_H
20
21#include "TemporarySummon.h"
22
24{
27 TOTEM_STATUE = 2 // copied straight from MaNGOS, may need more implementation to work
28};
29// Some Totems cast spells that are not in creature DB
30#define SENTRY_TOTEM_SPELLID 6495
31
32#define SENTRY_TOTEM_ENTRY 3968
33
34// Totems spells
35#define SENTRY_STONECLAW_SPELLID 55277
36#define SENTRY_BIND_SIGHT_SPELLID 6277
37
38class TC_GAME_API Totem : public Minion
39{
40 public:
41 Totem(SummonPropertiesEntry const* properties, Unit* owner);
42 virtual ~Totem() { }
43 void Update(uint32 time) override;
44 void InitStats(uint32 duration) override;
45 void InitSummon() override;
46 void UnSummon(uint32 msTime = 0) override;
47 uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
48 uint32 GetTotemDuration() const { return m_duration; }
49 void SetTotemDuration(uint32 duration) { m_duration = duration; }
50 TotemType GetTotemType() const { return m_type; }
51
52 bool UpdateStats(Stats /*stat*/) override { return true; }
53 bool UpdateAllStats() override { return true; }
54 void UpdateResistances(uint32 /*school*/) override { }
55 void UpdateArmor() override { }
56 void UpdateMaxHealth() override { }
57 void UpdateMaxPower(Powers /*power*/) override { }
58 void UpdateAttackPowerAndDamage(bool /*ranged*/) override { }
59 void UpdateDamagePhysical(WeaponAttackType /*attType*/) override { }
60
61 bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, SpellEffectInfo const& spellEffectInfo, WorldObject const* caster, bool requireImmunityPurgesEffectAttribute = false) const override;
62
63 protected:
66};
67#endif
#define TC_GAME_API
Definition Define.h:114
uint8_t uint8
Definition Define.h:135
uint32_t uint32
Definition Define.h:133
WeaponAttackType
Powers
Stats
TotemType
Definition Totem.h:24
@ TOTEM_ACTIVE
Definition Totem.h:26
@ TOTEM_PASSIVE
Definition Totem.h:25
@ TOTEM_STATUE
Definition Totem.h:27
bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, SpellEffectInfo const &spellEffectInfo, WorldObject const *caster, bool requireImmunityPurgesEffectAttribute=false) const override
void InitStats(uint32 duration) override
virtual void UnSummon(uint32 msTime=0)
virtual void InitSummon()
void Update(uint32 time) override
TempSummonType m_type
Definition Totem.h:39
void UpdateMaxHealth() override
Definition Totem.h:56
void UpdateArmor() override
Definition Totem.h:55
uint32 m_duration
Definition Totem.h:65
uint32 GetSpell(uint8 slot=0) const
Definition Totem.h:47
bool UpdateAllStats() override
Definition Totem.h:53
uint32 GetTotemDuration() const
Definition Totem.h:48
virtual ~Totem()
Definition Totem.h:42
TotemType m_type
Definition Totem.h:64
void UpdateAttackPowerAndDamage(bool) override
Definition Totem.h:58
bool UpdateStats(Stats) override
Definition Totem.h:52
TotemType GetTotemType() const
Definition Totem.h:50
void UpdateResistances(uint32) override
Definition Totem.h:54
void SetTotemDuration(uint32 duration)
Definition Totem.h:49
void UpdateMaxPower(Powers) override
Definition Totem.h:57
void UpdateDamagePhysical(WeaponAttackType) override
Definition Totem.h:59
Definition Unit.h:769