OregonCore  revision be9e804-git
Your Favourite TBC server
FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE > Class Template Reference

#include <Object.h>

Public Member Functions

 FlaggedValuesArray32 ()
 
T_FLAGS GetFlags () const
 
bool HasFlag (FLAG_TYPE flag) const
 
void AddFlag (FLAG_TYPE flag)
 
void DelFlag (FLAG_TYPE flag)
 
T_VALUES GetValue (FLAG_TYPE flag) const
 
void SetValue (FLAG_TYPE flag, T_VALUES value)
 
void AddValue (FLAG_TYPE flag, T_VALUES value)
 

Private Attributes

T_VALUES m_values [ARRAY_SIZE]
 
T_FLAGS m_flags
 

Detailed Description

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
class FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >

Definition at line 587 of file Object.h.

Constructor & Destructor Documentation

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::FlaggedValuesArray32 ( )
inline

Definition at line 590 of file Object.h.

591  {
592  memset(&m_values, 0x00, sizeof(T_VALUES) * ARRAY_SIZE);
593  m_flags = 0;
594  }
T_VALUES m_values[ARRAY_SIZE]
Definition: Object.h:606

Member Function Documentation

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
void FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::AddFlag ( FLAG_TYPE  flag)
inline
template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
void FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::AddValue ( FLAG_TYPE  flag,
T_VALUES  value 
)
inline

Definition at line 603 of file Object.h.

Referenced by Aura::HandleModInvisibility(), Aura::HandleModInvisibilityDetect(), Aura::HandleModStealth(), Aura::HandleModStealthDetect(), Aura::HandleModStealthLevel(), and Player::SetDrunkValue().

603 { m_values[flag] += value; }
etc mysql my cnf *Then change max_allowed_packet to a bigger value
T_VALUES m_values[ARRAY_SIZE]
Definition: Object.h:606
template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
void FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::DelFlag ( FLAG_TYPE  flag)
inline
template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
T_FLAGS FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::GetFlags ( ) const
inline

Definition at line 596 of file Object.h.

Referenced by WorldObject::CanDetectInvisibilityOf(), and WorldObject::CanDetectStealthOf().

596 { return m_flags; }
template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
T_VALUES FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::GetValue ( FLAG_TYPE  flag) const
inline

Definition at line 601 of file Object.h.

Referenced by WorldObject::CanDetectInvisibilityOf(), WorldObject::CanDetectStealthOf(), and WorldObject::CanSeeOrDetect().

601 { return m_values[flag]; }
T_VALUES m_values[ARRAY_SIZE]
Definition: Object.h:606
template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
bool FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::HasFlag ( FLAG_TYPE  flag) const
inline

Definition at line 597 of file Object.h.

597 { return m_flags & (1 << flag); }
template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
void FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::SetValue ( FLAG_TYPE  flag,
T_VALUES  value 
)
inline

Definition at line 602 of file Object.h.

Referenced by Creature::Create(), Aura::HandleAuraGhost(), Player::SetGameMaster(), Player::SetGMVisible(), Unit::SetVisible(), Unit::Unit(), and WorldObject::WorldObject().

602 { m_values[flag] = value; }
etc mysql my cnf *Then change max_allowed_packet to a bigger value
T_VALUES m_values[ARRAY_SIZE]
Definition: Object.h:606

Member Data Documentation

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
T_FLAGS FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::m_flags
private

Definition at line 607 of file Object.h.

template<class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
T_VALUES FlaggedValuesArray32< T_VALUES, T_FLAGS, FLAG_TYPE, ARRAY_SIZE >::m_values[ARRAY_SIZE]
private

Definition at line 606 of file Object.h.


The documentation for this class was generated from the following file: