AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ObjectGuidVector Class Reference

#include "SmartScriptMgr.h"

Public Member Functions

 ObjectGuidVector (ObjectVector const &objectVector)
 
ObjectVector const * GetObjectVector (WorldObject const &ref) const
 
 ~ObjectGuidVector ()
 

Private Member Functions

void UpdateObjects (WorldObject const &ref) const
 

Private Attributes

ObjectVector _objectVector
 
GuidVector _guidVector
 

Detailed Description

Constructor & Destructor Documentation

◆ ObjectGuidVector()

ObjectGuidVector::ObjectGuidVector ( ObjectVector const &  objectVector)
inlineexplicit
1976 : _objectVector(objectVector)
1977 {
1978 _guidVector.reserve(_objectVector.size());
1979 for (WorldObject* obj : _objectVector)
1980 _guidVector.push_back(obj->GetGUID());
1981 }
ObjectVector _objectVector
Definition: SmartScriptMgr.h:1992
GuidVector _guidVector
Definition: SmartScriptMgr.h:1994
Definition: Object.h:405

References _guidVector, and _objectVector.

◆ ~ObjectGuidVector()

ObjectGuidVector::~ObjectGuidVector ( )
inline
1989{ }

Member Function Documentation

◆ GetObjectVector()

ObjectVector const * ObjectGuidVector::GetObjectVector ( WorldObject const &  ref) const
inline
1984 {
1985 UpdateObjects(ref);
1986 return &_objectVector;
1987 }
void UpdateObjects(WorldObject const &ref) const
Definition: SmartScriptMgr.h:1997

References _objectVector, and UpdateObjects().

◆ UpdateObjects()

void ObjectGuidVector::UpdateObjects ( WorldObject const &  ref) const
inlineprivate
1998 {
1999 _objectVector.clear();
2000
2001 for (ObjectGuid const& guid : _guidVector)
2002 if (WorldObject* obj = ObjectAccessor::GetWorldObject(ref, guid))
2003 _objectVector.push_back(obj);
2004 }
WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:118
Definition: ObjectGuid.h:118

References _guidVector, _objectVector, and ObjectAccessor::GetWorldObject().

Referenced by GetObjectVector().

Member Data Documentation

◆ _guidVector

GuidVector ObjectGuidVector::_guidVector
private

Referenced by ObjectGuidVector(), and UpdateObjects().

◆ _objectVector

ObjectVector ObjectGuidVector::_objectVector
mutableprivate