Planeshift
HateList Class Reference

This object represents the entities which have attacked or hurt the NPC and prioritizes them. More...

#include <npc.h>

Public Member Functions

void AddHate (EID entity_id, float delta)
 
void Clear ()
 
void DumpHateList (csString &output, const csVector3 &myPos, iSector *mySector)
 
void DumpHateList (NPC *npc, const csVector3 &myPos, iSector *mySector)
 
float GetHate (EID ent)
 
gemNPCActorGetMostHated (NPC *npc, csVector3 &pos, iSector *sector, float range, LocationType *region, bool includeOutsideRegion, bool includeInvisible, bool includeInvincible, float *hate)
 Find the most hated entity within range of given position. More...
 
 HateList (psNPCClient *npcclient, iEngine *engine, psWorld *world)
 
bool Remove (EID entity_id)
 
 ~HateList ()
 

Protected Attributes

csHash< HateListEntry *, EID > hatelist
 

Detailed Description

This object represents the entities which have attacked or hurt the NPC and prioritizes them.

Definition at line 77 of file npc.h.

Constructor & Destructor Documentation

HateList::HateList ( psNPCClient npcclient,
iEngine *  engine,
psWorld world 
)
inline

Definition at line 83 of file npc.h.

HateList::~HateList ( )

Member Function Documentation

void HateList::AddHate ( EID  entity_id,
float  delta 
)
void HateList::Clear ( )
void HateList::DumpHateList ( csString &  output,
const csVector3 &  myPos,
iSector *  mySector 
)
void HateList::DumpHateList ( NPC npc,
const csVector3 &  myPos,
iSector *  mySector 
)
float HateList::GetHate ( EID  ent)
gemNPCActor* HateList::GetMostHated ( NPC npc,
csVector3 &  pos,
iSector *  sector,
float  range,
LocationType region,
bool  includeOutsideRegion,
bool  includeInvisible,
bool  includeInvincible,
float hate 
)

Find the most hated entity within range of given position.

Check the hate list and retrive most hated entity within range.

Parameters
npcThe NPC
posThe position
sectorThe sector of the position
rangeThe range to search for hated entities.
regionThe region to search for hated entities within.
includeOutsideRegionInclude enties outside region in the search.
includeInvisibleInclude invisible entities in the search.
includeInvincibleInclude invincible entities in the search.
hateIf diffrent from NULL, set upon return to the hate of the hated.
Returns
The hated entity
bool HateList::Remove ( EID  entity_id)

Member Data Documentation

csHash<HateListEntry*, EID> HateList::hatelist
protected

Definition at line 80 of file npc.h.


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