aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.h')
-rw-r--r--src/game/Unit.h18
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*)