Planeshift
Public Member Functions | Protected Attributes

DamagePerception Class Reference

Whenever an NPC is hit for damage by a melee hit or a spell, this perception is passed to the damaged npc. More...

#include <perceptions.h>

List of all members.

Public Member Functions

 DamagePerception (const char *n, gemNPCObject *attack, float dmg)
virtual void ExecutePerception (NPC *npc, 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.

Protected Attributes

csWeakRef< gemNPCActorattacker
float damage

Detailed Description

Whenever an NPC is hit for damage by a melee hit or a spell, this perception is passed to the damaged npc.

Right now, it affects his/her hate list according to the weight supplied.

Definition at line 361 of file perceptions.h.


Constructor & Destructor Documentation

DamagePerception::DamagePerception ( const char *  n,
gemNPCObject attack,
float  dmg 
) [inline]

Definition at line 368 of file perceptions.h.


Member Function Documentation

virtual void DamagePerception::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* DamagePerception::GetTarget ( ) [inline, virtual]

Some perception has a target/source.

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

Reimplemented from Perception.

Definition at line 373 of file perceptions.h.

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

Make a copy of this perception.

Returns:
the copy.

Reimplemented from Perception.


Member Data Documentation

csWeakRef<gemNPCActor> DamagePerception::attacker [protected]

Definition at line 364 of file perceptions.h.

Definition at line 365 of file perceptions.h.


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