diff options
author | Blaymoira <none@none> | 2009-03-06 20:14:07 +0100 |
---|---|---|
committer | Blaymoira <none@none> | 2009-03-06 20:14:07 +0100 |
commit | b49732c04db0d5bf67bf78e73e9c22f2078fd47c (patch) | |
tree | e445fa32d805789d966505ffac97535152e852f6 /src/game/Unit.h | |
parent | ba05670747d7f5cc91ce4e623f2b89ba60e8081e (diff) | |
parent | 0b9d3f95de06da9e23bdd075a286679395dab49c (diff) |
*Merge
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.h')
-rw-r--r-- | src/game/Unit.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h index c6648f00a30..d103525208c 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -709,15 +709,16 @@ struct TRINITY_DLL_SPEC CharmInfo { public: explicit CharmInfo(Unit* unit); + ~CharmInfo(); uint32 GetPetNumber() const { return m_petnumber; } void SetPetNumber(uint32 petnumber, bool statwindow); void SetCommandState(CommandStates st) { m_CommandState = st; } CommandStates GetCommandState() { return m_CommandState; } bool HasCommandState(CommandStates state) { return (m_CommandState == state); } - void SetReactState(ReactStates st) { m_reactState = st; } - ReactStates GetReactState() { return m_reactState; } - bool HasReactState(ReactStates state) { return (m_reactState == state); } + //void SetReactState(ReactStates st) { m_reactState = st; } + //ReactStates GetReactState() { return m_reactState; } + //bool HasReactState(ReactStates state) { return (m_reactState == state); } void InitPossessCreateSpells(); void InitCharmCreateSpells(); @@ -734,9 +735,12 @@ struct TRINITY_DLL_SPEC CharmInfo UnitActionBarEntry PetActionBar[10]; CharmSpellEntry m_charmspells[4]; CommandStates m_CommandState; - ReactStates m_reactState; + //ReactStates m_reactState; uint32 m_petnumber; bool m_barInit; + + //for restoration after charmed + ReactStates m_oldReactState; }; // for clearing special attacks @@ -1103,7 +1107,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject bool isPossessing(Unit* u) const { return u->isPossessed() && GetCharmGUID() == u->GetGUID(); } CharmInfo* GetCharmInfo() { return m_charmInfo; } - CharmInfo* InitCharmInfo(Unit* charm); + CharmInfo* InitCharmInfo(); + void DeleteCharmInfo(); SharedVisionList const& GetSharedVisionList() { return m_sharedVision; } void AddPlayerToVision(Player* plr); void RemovePlayerFromVision(Player* plr); @@ -1414,6 +1419,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject } uint32 GetReducedThreatPercent() { return m_reducedThreatPercent; } Unit *GetMisdirectionTarget() { return m_misdirectionTargetGUID ? GetUnit(*this, m_misdirectionTargetGUID) : NULL; } + + bool IsAIEnabled; protected: explicit Unit (); @@ -1466,7 +1473,6 @@ class TRINITY_DLL_SPEC Unit : public WorldObject ThreatManager m_ThreatManager; - bool m_AI_enabled; private: void SendAttackStop(Unit* victim); // only from AttackStop(Unit*) //void SendAttackStart(Unit* pVictim); // only from Unit::AttackStart(Unit*) |