Planeshift
|
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>
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 gemNPCObject * | GetTarget () |
Some perception has a target/source. | |
virtual Perception * | MakeCopy () |
Make a copy of this perception. | |
Protected Attributes | |
csWeakRef< gemNPCActor > | attacker |
float | damage |
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.
DamagePerception::DamagePerception | ( | const char * | n, |
gemNPCObject * | attack, | ||
float | dmg | ||
) | [inline] |
Definition at line 368 of file perceptions.h.
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.
virtual gemNPCObject* DamagePerception::GetTarget | ( | ) | [inline, virtual] |
Some perception has a target/source.
Reimplemented from Perception.
Definition at line 373 of file perceptions.h.
virtual Perception* DamagePerception::MakeCopy | ( | ) | [virtual] |
csWeakRef<gemNPCActor> DamagePerception::attacker [protected] |
Definition at line 364 of file perceptions.h.
float DamagePerception::damage [protected] |
Definition at line 365 of file perceptions.h.