Planeshift
|
Whenever an NPCPet is told by it's owner to stay, this perception is passed to the NPCPet. More...
#include <perceptions.h>
Public Member Functions | |
virtual void | ExecutePerception (NPC *pet, float weight) |
All preconditions has been checked, now excecute the perception. More... | |
virtual gemNPCObject * | GetTarget () |
Some perception has a target/source. More... | |
virtual Perception * | MakeCopy () |
Make a copy of this perception. More... | |
OwnerCmdPerception (const char *n, psPETCommandMessage::PetCommand_t command, gemNPCObject *owner, gemNPCObject *pet, gemNPCObject *target) | |
virtual bool | ShouldReact (Reaction *reaction, NPC *pet) |
Check if this perception should react to a reaction. More... | |
![]() | |
virtual bool | GetLocation (csVector3 &pos, iSector *§or) |
Get a location assosiated with the perception. More... | |
virtual const csString & | GetName () const |
Get the name of the perception. More... | |
virtual float | GetRadius () const |
Get the radius of the perception. More... | |
const csString & | GetType () const |
Get the type of the perception. More... | |
Perception (const char *name) | |
Constructor. More... | |
Perception (const char *name, const char *type) | |
Constructor. More... | |
void | SetType (const char *type) |
Set the type of the perception. More... | |
virtual csString | ToString (NPC *npc) |
Get a text description of the perception. More... | |
virtual | ~Perception () |
Destructor. More... | |
Static Public Member Functions | |
static csString | BuildName (psPETCommandMessage::PetCommand_t command) |
Protected Attributes | |
psPETCommandMessage::PetCommand_t | command |
csWeakRef< gemNPCObject > | owner |
csWeakRef< gemNPCObject > | pet |
csWeakRef< gemNPCActor > | target |
![]() | |
csString | name |
The name of this perception. More... | |
csString | type |
Type used by perceptions. Usally they correspond to the same value in a reaction. More... | |
Whenever an NPCPet is told by it's owner to stay, this perception is passed to the NPCPet.
Right now, it changes the current behavior of the NPCPet.
Definition at line 484 of file perceptions.h.
OwnerCmdPerception::OwnerCmdPerception | ( | const char * | n, |
psPETCommandMessage::PetCommand_t | command, | ||
gemNPCObject * | owner, | ||
gemNPCObject * | pet, | ||
gemNPCObject * | target | ||
) |
|
static |
All preconditions has been checked, now excecute the perception.
npc | The target of the percpetion. |
weight | Indicate how much the HateList of the npc should be changed. Value comes from the reaction. |
Reimplemented from Perception.
|
inlinevirtual |
Some perception has a target/source.
Reimplemented from Perception.
Definition at line 498 of file perceptions.h.
|
virtual |
Check if this perception should react to a reaction.
reaction | The reaction to check for. |
npc | The NPC that might receive this. |
Reimplemented from Perception.
|
protected |
Definition at line 487 of file perceptions.h.
|
protected |
Definition at line 488 of file perceptions.h.
|
protected |
Definition at line 489 of file perceptions.h.
|
protected |
Definition at line 490 of file perceptions.h.