OregonCore  revision 3611e8a-git
Your Favourite TBC server
VMAP::VMapFactory Class Reference

#include <VMapFactory.h>

Static Public Member Functions

static IVMapManagercreateOrGetVMapManager ()
 
static void clear ()
 
static void preventSpellsFromBeingTestedForLoS (const char *pSpellIdString)
 
static bool checkSpellForLoS (unsigned int pSpellId)
 

Detailed Description

Definition at line 31 of file VMapFactory.h.

Member Function Documentation

bool VMAP::VMapFactory::checkSpellForLoS ( unsigned int  pSpellId)
static

Definition at line 94 of file VMapFactory.cpp.

Referenced by IsSpellIgnoringLOS().

95  {
96  return (!iIgnoreSpellIds->containsKey(pSpellId));
97  }
Table< unsigned int, bool > * iIgnoreSpellIds
Definition: VMapFactory.cpp:49
void VMAP::VMapFactory::clear ( )
static

Definition at line 110 of file VMapFactory.cpp.

References VMAP::gVMapManager, and VMAP::iIgnoreSpellIds.

Referenced by World::~World().

111  {
112  delete iIgnoreSpellIds;
113  iIgnoreSpellIds = NULL;
114 
115  delete gVMapManager;
116  gVMapManager = NULL;
117  }
IVMapManager * gVMapManager
Definition: VMapFactory.cpp:48
Table< unsigned int, bool > * iIgnoreSpellIds
Definition: VMapFactory.cpp:49
void VMAP::VMapFactory::preventSpellsFromBeingTestedForLoS ( const char *  pSpellIdString)
static

parameter: String of spell ids. Delimiter = ","

Definition at line 77 of file VMapFactory.cpp.

References VMAP::chompAndTrim(), and VMAP::getNextId().

Referenced by World::LoadConfigSettings().

78  {
79  if (!iIgnoreSpellIds)
80  iIgnoreSpellIds = new Table<unsigned int , bool>();
81  if (pSpellIdString != NULL)
82  {
83  unsigned int pos = 0;
84  unsigned int id;
85  std::string confString(pSpellIdString);
86  chompAndTrim(confString);
87  while (getNextId(confString, pos, id))
88  iIgnoreSpellIds->set(id, true);
89  }
90  }
bool getNextId(const std::string &pString, unsigned int &pStartPos, unsigned int &pId)
Definition: VMapFactory.cpp:54
Table< unsigned int, bool > * iIgnoreSpellIds
Definition: VMapFactory.cpp:49
void chompAndTrim(std::string &str)
Definition: VMapFactory.cpp:27

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