Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Totem.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef SKYFIRESERVER_TOTEM_H
7#define SKYFIRESERVER_TOTEM_H
8
9#include "TemporarySummon.h"
10
12{
15 TOTEM_STATUE = 2 // copied straight from MaNGOS, may need more implementation to work
16};
17
18class Totem : public Minion
19{
20public:
21 Totem(SummonPropertiesEntry const* properties, Unit* owner);
22 virtual ~Totem() { }
23 void Update(uint32 time) OVERRIDE;
24 void InitStats(uint32 duration) OVERRIDE;
25 void InitSummon() OVERRIDE;
26 void UnSummon(uint32 msTime = 0) OVERRIDE;
27 uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
29 void SetTotemDuration(uint32 duration) { m_duration = duration; }
30 TotemType GetTotemType() const { return m_type; }
31
32 bool UpdateStats(Stats /*stat*/) OVERRIDE { return true; }
33 bool UpdateAllStats() OVERRIDE { return true; }
34 void UpdateResistances(uint32 /*school*/) OVERRIDE { }
37 void UpdateMaxPower(Powers /*power*/) OVERRIDE { }
38 void UpdateAttackPowerAndDamage(bool /*ranged*/) OVERRIDE { }
40
41 bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const OVERRIDE;
42
43protected:
46};
47#endif
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
Powers
Stats
TotemType
Definition Totem.h:12
@ TOTEM_ACTIVE
Definition Totem.h:14
@ TOTEM_PASSIVE
Definition Totem.h:13
@ TOTEM_STATUE
Definition Totem.h:15
WeaponAttackType
Definition Unit.h:572
uint32 m_spells[CREATURE_MAX_SPELLS]
Definition Creature.h:565
Minion(SummonPropertiesEntry const *properties, Unit *owner, bool isWorldObject)
uint32 m_duration
Definition Totem.h:45
uint32 GetSpell(uint8 slot=0) const
Definition Totem.h:27
void UpdateMaxHealth() OVERRIDE
Definition Totem.h:36
void InitSummon() OVERRIDE
Definition Totem.cpp:67
void UpdateDamagePhysical(WeaponAttackType) OVERRIDE
Definition Totem.h:39
bool UpdateStats(Stats) OVERRIDE
Definition Totem.h:32
uint32 GetTotemDuration() const
Definition Totem.h:28
virtual ~Totem()
Definition Totem.h:22
void InitStats(uint32 duration) OVERRIDE
Definition Totem.cpp:41
TotemType m_type
Definition Totem.h:44
void Update(uint32 time) OVERRIDE
Definition Totem.cpp:22
TotemType GetTotemType() const
Definition Totem.h:30
bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, uint32 index) const OVERRIDE
Definition Totem.cpp:122
void SetTotemDuration(uint32 duration)
Definition Totem.h:29
Totem(SummonPropertiesEntry const *properties, Unit *owner)
Definition Totem.cpp:16
void UnSummon(uint32 msTime=0) OVERRIDE
Definition Totem.cpp:77
void UpdateAttackPowerAndDamage(bool) OVERRIDE
Definition Totem.h:38
void UpdateMaxPower(Powers) OVERRIDE
Definition Totem.h:37
void UpdateResistances(uint32) OVERRIDE
Definition Totem.h:34
void UpdateArmor() OVERRIDE
Definition Totem.h:35
bool UpdateAllStats() OVERRIDE
Definition Totem.h:33
Definition Unit.h:1367