Planeshift
psCombatAttackGameEvent Class Reference

This event actually triggers an attack. More...

#include <psattack.h>

Public Member Functions

psAttackGetAttack ()
 
gemActorGetAttacker ()
 
uint32_t GetAttackerID ()
 
gemActorGetTarget ()
 
uint32_t GetTargetID ()
 
psItemGetWeapon ()
 
INVENTORY_SLOT_NUMBER GetWeaponSlot ()
 
 psCombatAttackGameEvent (csTicks delayticks, psAttack *attack, gemActor *attacker, gemActor *target, INVENTORY_SLOT_NUMBER weaponslot, psItem *weapon)
 
virtual void Trigger ()
 Abstract event processing function. More...
 
virtual ~psCombatAttackGameEvent ()
 
- Public Member Functions inherited from psGameEvent
virtual bool CheckTrigger ()
 Called right before a Trigger is called. More...
 
const char * GetType ()
 Return the type that this event where created with. More...
 
virtual bool IsValid ()
 Return the valid flag. More...
 
bool operator< (const psGameEvent &other) const
 
bool operator== (const psGameEvent &other) const
 
bool operator> (const psGameEvent &other) const
 
 psGameEvent (csTicks ticks, int offsetticks, const char *newType)
 Construct a new game event. More...
 
void QueueEvent ()
 Publish the game event to the local program. More...
 
virtual void SetValid (bool valid)
 Set the valid flag. More...
 
virtual csString ToString () const
 Return a string with information about the event. More...
 
virtual ~psGameEvent ()
 

Public Attributes

INVENTORY_SLOT_NUMBER AttackLocation
 Which slot should we check the armor of? More...
 
MathEnvironment env
 
float FinalDamage
 Final damage applied to target. More...
 
- Public Attributes inherited from psGameEvent
csTicks delayticks
 delay before the event starts More...
 
int id
 id value combined with ticks ensures uniqueness for tree More...
 
csTicks triggerticks
 ticks value when event should be triggered. More...
 
bool valid
 Set this to false if the trigger should not be fired. More...
 

Protected Attributes

psAttackattack
 The attack. More...
 
csWeakRef< gemActorattacker
 Entity who instigated this attack. More...
 
uint32_t AttackerCID
 ClientID of attacker. More...
 
csWeakRef< gemActortarget
 Entity who is target of this attack. More...
 
uint32_t TargetCID
 ClientID of target. More...
 
psItemweapon
 the attacking weapon More...
 
INVENTORY_SLOT_NUMBER weaponSlot
 Identifier of the slot for which this attack event should process. More...
 

Additional Inherited Members

- Static Public Attributes inherited from psGameEvent
static EventManagereventmanager
 
static int nextid
 id counter sequence More...
 

Detailed Description

This event actually triggers an attack.

Definition at line 178 of file psattack.h.

Constructor & Destructor Documentation

psCombatAttackGameEvent::psCombatAttackGameEvent ( csTicks  delayticks,
psAttack attack,
gemActor attacker,
gemActor target,
INVENTORY_SLOT_NUMBER  weaponslot,
psItem weapon 
)
virtual psCombatAttackGameEvent::~psCombatAttackGameEvent ( )
virtual

Member Function Documentation

psAttack* psCombatAttackGameEvent::GetAttack ( )
inline

Definition at line 192 of file psattack.h.

gemActor* psCombatAttackGameEvent::GetAttacker ( )
inline

Definition at line 197 of file psattack.h.

uint32_t psCombatAttackGameEvent::GetAttackerID ( )
inline

Definition at line 222 of file psattack.h.

gemActor* psCombatAttackGameEvent::GetTarget ( )
inline

Definition at line 202 of file psattack.h.

uint32_t psCombatAttackGameEvent::GetTargetID ( )
inline

Definition at line 217 of file psattack.h.

psItem* psCombatAttackGameEvent::GetWeapon ( )
inline

Definition at line 212 of file psattack.h.

INVENTORY_SLOT_NUMBER psCombatAttackGameEvent::GetWeaponSlot ( )
inline

Definition at line 207 of file psattack.h.

virtual void psCombatAttackGameEvent::Trigger ( )
virtual

Abstract event processing function.

This functino have to be overridden and will be called if CheckTrigger is ok at the time given in the constructor.

Implements psGameEvent.

Member Data Documentation

psAttack* psCombatAttackGameEvent::attack
protected

The attack.

Definition at line 233 of file psattack.h.

csWeakRef<gemActor> psCombatAttackGameEvent::attacker
protected

Entity who instigated this attack.

Definition at line 234 of file psattack.h.

uint32_t psCombatAttackGameEvent::AttackerCID
protected

ClientID of attacker.

Definition at line 236 of file psattack.h.

INVENTORY_SLOT_NUMBER psCombatAttackGameEvent::AttackLocation

Which slot should we check the armor of?

Definition at line 229 of file psattack.h.

MathEnvironment psCombatAttackGameEvent::env

Definition at line 228 of file psattack.h.

float psCombatAttackGameEvent::FinalDamage

Final damage applied to target.

Definition at line 230 of file psattack.h.

csWeakRef<gemActor> psCombatAttackGameEvent::target
protected

Entity who is target of this attack.

Definition at line 235 of file psattack.h.

uint32_t psCombatAttackGameEvent::TargetCID
protected

ClientID of target.

Definition at line 237 of file psattack.h.

psItem* psCombatAttackGameEvent::weapon
protected

the attacking weapon

Definition at line 242 of file psattack.h.

INVENTORY_SLOT_NUMBER psCombatAttackGameEvent::weaponSlot
protected

Identifier of the slot for which this attack event should process.

Definition at line 239 of file psattack.h.


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