Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

psAttack Class Reference

Represents an Attack. More...

#include <psattack.h>

List of all members.

Public Member Functions

virtual void Affect (psCombatAttackGameEvent *event)
 Once the combat event is called, this meathod runs preattack checks and runs all calculations needed before the combat event is applied.
bool Attack (gemActor *attacker, gemActor *target, INVENTORY_SLOT_NUMBER slot)
 Schedules an attack.
bool CanAttack (Client *client)
 This is a check to see if the attack can be used by the character.
const csString & GetDescription () const
 Gets the attack description.
int GetID () const
 gets the id
const csString & GetImage () const
 Gets the attack icon string.
const csString & GetName () const
 Gets the Name.
psAttackTypeGetType () const
bool Load (iResultRow &row)
 Initialize the attack from the database entry.
 psAttack ()
 ~psAttack ()

Protected Member Functions

void AffectTarget (gemActor *target, psCombatAttackGameEvent *event, int attack_result)
int CalculateAttack (psCombatAttackGameEvent *event, psItem *subWeapon=NULL)

Protected Attributes

csString animation
 possible attack animation
MathExpressionaoeAngle
 AOE Angle: (Power, WaySkill, RelatedStat) -> Degrees.
MathExpressionaoeRadius
 AOE Radius: (Power, WaySkill, RelatedStat) -> Meters.
MathExpressionattackDelay
 Delay in milliseconds before attack "hits" or has an effect.
MathExpressionattackRange
 The Max Range of the attack (Meters)
MathScriptdamage_script
 Chance of Success.
csString description
 the attack description
int id
 The stored ID of the attack.
csString image
 the address/id of the icon for the attack
csString name
 The stored name of the attack.
ProgressionScriptoutcome
 The progression script: (Power, Caster, Target) -> (side effects)
csRef< psQuestPrereqOprequirements
 all non weapon based attack requirements.
psAttackTypetype
 the attack type
csRef< psQuestPrereqOpTypeRequirements
 all Attack Type based requirements(not handled as a script)

Detailed Description

Represents an Attack.

This is mostly data that is cached from the database to represent what an attack is.

This is going to be very close to how a spell works but more in touch with melee and range style.

Definition at line 82 of file psattack.h.


Constructor & Destructor Documentation

psAttack::psAttack ( )
psAttack::~psAttack ( )

Member Function Documentation

virtual void psAttack::Affect ( psCombatAttackGameEvent event) [virtual]

Once the combat event is called, this meathod runs preattack checks and runs all calculations needed before the combat event is applied.

void psAttack::AffectTarget ( gemActor target,
psCombatAttackGameEvent event,
int  attack_result 
) [protected]
bool psAttack::Attack ( gemActor attacker,
gemActor target,
INVENTORY_SLOT_NUMBER  slot 
)

Schedules an attack.

int psAttack::CalculateAttack ( psCombatAttackGameEvent event,
psItem subWeapon = NULL 
) [protected]
bool psAttack::CanAttack ( Client client)

This is a check to see if the attack can be used by the character.

const csString& psAttack::GetDescription ( ) const [inline]

Gets the attack description.

Returns:
attack description

Definition at line 136 of file psattack.h.

int psAttack::GetID ( ) const [inline]

gets the id

Returns:
the attack id

Definition at line 112 of file psattack.h.

const csString& psAttack::GetImage ( ) const [inline]

Gets the attack icon string.

Returns:
attack icon image string

Definition at line 128 of file psattack.h.

const csString& psAttack::GetName ( ) const [inline]

Gets the Name.

Returns:
returns the name of attack

Definition at line 120 of file psattack.h.

psAttackType* psAttack::GetType ( ) const [inline]

Definition at line 141 of file psattack.h.

bool psAttack::Load ( iResultRow &  row)

Initialize the attack from the database entry.


Member Data Documentation

csString psAttack::animation [protected]

possible attack animation

Definition at line 153 of file psattack.h.

AOE Angle: (Power, WaySkill, RelatedStat) -> Degrees.

Definition at line 166 of file psattack.h.

AOE Radius: (Power, WaySkill, RelatedStat) -> Meters.

Definition at line 164 of file psattack.h.

Delay in milliseconds before attack "hits" or has an effect.

Definition at line 160 of file psattack.h.

The Max Range of the attack (Meters)

Definition at line 162 of file psattack.h.

Chance of Success.

Definition at line 168 of file psattack.h.

csString psAttack::description [protected]

the attack description

Definition at line 154 of file psattack.h.

int psAttack::id [protected]

The stored ID of the attack.

Definition at line 150 of file psattack.h.

csString psAttack::image [protected]

the address/id of the icon for the attack

Definition at line 152 of file psattack.h.

csString psAttack::name [protected]

The stored name of the attack.

Definition at line 151 of file psattack.h.

The progression script: (Power, Caster, Target) -> (side effects)

Definition at line 170 of file psattack.h.

all non weapon based attack requirements.

Definition at line 156 of file psattack.h.

the attack type

Definition at line 155 of file psattack.h.

all Attack Type based requirements(not handled as a script)

Definition at line 157 of file psattack.h.


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