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
1999 : _objectVector(objectVector)
2000 {
2001 _guidVector.reserve(_objectVector.size());
2002 for (WorldObject* obj : _objectVector)
2003 _guidVector.push_back(obj->GetGUID());
2004 }
ObjectVector _objectVector
Definition: SmartScriptMgr.h:2015
GuidVector _guidVector
Definition: SmartScriptMgr.h:2017
Definition: Object.h:410

References _guidVector, and _objectVector.

◆ ~ObjectGuidVector()

ObjectGuidVector::~ObjectGuidVector ( )
inline
2012{ }

Member Function Documentation

◆ GetObjectVector()

ObjectVector const * ObjectGuidVector::GetObjectVector ( WorldObject const &  ref) const
inline
2007 {
2008 UpdateObjects(ref);
2009 return &_objectVector;
2010 }
void UpdateObjects(WorldObject const &ref) const
Definition: SmartScriptMgr.h:2020

References _objectVector, and UpdateObjects().

◆ UpdateObjects()

void ObjectGuidVector::UpdateObjects ( WorldObject const &  ref) const
inlineprivate
2021 {
2022 _objectVector.clear();
2023
2024 for (ObjectGuid const& guid : _guidVector)
2025 if (WorldObject* obj = ObjectAccessor::GetWorldObject(ref, guid))
2026 _objectVector.push_back(obj);
2027 }
WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:115
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