TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ObjectGuidList Class Reference

#include <SmartScriptMgr.h>

Public Member Functions

 ObjectGuidList (ObjectList *objectList, WorldObject *baseObject)
 
ObjectListGetObjectList ()
 
bool Equals (ObjectList *objectList)
 
 ~ObjectGuidList ()
 

Private Attributes

ObjectListm_objectList
 
GuidListm_guidList
 
WorldObjectm_baseObject
 

Constructor & Destructor Documentation

ObjectGuidList::ObjectGuidList ( ObjectList objectList,
WorldObject baseObject 
)
inline
1401  {
1402  ASSERT(objectList != NULL);
1403  m_objectList = objectList;
1404  m_baseObject = baseObject;
1405  m_guidList = new GuidList();
1406 
1407  for (ObjectList::iterator itr = objectList->begin(); itr != objectList->end(); ++itr)
1408  {
1409  m_guidList->push_back((*itr)->GetGUID());
1410  }
1411  }
WorldObject * m_baseObject
Definition: SmartScriptMgr.h:1397
arena_t NULL
Definition: jemalloc_internal.h:624
std::list< ObjectGuid > GuidList
Definition: ObjectGuid.h:333
ObjectList * m_objectList
Definition: SmartScriptMgr.h:1395
GuidList * m_guidList
Definition: SmartScriptMgr.h:1396
#define ASSERT
Definition: Errors.h:55
ObjectGuidList::~ObjectGuidList ( )
inline
1438  {
1439  delete m_objectList;
1440  delete m_guidList;
1441  }
ObjectList * m_objectList
Definition: SmartScriptMgr.h:1395
GuidList * m_guidList
Definition: SmartScriptMgr.h:1396

Member Function Documentation

bool ObjectGuidList::Equals ( ObjectList objectList)
inline
1433  {
1434  return m_objectList == objectList;
1435  }
ObjectList * m_objectList
Definition: SmartScriptMgr.h:1395
ObjectList* ObjectGuidList::GetObjectList ( )
inline
1414  {
1415  if (m_baseObject)
1416  {
1417  //sanitize list using m_guidList
1418  m_objectList->clear();
1419 
1420  for (GuidList::iterator itr = m_guidList->begin(); itr != m_guidList->end(); ++itr)
1421  {
1423  m_objectList->push_back(obj);
1424  else
1425  TC_LOG_DEBUG("scripts.ai", "SmartScript::mTargetStorage stores a guid to an invalid object: %s", itr->ToString().c_str());
1426  }
1427  }
1428 
1429  return m_objectList;
1430  }
WorldObject * m_baseObject
Definition: SmartScriptMgr.h:1397
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
Definition: Object.h:423
TC_GAME_API WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const &)
Definition: ObjectAccessor.cpp:79
ObjectList * m_objectList
Definition: SmartScriptMgr.h:1395
GuidList * m_guidList
Definition: SmartScriptMgr.h:1396

+ Here is the call graph for this function:

Member Data Documentation

WorldObject* ObjectGuidList::m_baseObject
private
GuidList* ObjectGuidList::m_guidList
private
ObjectList* ObjectGuidList::m_objectList
private

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