Planeshift
Public Member Functions | Protected Attributes

NPCCmdPerception Class Reference

Whenever an NPC Cmd is received this perception is fired. More...

#include <perceptions.h>

List of all members.

Public Member Functions

virtual PerceptionMakeCopy ()
 Make a copy of this perception.
 NPCCmdPerception (const char *command, NPC *self)
virtual bool ShouldReact (Reaction *reaction, NPC *npc)
 Check if this perception should react to a reaction.

Protected Attributes

NPCself

Detailed Description

Whenever an NPC Cmd is received this perception is fired.

This is most typicaly from a response script like: Example:

 <npccmd cmd="test_cmd"/>

Definition at line 539 of file perceptions.h.


Constructor & Destructor Documentation

NPCCmdPerception::NPCCmdPerception ( const char *  command,
NPC self 
)

Member Function Documentation

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

Make a copy of this perception.

Returns:
the copy.

Reimplemented from Perception.

virtual bool NPCCmdPerception::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 542 of file perceptions.h.


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