Planeshift
Public Member Functions | Protected Attributes

GroupAttackPerception Class Reference

Whenever an NPC is attacked by a grouop, this perception is passed to the attacked npc. More...

#include <perceptions.h>

List of all members.

Public Member Functions

virtual void ExecutePerception (NPC *npc, float weight)
 All preconditions has been checked, now excecute the perception.
 GroupAttackPerception (const char *n, csArray< gemNPCObject * > &ents, csArray< int > &slots)
virtual PerceptionMakeCopy ()
 Make a copy of this perception.

Protected Attributes

csWeakRef< gemNPCObjectattacker
csArray< gemNPCObject * > attacker_ents
csArray< intbestSkillSlots

Detailed Description

Whenever an NPC is attacked by a grouop, this perception is passed to the attacked npc.

The npc should use this to build an initial hate list for the player group. If the designer wants to cheat, he can start attacking back on this event instead of on first damage, and save a few seconds in response time.

Definition at line 338 of file perceptions.h.


Constructor & Destructor Documentation

GroupAttackPerception::GroupAttackPerception ( const char *  n,
csArray< gemNPCObject * > &  ents,
csArray< int > &  slots 
) [inline]

Definition at line 346 of file perceptions.h.


Member Function Documentation

virtual void GroupAttackPerception::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 Perception* GroupAttackPerception::MakeCopy ( ) [virtual]

Make a copy of this perception.

Returns:
the copy.

Reimplemented from Perception.


Member Data Documentation

Definition at line 341 of file perceptions.h.

Definition at line 342 of file perceptions.h.

Definition at line 343 of file perceptions.h.


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