90 _objects[
object.getType()].push_back(&
object);
98 _objects[
object.getType()].remove(&
object);
106 ObjectMap::const_iterator l =
_objects.find(type);
118 ObjectMap::const_iterator l =
_objects.find(type);
120 return new SearchType(kEmptyObjectList.begin(), kEmptyObjectList.end());
130 return dynamic_cast<Module *
>(object);
134 return dynamic_cast<Area *
>(object);
138 return dynamic_cast<Waypoint *
>(object);
142 return dynamic_cast<Situated *
>(object);
146 return dynamic_cast<Placeable *
>(object);
150 return dynamic_cast<Door *
>(object);
154 return dynamic_cast<Creature *
>(object);
159 if (!pc || !pc->
isPC())
166 return dynamic_cast<Location *
>(engineType);
A container of The Witcher objects.
void addObject(Witcher::Object &object)
Add an object to this container.
An area in The Witcher, holding all objects and area geometry within, as well as general area propert...
::Aurora::NWScript::Object * getFirstObjectByType(ObjectType type) const
Return the first object of this type.
std::list< Witcher::Object * > ::const_iterator iterator
An object within a Witcher area.
static Area * toArea(Aurora::NWScript::Object *object)
ObjectDistanceSort(const Witcher::Object &target)
static Placeable * toPlaceable(Aurora::NWScript::Object *object)
A situated object in a The Witcher area.
::Aurora::NWScript::ObjectSearch * findObjectsByType(ObjectType type) const
Return a search context to iterate over all objects of this type.
static Creature * toCreature(Aurora::NWScript::Object *object)
static Module * toModule(Aurora::NWScript::Object *object)
static Waypoint * toWaypoint(Aurora::NWScript::Object *object)
float getDistance(Witcher::Object &a)
SearchRange(const range &r)
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
static Creature * toPC(Aurora::NWScript::Object *object)
static Door * toDoor(Aurora::NWScript::Object *object)
A door in a The Witcher area.
void removeObject(Witcher::Object &object)
Remove an object from this container.
A creature in a The Witcher area.
::Aurora::NWScript::Object * getObject(const iterator &t)
bool operator()(Witcher::Object *a, Witcher::Object *b)
Utility templates and functions.
An object in a The Witcher area.
SearchType(const type &l)
Low-level type definitions to handle fixed width types portably.
void removeObject(Object &object)
Remove an object from this container.
Object * get()
Return the current object in the search context.
A waypoint in a The Witcher area.
std::list< Witcher::Object * > type
static Location * toLocation(Aurora::NWScript::EngineType *engineType)
The context needed to run a The Witcher module.
static Situated * toSituated(Aurora::NWScript::Object *object)
The context holding a The Witcher area.
bool isPC() const
Is the creature a player character?
A location within a The Witcher area.
std::list< Witcher::Object * > ObjectList
static Witcher::Object * toObject(::Aurora::NWScript::Object *object)
A placeable object in a The Witcher area.
SearchType(const iterator &a, const iterator &b)
void addObject(Object &object)
Add an object to this container.