|
Pol
Rev 533
|
#include <weapon.h>
Inheritance diagram for UWeapon:
Collaboration diagram for UWeapon:Public Member Functions | |
| UACTION | anim () const |
| const Attribute & | attribute () const |
| virtual Item * | clone () const |
| bool | consume_projectile (UContainer *cont) const |
| unsigned short | delay () const |
| const WeaponDesc & | descriptor () const |
| unsigned short | get_random_damage () const |
| const ScriptDef & | hit_script () const |
| unsigned short | hit_sound () const |
| bool | in_range (const Character *wielder, const Character *target) const |
| bool | is_intrinsic () const |
| bool | is_projectile () const |
| unsigned short | miss_sound () const |
| UACTION | mounted_anim () const |
| unsigned short | projectile_anim () const |
| unsigned short | projectile_sound () const |
| void | set_hit_script (const std::string &scriptname) |
| unsigned short | speed () const |
Protected Member Functions | |
| UWeapon (const WeaponDesc &descriptor, const WeaponDesc *permanent_descriptor) | |
| ~UWeapon () | |
| virtual BObjectImp * | get_script_member (const char *membername) const |
| virtual BObjectImp * | get_script_member_id (const int id) const |
| virtual void | printProperties (std::ostream &os) const |
| virtual void | readProperties (ConfigElem &elem) |
| virtual bool | script_isa (unsigned isatype) const |
| virtual BObjectImp * | set_script_member (const char *membername, const std::string &value) |
| id test | |
| virtual BObjectImp * | set_script_member (const char *membername, int value) |
| id test | |
| virtual BObjectImp * | set_script_member_double (const char *membername, double value) |
| virtual BObjectImp * | set_script_member_id (const int id, const std::string &value) |
| virtual BObjectImp * | set_script_member_id (const int id, int value) |
| id test | |
| virtual BObjectImp * | set_script_member_id_double (const int id, double value) |
Private Types | |
| typedef Equipment | base |
Private Attributes | |
| short | dmg_mod_ |
| ScriptDef | hit_script_ |
| const WeaponDesc * | tmpl |
Friends | |
| UWeapon * | create_intrinsic_weapon (const char *name, ConfigElem &elem, const Package *pkg) |
| class | Item |
| void | load_data () |
| void | load_intrinsic_weapons () |
| void | load_weapon_templates () |
typedef Equipment UWeapon::base [private] |
| UWeapon::UWeapon | ( | const WeaponDesc & | descriptor, |
| const WeaponDesc * | permanent_descriptor | ||
| ) | [protected] |
Definition at line 406 of file weapon.cpp.
| UWeapon::~UWeapon | ( | ) | [protected] |
Definition at line 415 of file weapon.cpp.
References extobj, is_intrinsic(), ItemDesc::objtype, tmpl, ItemDesc::unload_scripts(), and ExternalObject::wrestling.
Here is the call graph for this function:| UACTION UWeapon::anim | ( | ) | const |
Definition at line 486 of file weapon.cpp.
References WeaponDesc::anim, and tmpl.
Referenced by Character::weapon_anim().
Here is the caller graph for this function:| const Attribute & UWeapon::attribute | ( | ) | const |
Definition at line 441 of file weapon.cpp.
References WeaponDesc::pAttr, and tmpl.
Referenced by get_script_member_id(), and Character::weapon_attribute().
Here is the caller graph for this function:| Item * UWeapon::clone | ( | ) | const [virtual] |
Reimplemented from Equipment.
Definition at line 540 of file weapon.cpp.
References Equipment::clone(), dmg_mod_, and hit_script_.
Here is the call graph for this function:| bool UWeapon::consume_projectile | ( | UContainer * | cont | ) | const |
Definition at line 511 of file weapon.cpp.
References UContainer::find_objtype_noninuse(), WeaponDesc::projectile_type, subtract_amount_from_item(), and tmpl.
Referenced by Character::attack().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned short UWeapon::delay | ( | ) | const |
Definition at line 436 of file weapon.cpp.
References WeaponDesc::delay, and tmpl.
Referenced by Character::schedule_attack().
Here is the caller graph for this function:| const WeaponDesc & UWeapon::descriptor | ( | ) | const |
Definition at line 506 of file weapon.cpp.
References tmpl.
Referenced by Character::equippable(), Character::max_weapon_damage(), and Character::min_weapon_damage().
Here is the caller graph for this function:| unsigned short UWeapon::get_random_damage | ( | ) | const |
Definition at line 447 of file weapon.cpp.
References dmg_mod_, WeaponDesc::get_random_damage(), Equipment::hp_, Equipment::maxhp(), and tmpl.
Referenced by Character::random_weapon_damage().
Here is the call graph for this function:
Here is the caller graph for this function:| BObjectImp * UWeapon::get_script_member | ( | const char * | membername | ) | const [protected, virtual] |
Reimplemented from Equipment.
Definition at line 3186 of file uoscrobj.cpp.
References get_script_member_id(), getKnownObjMember(), and ObjMember::id.
Here is the call graph for this function:| BObjectImp * UWeapon::get_script_member_id | ( | const int | id | ) | const [protected, virtual] |
Reimplemented from Equipment.
Definition at line 3171 of file uoscrobj.cpp.
References attribute(), dmg_mod_, hit_script_, is_intrinsic(), MBR_ATTRIBUTE, MBR_DMG_MOD, MBR_HITSCRIPT, MBR_INTRINSIC, Item::name(), ItemDesc::pkg, ScriptDef::relativename(), and tmpl.
Referenced by get_script_member().
Here is the call graph for this function:
Here is the caller graph for this function:| const ScriptDef & UWeapon::hit_script | ( | ) | const [inline] |
Definition at line 101 of file weapon.h.
References hit_script_.
Referenced by Character::attack(), and Character::run_hit_script().
Here is the caller graph for this function:| unsigned short UWeapon::hit_sound | ( | ) | const |
Definition at line 496 of file weapon.cpp.
References WeaponDesc::hit_sound, and tmpl.
Referenced by Character::do_hit_success_effects().
Here is the caller graph for this function:| bool UWeapon::in_range | ( | const Character * | wielder, |
| const Character * | target | ||
| ) | const |
Definition at line 525 of file weapon.cpp.
References dtrace, Realm::has_los(), WeaponDesc::maxrange, WeaponDesc::minrange, pol_distance(), UObject::realm, and tmpl.
Referenced by Character::is_attackable().
Here is the call graph for this function:
Here is the caller graph for this function:| bool UWeapon::is_intrinsic | ( | ) | const |
Definition at line 464 of file weapon.cpp.
References WeaponDesc::is_intrinsic, and tmpl.
Referenced by Character::damage_weapon(), Character::equippable(), get_script_member_id(), set_script_member_id(), set_script_member_id_double(), and ~UWeapon().
Here is the caller graph for this function:| bool UWeapon::is_projectile | ( | ) | const |
Definition at line 459 of file weapon.cpp.
References WeaponDesc::projectile, and tmpl.
Referenced by Character::attack(), Character::damage_weapon(), Character::do_attack_effects(), Character::face(), and Character::move().
Here is the caller graph for this function:| unsigned short UWeapon::miss_sound | ( | ) | const |
Definition at line 501 of file weapon.cpp.
References WeaponDesc::miss_sound, and tmpl.
Referenced by Character::do_hit_failure_effects().
Here is the caller graph for this function:| UACTION UWeapon::mounted_anim | ( | ) | const |
Definition at line 491 of file weapon.cpp.
References WeaponDesc::mounted_anim, and tmpl.
Referenced by Character::weapon_anim().
Here is the caller graph for this function:| void UWeapon::printProperties | ( | std::ostream & | os | ) | const [protected, virtual] |
Reimplemented from Equipment.
Definition at line 548 of file weapon.cpp.
References dmg_mod_, WeaponDesc::hit_script, hit_script_, pf_endl, ItemDesc::pkg, Equipment::printProperties(), ScriptDef::relativename(), and tmpl.
Here is the call graph for this function:| unsigned short UWeapon::projectile_anim | ( | ) | const |
Definition at line 474 of file weapon.cpp.
References WeaponDesc::projectile_anim, and tmpl.
Referenced by Character::do_attack_effects().
Here is the caller graph for this function:| unsigned short UWeapon::projectile_sound | ( | ) | const |
Definition at line 469 of file weapon.cpp.
References WeaponDesc::projectile_sound, and tmpl.
Referenced by Character::do_attack_effects().
Here is the caller graph for this function:| void UWeapon::readProperties | ( | ConfigElem & | elem | ) | [protected, virtual] |
Reimplemented from Equipment.
Definition at line 557 of file weapon.cpp.
References dmg_mod_, ConfigElem::has_prop(), Equipment::readProperties(), ConfigElem::remove_int(), ConfigElem::remove_string(), and set_hit_script().
Here is the call graph for this function:| bool UWeapon::script_isa | ( | unsigned | isatype | ) | const [protected, virtual] |
Reimplemented from Equipment.
Definition at line 3730 of file uoscrobj.cpp.
References POLCLASS_WEAPON, and Equipment::script_isa().
Here is the call graph for this function:| void UWeapon::set_hit_script | ( | const std::string & | scriptname | ) |
Definition at line 568 of file weapon.cpp.
References ScriptDef::clear(), ScriptDef::config(), hit_script_, ItemDesc::pkg, and tmpl.
Referenced by readProperties(), and set_script_member_id().
Here is the call graph for this function:
Here is the caller graph for this function:| BObjectImp * UWeapon::set_script_member | ( | const char * | membername, |
| const std::string & | value | ||
| ) | [protected, virtual] |
id test
Reimplemented from Item.
Definition at line 3207 of file uoscrobj.cpp.
References getKnownObjMember(), ObjMember::id, and set_script_member_id().
Here is the call graph for this function:| BObjectImp * UWeapon::set_script_member | ( | const char * | membername, |
| int | value | ||
| ) | [protected, virtual] |
id test
Reimplemented from Equipment.
Definition at line 3232 of file uoscrobj.cpp.
References getKnownObjMember(), ObjMember::id, and set_script_member_id().
Here is the call graph for this function:| BObjectImp * UWeapon::set_script_member_double | ( | const char * | membername, |
| double | value | ||
| ) | [protected, virtual] |
Reimplemented from Equipment.
Definition at line 3248 of file uoscrobj.cpp.
References getKnownObjMember(), ObjMember::id, Equipment::set_script_member_double(), and set_script_member_id_double().
Here is the call graph for this function:| BObjectImp * UWeapon::set_script_member_id | ( | const int | id, |
| const std::string & | value | ||
| ) | [protected, virtual] |
Reimplemented from Item.
Definition at line 3195 of file uoscrobj.cpp.
References MBR_HITSCRIPT, and set_hit_script().
Referenced by set_script_member(), and set_script_member_id().
Here is the call graph for this function:
Here is the caller graph for this function:| BObjectImp * UWeapon::set_script_member_id | ( | const int | id, |
| int | value | ||
| ) | [protected, virtual] |
id test
Reimplemented from Equipment.
Definition at line 3216 of file uoscrobj.cpp.
References dmg_mod_, is_intrinsic(), MBR_DMG_MOD, and set_script_member_id().
Here is the call graph for this function:| BObjectImp * UWeapon::set_script_member_id_double | ( | const int | id, |
| double | value | ||
| ) | [protected, virtual] |
Reimplemented from Equipment.
Definition at line 3241 of file uoscrobj.cpp.
References is_intrinsic(), and Equipment::set_script_member_id_double().
Referenced by set_script_member_double().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned short UWeapon::speed | ( | ) | const |
Definition at line 431 of file weapon.cpp.
References WeaponDesc::speed, and tmpl.
Referenced by Character::schedule_attack().
Here is the caller graph for this function:| UWeapon* create_intrinsic_weapon | ( | const char * | name, |
| ConfigElem & | elem, | ||
| const Package * | pkg | ||
| ) | [friend] |
Definition at line 247 of file weapon.cpp.
| void load_data | ( | ) | [friend] |
Definition at line 132 of file loadunld.cpp.
| void load_intrinsic_weapons | ( | ) | [friend] |
Definition at line 274 of file weapon.cpp.
| void load_weapon_templates | ( | ) | [friend] |
Definition at line 269 of file weapon.cpp.
short UWeapon::dmg_mod_ [private] |
Definition at line 96 of file weapon.h.
Referenced by clone(), get_random_damage(), get_script_member_id(), printProperties(), readProperties(), and set_script_member_id().
ScriptDef UWeapon::hit_script_ [private] |
Definition at line 98 of file weapon.h.
Referenced by clone(), get_script_member_id(), hit_script(), printProperties(), and set_hit_script().
const WeaponDesc* UWeapon::tmpl [private] |
Definition at line 94 of file weapon.h.
Referenced by anim(), attribute(), consume_projectile(), create_intrinsic_weapon(), delay(), descriptor(), get_random_damage(), get_script_member_id(), hit_sound(), in_range(), is_intrinsic(), is_projectile(), miss_sound(), mounted_anim(), printProperties(), projectile_anim(), projectile_sound(), set_hit_script(), speed(), and ~UWeapon().