Pol  Rev 533
USpell Class Reference

#include <spells.h>

+ Collaboration diagram for USpell:

List of all members.

Public Member Functions

 USpell (ConfigElem &elem, Package *pkg)
UACTION animation () const
void cast (Character *caster)
bool check_mana (Character *chr)
bool check_skill (Character *chr)
void consume_mana (Character *chr)
bool consume_reagents (Character *chr)
unsigned short delay () const
unsigned short difficulty () const
unsigned short manacost () const
const std::string & name () const
void speak_power_words (Character *chr, unsigned short font, unsigned short color)
const unsigned short spell_id () const

Protected Types

typedef std::vector< unsigned
short > 
RegList

Static Protected Member Functions

static void register_spell (USpell *spell)

Protected Attributes

UACTION action_
std::string name_
USpellParams params_
Packagepkg_
std::string power_words_
RegList reglist_
ScriptDef scriptdef_
unsigned short spellid_

Friends

void register_spell (USpell *spell, unsigned short spellid)

Detailed Description

Definition at line 49 of file spells.h.


Member Typedef Documentation

typedef std::vector<unsigned short> USpell::RegList [protected]

Definition at line 80 of file spells.h.


Constructor & Destructor Documentation

USpell::USpell ( ConfigElem elem,
Package pkg 
)

Definition at line 164 of file spells.cpp.

References action_, ACTION_CAST_SPELL1, get_objtype_from_string(), name_, params_, reglist_, ConfigElem::remove_prop(), ConfigElem::throw_error(), and UACTION_IS_VALID().

+ Here is the call graph for this function:


Member Function Documentation

UACTION USpell::animation ( ) const [inline]

Definition at line 110 of file spells.h.

References action_.

void USpell::cast ( Character caster)

Definition at line 216 of file spells.cpp.

References PolConfig::cache_interactive_scripts, Character::client, config, ScriptDef::empty(), find_script2(), ref_ptr< T >::get(), nocast_here(), scriptdef_, send_sysmessage(), and Character::start_spell_script().

Referenced by do_cast(), UOExecutorModule::mf_StartSpellEffect(), and SpellTask::on_run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool USpell::check_mana ( Character chr)

Definition at line 262 of file spells.cpp.

References VitalValue::current_ones(), manacost(), pVitalMana, Character::vital(), and Vital::vitalid.

Referenced by VitalExecutorModule::mf_ConsumeMana().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool USpell::check_skill ( Character chr)

Definition at line 267 of file spells.cpp.

References Character::check_skill(), USpellParams::difficulty, params_, USpellParams::pointvalue, and SKILLID_MAGERY.

+ Here is the call graph for this function:

Definition at line 272 of file spells.cpp.

References Character::consume(), manacost(), pVitalMana, Character::vital(), and Vital::vitalid.

Referenced by VitalExecutorModule::mf_ConsumeMana().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 243 of file spells.cpp.

References Character::backpack(), UContainer::find_objtype_noninuse(), reglist_, and subtract_amount_from_item().

Referenced by UOExecutorModule::mf_ConsumeReagents().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned short USpell::delay ( ) const [inline]

Definition at line 98 of file spells.h.

References USpellParams::delay, and params_.

unsigned short USpell::difficulty ( ) const [inline]

Definition at line 102 of file spells.h.

References USpellParams::difficulty, and params_.

Referenced by UOExecutorModule::mf_GetSpellDifficulty().

+ Here is the caller graph for this function:

unsigned short USpell::manacost ( ) const [inline]

Definition at line 94 of file spells.h.

References USpellParams::manacost, and params_.

Referenced by check_mana(), and consume_mana().

+ Here is the caller graph for this function:

const std::string & USpell::name ( ) const [inline]

Definition at line 106 of file spells.h.

References name_.

Referenced by register_spell().

+ Here is the caller graph for this function:

static void USpell::register_spell ( USpell spell) [static, protected]
void USpell::speak_power_words ( Character chr,
unsigned short  font,
unsigned short  color 
)

Definition at line 277 of file spells.cpp.

References Character::client, Character::hidden(), power_words_, private_say_above(), and say_above().

Referenced by UOExecutorModule::mf_SpeakPowerWords().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const unsigned short USpell::spell_id ( ) const [inline]

Definition at line 114 of file spells.h.

References spellid_.

Referenced by load_spells_cfg(), and Character::start_spell_script().

+ Here is the caller graph for this function:


Friends And Related Function Documentation

void register_spell ( USpell spell,
unsigned short  spellid 
) [friend]

Definition at line 433 of file spells.cpp.


Member Data Documentation

UACTION USpell::action_ [protected]

Definition at line 78 of file spells.h.

Referenced by animation(), and USpell().

std::string USpell::name_ [protected]

Definition at line 76 of file spells.h.

Referenced by name(), and USpell().

Definition at line 82 of file spells.h.

Referenced by check_skill(), delay(), difficulty(), manacost(), and USpell().

Package* USpell::pkg_ [protected]

Definition at line 73 of file spells.h.

Referenced by register_spell().

std::string USpell::power_words_ [protected]

Definition at line 77 of file spells.h.

Referenced by speak_power_words().

Definition at line 81 of file spells.h.

Referenced by consume_reagents(), and USpell().

Definition at line 85 of file spells.h.

Referenced by cast().

unsigned short USpell::spellid_ [protected]

Definition at line 75 of file spells.h.

Referenced by spell_id().


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