AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::ObjectUpdater Struct Reference

#include "GridNotifiers.h"

Public Member Functions

 ObjectUpdater (const uint32 diff, bool largeOnly)
 
template<class T >
void Visit (GridRefMgr< T > &m)
 
void Visit (PlayerMapType &)
 
void Visit (CorpseMapType &)
 

Public Attributes

uint32 i_timeDiff
 
bool i_largeOnly
 

Detailed Description

Constructor & Destructor Documentation

◆ ObjectUpdater()

Acore::ObjectUpdater::ObjectUpdater ( const uint32  diff,
bool  largeOnly 
)
inlineexplicit
161: i_timeDiff(diff), i_largeOnly(largeOnly) {}
uint32 i_timeDiff
Definition: GridNotifiers.h:159
bool i_largeOnly
Definition: GridNotifiers.h:160

Member Function Documentation

◆ Visit() [1/3]

void Acore::ObjectUpdater::Visit ( CorpseMapType )
inline
164{}

◆ Visit() [2/3]

template<class T >
void ObjectUpdater::Visit ( GridRefMgr< T > &  m)
360{
361 T* obj;
362 for (typename GridRefMgr<T>::iterator iter = m.begin(); iter != m.end(); )
363 {
364 obj = iter->GetSource();
365 ++iter;
366 if (obj->IsInWorld() && (i_largeOnly == obj->IsVisibilityOverridden()))
367 obj->Update(i_timeDiff);
368 }
369}
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), i_largeOnly, and i_timeDiff.

◆ Visit() [3/3]

void Acore::ObjectUpdater::Visit ( PlayerMapType )
inline
163{}

Member Data Documentation

◆ i_largeOnly

bool Acore::ObjectUpdater::i_largeOnly

Referenced by Visit().

◆ i_timeDiff

uint32 Acore::ObjectUpdater::i_timeDiff

Referenced by Visit().