aboutsummaryrefslogtreecommitdiff
path: root/src/game/Totem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Totem.h')
-rw-r--r--src/game/Totem.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/game/Totem.h b/src/game/Totem.h
index 82b183d5d62..134ca6d6d3f 100644
--- a/src/game/Totem.h
+++ b/src/game/Totem.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,32 +21,28 @@
#ifndef TRINITYCORE_TOTEM_H
#define TRINITYCORE_TOTEM_H
-#include "Creature.h"
+#include "TemporarySummon.h"
enum TotemType
{
TOTEM_PASSIVE = 0,
TOTEM_ACTIVE = 1,
- TOTEM_STATUE = 2
};
#define SENTRY_TOTEM_ENTRY 3968
-class Totem : public Creature
+class Totem : public Minion
{
public:
- explicit Totem();
+ explicit Totem(SummonPropertiesEntry const *properties, Unit *owner);
virtual ~Totem(){};
void Update( uint32 time );
- void Summon(Unit* owner);
+ void InitStats(uint32 duration);
+ void InitSummon();
void UnSummon();
uint32 GetSpell() const { return m_spells[0]; }
uint32 GetTotemDuration() const { return m_duration; }
- Unit *GetOwner();
TotemType GetTotemType() const { return m_type; }
- void SetTypeBySummonSpell(SpellEntry const * spellProto);
- void SetDuration(uint32 dur) { m_duration = dur; }
- void SetOwner(uint64 guid);
bool UpdateStats(Stats /*stat*/) { return true; }
bool UpdateAllStats() { return true; }
@@ -57,7 +53,7 @@ class Totem : public Creature
void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
- bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false);
+ bool IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const;
protected:
TotemType m_type;