Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
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
11
enum
TotemType
12
{
13
TOTEM_PASSIVE
= 0,
14
TOTEM_ACTIVE
= 1,
15
TOTEM_STATUE
= 2
// copied straight from MaNGOS, may need more implementation to work
16
};
17
18
class
Totem
:
public
Minion
19
{
20
public
:
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]; }
28
uint32
GetTotemDuration
()
const
{
return
m_duration
; }
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
{ }
35
void
UpdateArmor
()
OVERRIDE
{ }
36
void
UpdateMaxHealth
()
OVERRIDE
{ }
37
void
UpdateMaxPower
(
Powers
/*power*/
)
OVERRIDE
{ }
38
void
UpdateAttackPowerAndDamage
(
bool
/*ranged*/
)
OVERRIDE
{ }
39
void
UpdateDamagePhysical
(
WeaponAttackType
/*attType*/
)
OVERRIDE
{ }
40
41
bool
IsImmunedToSpellEffect
(
SpellInfo
const
* spellInfo,
uint32
index)
const
OVERRIDE
;
42
43
protected
:
44
TotemType
m_type
;
45
uint32
m_duration
;
46
};
47
#endif
uint8
std::uint8_t uint8
Definition
Define.h:79
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
Powers
Powers
Definition
SharedDefines.h:213
Stats
Stats
Definition
SharedDefines.h:202
TemporarySummon.h
TotemType
TotemType
Definition
Totem.h:12
TOTEM_ACTIVE
@ TOTEM_ACTIVE
Definition
Totem.h:14
TOTEM_PASSIVE
@ TOTEM_PASSIVE
Definition
Totem.h:13
TOTEM_STATUE
@ TOTEM_STATUE
Definition
Totem.h:15
WeaponAttackType
WeaponAttackType
Definition
Unit.h:572
Creature::m_spells
uint32 m_spells[CREATURE_MAX_SPELLS]
Definition
Creature.h:565
Minion::Minion
Minion(SummonPropertiesEntry const *properties, Unit *owner, bool isWorldObject)
Definition
TemporarySummon.cpp:272
SpellInfo
Definition
SpellInfo.h:158
Totem::m_duration
uint32 m_duration
Definition
Totem.h:45
Totem::GetSpell
uint32 GetSpell(uint8 slot=0) const
Definition
Totem.h:27
Totem::UpdateMaxHealth
void UpdateMaxHealth() OVERRIDE
Definition
Totem.h:36
Totem::InitSummon
void InitSummon() OVERRIDE
Definition
Totem.cpp:67
Totem::UpdateDamagePhysical
void UpdateDamagePhysical(WeaponAttackType) OVERRIDE
Definition
Totem.h:39
Totem::UpdateStats
bool UpdateStats(Stats) OVERRIDE
Definition
Totem.h:32
Totem::GetTotemDuration
uint32 GetTotemDuration() const
Definition
Totem.h:28
Totem::~Totem
virtual ~Totem()
Definition
Totem.h:22
Totem::InitStats
void InitStats(uint32 duration) OVERRIDE
Definition
Totem.cpp:41
Totem::m_type
TotemType m_type
Definition
Totem.h:44
Totem::Update
void Update(uint32 time) OVERRIDE
Definition
Totem.cpp:22
Totem::GetTotemType
TotemType GetTotemType() const
Definition
Totem.h:30
Totem::IsImmunedToSpellEffect
bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, uint32 index) const OVERRIDE
Definition
Totem.cpp:122
Totem::SetTotemDuration
void SetTotemDuration(uint32 duration)
Definition
Totem.h:29
Totem::Totem
Totem(SummonPropertiesEntry const *properties, Unit *owner)
Definition
Totem.cpp:16
Totem::UnSummon
void UnSummon(uint32 msTime=0) OVERRIDE
Definition
Totem.cpp:77
Totem::UpdateAttackPowerAndDamage
void UpdateAttackPowerAndDamage(bool) OVERRIDE
Definition
Totem.h:38
Totem::UpdateMaxPower
void UpdateMaxPower(Powers) OVERRIDE
Definition
Totem.h:37
Totem::UpdateResistances
void UpdateResistances(uint32) OVERRIDE
Definition
Totem.h:34
Totem::UpdateArmor
void UpdateArmor() OVERRIDE
Definition
Totem.h:35
Totem::UpdateAllStats
bool UpdateAllStats() OVERRIDE
Definition
Totem.h:33
Unit
Definition
Unit.h:1367
SummonPropertiesEntry
Definition
DBCStructure.h:2707
src
server
game
Entities
Totem
Totem.h
Generated on
for Project SkyFire Core by
1.17.0