Planeshift
Public Member Functions | Static Public Member Functions | Protected Attributes

OwnerCmdPerception Class Reference

Whenever an NPCPet is told by it's owner to stay, this perception is passed to the NPCPet. More...

#include <perceptions.h>

List of all members.

Public Member Functions

virtual void ExecutePerception (NPC *pet, float weight)
 All preconditions has been checked, now excecute the perception.
virtual gemNPCObjectGetTarget ()
 Some perception has a target/source.
virtual PerceptionMakeCopy ()
 Make a copy of this perception.
 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.

Static Public Member Functions

static csString BuildName (psPETCommandMessage::PetCommand_t command)

Protected Attributes

psPETCommandMessage::PetCommand_t command
csWeakRef< gemNPCObjectowner
csWeakRef< gemNPCObjectpet
csWeakRef< gemNPCActortarget

Detailed Description

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 487 of file perceptions.h.


Constructor & Destructor Documentation

OwnerCmdPerception::OwnerCmdPerception ( const char *  n,
psPETCommandMessage::PetCommand_t  command,
gemNPCObject owner,
gemNPCObject pet,
gemNPCObject target 
)

Member Function Documentation

static csString OwnerCmdPerception::BuildName ( psPETCommandMessage::PetCommand_t  command) [static]
virtual void OwnerCmdPerception::ExecutePerception ( NPC npc,
float  weight 
) [virtual]

All preconditions has been checked, now excecute the perception.

Parameters:
npcThe target of the percpetion.
weightIndicate how much the HateList of the npc should be changed. Value comes from the reaction.

Reimplemented from Perception.

virtual gemNPCObject* OwnerCmdPerception::GetTarget ( ) [inline, virtual]

Some perception has a target/source.

See also:
DamagePerception
Returns:
the target of this perception.

Reimplemented from Perception.

Definition at line 501 of file perceptions.h.

virtual Perception* OwnerCmdPerception::MakeCopy ( ) [virtual]

Make a copy of this perception.

Returns:
the copy.

Reimplemented from Perception.

virtual bool OwnerCmdPerception::ShouldReact ( Reaction reaction,
NPC npc 
) [virtual]

Check if this perception should react to a reaction.

Parameters:
reactionThe reaction to check for.
npcThe NPC that might receive this.
Returns:
true if reaction should be reacted to.

Reimplemented from Perception.


Member Data Documentation

Definition at line 490 of file perceptions.h.

csWeakRef<gemNPCObject> OwnerCmdPerception::owner [protected]

Definition at line 491 of file perceptions.h.

csWeakRef<gemNPCObject> OwnerCmdPerception::pet [protected]

Definition at line 492 of file perceptions.h.

csWeakRef<gemNPCActor> OwnerCmdPerception::target [protected]

Definition at line 493 of file perceptions.h.


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