root/trunk/src/game/Totem.h @ 233

Revision 233, 2.1 kB (checked in by yumileroy, 17 years ago)

[svn] * Reimplemented packet/update forwarding in more generic way
* Implemented far sight spells (Far Sight, Eagle Eye, etc) at unlimited range and properly forward packets
* Implemented bind vision spells (Mind Vision, etc) to forward packets at unlimited distance
* Implemented Sentry Totem (both vision switching/forwarding and alerting)
* Other misc possession fixes
* Added .bindsight and .unbindsight commands

Please test out the above spells (including Mind Control) and report any issues on the forums.

Original author: gvcoman
Date: 2008-11-14 20:40:35-06:00

Line 
1/*
2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
3 *
4 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef TRINITYCORE_TOTEM_H
22#define TRINITYCORE_TOTEM_H
23
24#include "Creature.h"
25
26enum TotemType
27{
28    TOTEM_PASSIVE    = 0,
29    TOTEM_ACTIVE     = 1,
30    TOTEM_STATUE     = 2
31};
32
33#define SENTRY_TOTEM_ENTRY  3968
34
35class Totem : public Creature
36{
37    public:
38        explicit Totem();
39        virtual ~Totem(){};
40        void Update( uint32 time );
41        void Summon(Unit* owner);
42        void UnSummon();
43        uint32 GetSpell() const { return m_spells[0]; }
44        uint32 GetTotemDuration() const { return m_duration; }
45        Unit *GetOwner();
46        TotemType GetTotemType() const { return m_type; }
47        void SetTypeBySummonSpell(SpellEntry const * spellProto);
48        void SetDuration(uint32 dur) { m_duration = dur; }
49        void SetOwner(uint64 guid);
50
51        bool UpdateStats(Stats /*stat*/) { return true; }
52        bool UpdateAllStats() { return true; }
53        void UpdateResistances(uint32 /*school*/) {}
54        void UpdateArmor() {}
55        void UpdateMaxHealth() {}
56        void UpdateMaxPower(Powers /*power*/) {}
57        void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
58        void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
59       
60        bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false);
61
62    protected:
63        TotemType m_type;
64        uint32 m_duration;
65};
66#endif
Note: See TracBrowser for help on using the browser.