Planeshift
|
Represents a spell. More...
#include <psspell.h>
Public Member Functions | |
void | Affect (gemActor *caster, gemObject *target, float range, float kFactor, float power, Client *client, csTicks castingDuration) const |
bool | CanCast (gemActor *caster, float kFactor, csString &reason, bool canCastAllSpells) |
Performs the necessary checks on the player to make sure they meet the requirements to cast this spell. | |
void | Cast (gemActor *caster, float kFactor, Client *client) const |
Creates a new instance of this spell. | |
float | ChanceOfCastSuccess (psCharacter *caster, float kFactor) const |
float | ChanceOfResearchSuccess (psCharacter *researcher) |
const csString & | GetDescription () const |
csArray< psItemStats * > & | GetGlyphList () |
int | GetID () const |
const csString & | GetImage () const |
const csString & | GetName () const |
int | GetRealm () |
psWay * | GetWay () |
bool | Load (iResultRow &row) |
psSpellCost | ManaCost (psCharacter *caster, float kFactor) const |
bool | MatchGlyphs (const csArray< psItemStats * > &glyphs) |
Takes a list of glyphs and compares them to the correct sequence to construct this spell. | |
float | PowerLevel (psCharacter *caster, float kFactor) const |
psSpell () | |
~psSpell () | |
iScriptableVar implementation | |
Functions that implement the iScriptableVar interface. | |
double | GetProperty (MathEnvironment *env, const char *ptr) |
double | CalcFunction (MathEnvironment *env, const char *functionName, const double *params) |
const char * | ToString () |
Protected Member Functions | |
bool | AffectTarget (gemActor *caster, gemObject *origTarget, gemObject *target, float power, Client *client) const |
Protected Attributes | |
MathExpression * | aoeAngle |
AOE Angle: (Power, WaySkill, RelatedStat) -> Degrees. | |
MathExpression * | aoeRadius |
AOE Radius: (Power, WaySkill, RelatedStat) -> Meters. | |
MathExpression * | castDuration |
Math for various properties. Casting duration: (Power, WaySkill, RelatedStat) -> Seconds. | |
csString | castingEffect |
csString | description |
csArray< psItemStats * > | glyphList |
List of glyphs required to assemble the technique. | |
int | id |
csString | image |
float | maxPower |
The Power (P) cap. | |
csString | name |
csString | npcSpellCategory |
Name of category of spell, which will sent to npc perception system. | |
uint32_t | npcSpellCategoryID |
Hash ID of category of spell, use in network compression to npc perception system. | |
float | npcSpellRelativePower |
Relative Power of spell, used as a hint to npc perception system. | |
bool | offensive |
ProgressionScript * | outcome |
The progression script: (Power, Caster, Target) -> (side effects) | |
MathExpression * | range |
Maximum range to target allowed: (Power, WaySkill, RelatedStat) -> Meters. | |
int | realm |
int | targetTypes |
Bit field if valid target types for this spell. | |
psWay * | way |
Represents a spell.
This is mostly data that is cached in from the database to represent what a spell is. It contains details such as the required glyphs as well as the effect of the spell.
psSpell::psSpell | ( | ) |
psSpell::~psSpell | ( | ) |
void psSpell::Affect | ( | gemActor * | caster, |
gemObject * | target, | ||
float | range, | ||
float | kFactor, | ||
float | power, | ||
Client * | client, | ||
csTicks | castingDuration | ||
) | const |
bool psSpell::AffectTarget | ( | gemActor * | caster, |
gemObject * | origTarget, | ||
gemObject * | target, | ||
float | power, | ||
Client * | client | ||
) | const [protected] |
double psSpell::CalcFunction | ( | MathEnvironment * | env, |
const char * | functionName, | ||
const double * | params | ||
) | [virtual] |
Implements iScriptableVar.
bool psSpell::CanCast | ( | gemActor * | caster, |
float | kFactor, | ||
csString & | reason, | ||
bool | canCastAllSpells | ||
) |
Performs the necessary checks on the player to make sure they meet the requirements to cast this spell.
1) The character is in PEACE or COMBAT modes. 2) The player has the required glyphs (or "cast all spells" privs) 3) The player has the required mana (or infinitemana set).
Creates a new instance of this spell.
caster | The caster of the spell. |
kFactor | The kFactor used. |
client | The client that cast the spell. |
float psSpell::ChanceOfCastSuccess | ( | psCharacter * | caster, |
float | kFactor | ||
) | const |
float psSpell::ChanceOfResearchSuccess | ( | psCharacter * | researcher | ) |
csArray<psItemStats*>& psSpell::GetGlyphList | ( | ) | [inline] |
double psSpell::GetProperty | ( | MathEnvironment * | env, |
const char * | ptr | ||
) | [virtual] |
Implements iScriptableVar.
bool psSpell::Load | ( | iResultRow & | row | ) |
psSpellCost psSpell::ManaCost | ( | psCharacter * | caster, |
float | kFactor | ||
) | const |
bool psSpell::MatchGlyphs | ( | const csArray< psItemStats * > & | glyphs | ) |
Takes a list of glyphs and compares them to the correct sequence to construct this spell.
float psSpell::PowerLevel | ( | psCharacter * | caster, |
float | kFactor | ||
) | const |
const char* psSpell::ToString | ( | ) | [inline, virtual] |
Implements iScriptableVar.
MathExpression* psSpell::aoeAngle [protected] |
MathExpression* psSpell::aoeRadius [protected] |
MathExpression* psSpell::castDuration [protected] |
csString psSpell::castingEffect [protected] |
csString psSpell::description [protected] |
csArray<psItemStats*> psSpell::glyphList [protected] |
int psSpell::id [protected] |
csString psSpell::image [protected] |
float psSpell::maxPower [protected] |
csString psSpell::name [protected] |
csString psSpell::npcSpellCategory [protected] |
uint32_t psSpell::npcSpellCategoryID [protected] |
float psSpell::npcSpellRelativePower [protected] |
bool psSpell::offensive [protected] |
ProgressionScript* psSpell::outcome [protected] |
MathExpression* psSpell::range [protected] |
int psSpell::realm [protected] |
int psSpell::targetTypes [protected] |
psWay* psSpell::way [protected] |