Pol  Rev 533
Item Class Reference

#include <item.h>

+ Inheritance diagram for Item:
+ Collaboration diagram for Item:

List of all members.

Public Member Functions

virtual ~Item ()
virtual void add_to_self (Item *&item)
virtual bool amount_to_remove_is_partial (u16 amount_to_remove) const
virtual void builtin_on_use (Client *client)
unsigned int buyprice () const
s16 calc_element_damage (unsigned element) const
s16 calc_element_resist (unsigned element) const
BObject call_custom_method (const char *methodname, BObjectImpRefVec &pmore)
BObject call_custom_method (const char *methodname)
bool can_add_to_self (unsigned short amount) const
virtual bool can_add_to_self (const Item &item) const
bool check_equip_script (Character *chr, bool startup)
bool check_equiptest_scripts (Character *chr, bool startup=false)
bool check_test_scripts (Character *chr, const std::string &script_ecl, bool startup)
bool check_unequip_script ()
bool check_unequiptest_scripts (Character *chr)
bool check_unequiptest_scripts ()
virtual const char * classname () const
virtual Itemclone () const
virtual BObjectImpcustom_script_method (const char *methodname, Executor &ex)
bool default_invisible () const
bool default_movable () const
bool default_newbie () const
std::string description () const
void disable_decay ()
virtual void double_click (Client *client)
void extricate ()
virtual BObjectImpget_script_member (const char *membername) const
virtual BObjectImpget_script_member_id (const int id) const
virtual u16 get_senditem_amount () const
std::string get_use_script_name () const
u16 getamount () const
bool getbuyprice (unsigned int &buyprice) const
CharacterGetCharacterOwner ()
bool has_element_damage ()
bool has_equip_script () const
bool has_only_default_cprops (const ItemDesc *compare=NULL) const
bool has_resistance (Character *chr)
bool inuse () const
void inuse (bool newvalue)
bool invisible () const
void invisible (bool newvalue)
bool is_gotten () const
void is_gotten (bool newvalue)
virtual unsigned int item_count () const
const ItemDescitemdesc () const
virtual u8 los_height () const
virtual BObjectImpmake_ref ()
std::string merchant_description () const
bool movable () const
void movable (bool newvalue)
virtual std::string name () const
bool newbie () const
void newbie (bool newvalue)
virtual void on_color_changed ()
virtual void on_facing_changed ()
void on_invisible_changed ()
virtual UObjectowner ()
virtual const UObjectowner () const
virtual void readProperties (ConfigElem &elem)
Itemremove_part_of_stack (u16 amount_to_remove)
void restart_decay_timer ()
BObjectImprun_equip_script (Character *chr, bool startup)
BObjectImprun_unequip_script (Character *who)
virtual bool saveonexit () const
virtual void saveonexit (bool newvalue)
virtual bool script_isa (unsigned isatype) const
virtual BObjectImpscript_method (const char *methodname, Executor &ex)
 id test
virtual BObjectImpscript_method_id (const int id, Executor &ex)
unsigned int sellprice () const
void set_decay_after (unsigned int seconds)
virtual BObjectImpset_script_member (const char *membername, const std::string &value)
 id test
virtual BObjectImpset_script_member (const char *membername, int value)
virtual BObjectImpset_script_member_id (const int id, const std::string &value)
virtual BObjectImpset_script_member_id (const int id, int value)
 id test
void set_use_script (const std::string &scriptname)
void setamount (u16 amount)
virtual bool setcolor (u16 newcolor)
virtual void setfacing (u8 newfacing)
virtual bool setgraphic (u16 newobjtype)
bool setlayer (unsigned char layer)
bool should_decay (unsigned int gameclock) const
virtual Itemslice_stacked_item (u16 this_item_new_amount)
u8 slot_index () const
bool slot_index (u8 newvalue)
virtual void spill_contents (UMulti *supporting_multi)
bool stackable () const
void subamount (u16 amount_subtract)
virtual const char * target_tag () const
virtual UObjecttoplevel_owner ()
virtual const UObjecttoplevel_owner () const
virtual void walk_on (Character *chr)
virtual unsigned int weight () const
unsigned int weight_of (unsigned short amount) const

Static Public Member Functions

static Itemcreate (u32 objtype, u32 serial=0)
static Itemcreate (const ItemDesc &itemdesc, u32 serial=0)

Public Attributes

UContainercontainer
Charactergotten_by
u8 layer
u8 tile_layer

Protected Member Functions

 Item (const ItemDesc &itemdesc, UOBJ_CLASS uobj_class)
virtual void printDebugProperties (std::ostream &os) const
virtual void printProperties (std::ostream &os) const

Protected Attributes

u16 amount_
unsigned int buyprice_
unsigned int decayat_gameclock_
std::string equip_script_
bool inuse_
bool invisible_
bool is_gotten_
bool movable_
bool newbie_
std::string on_use_script_
unsigned int sellprice_
u8 slot_index_
std::string unequip_script_

Private Types

typedef UObject base

Detailed Description

Definition at line 32 of file item.h.


Member Typedef Documentation

typedef UObject Item::base [private]

Reimplemented in UCorpse, UContainer, UMulti, UWeapon, UHouse, UBoat, UArmor, Map, UDoor, Equipment, UPlank, and ULockable.

Definition at line 34 of file item.h.


Constructor & Destructor Documentation

Item::~Item ( ) [virtual]

Definition at line 82 of file item00.cpp.

References amount_, UObject::objtype_, return_resources(), and uitem_count.

+ Here is the call graph for this function:


Member Function Documentation

void Item::add_to_self ( Item *&  item) [virtual]

Definition at line 536 of file item.cpp.

References amount_, UObject::destroy(), newbie(), newbie_, and setamount().

Referenced by add_item_to_stack(), drop_item_on_object(), oldBuyHandler(), oldSellHandler(), and script_method_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::amount_to_remove_is_partial ( u16  amount_to_remove) const [virtual]

Definition at line 698 of file item.cpp.

References amount_.

Referenced by get_item(), oldBuyHandler(), and oldSellHandler().

+ Here is the caller graph for this function:

void Item::builtin_on_use ( Client client) [virtual]

Reimplemented in UContainer, Map, and UDoor.

Definition at line 440 of file item.cpp.

References send_sysmessage().

Referenced by double_click(), and UOExecutorModule::mf_UseItem().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int Item::buyprice ( ) const

Definition at line 220 of file item.cpp.

References buyprice_, itemdesc(), and ItemDesc::vendor_buys_for.

Referenced by get_script_member_id(), and getbuyprice().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObject Item::call_custom_method ( const char *  methodname,
BObjectImpRefVec pmore 
)

Definition at line 1177 of file uoscrobj.cpp.

References decint(), and itemdesc().

Referenced by call_custom_method(), UOExecutorModule::mf_SendOpenBook(), open_book_handler(), and read_book_page_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObject Item::call_custom_method ( const char *  methodname)

Definition at line 1171 of file uoscrobj.cpp.

References call_custom_method().

+ Here is the call graph for this function:

bool Item::can_add_to_self ( unsigned short  amount) const

Definition at line 635 of file item.cpp.

References amount_, UContainer::can_add(), container, itemdesc(), ItemDesc::stack_limit, and weight_of().

Referenced by _create_item_in_container(), add_item_to_stack(), drop_item_on_object(), UContainer::find_addable_stack(), UOExecutorModule::mf_AddAmount(), and UOExecutorModule::mf_IsStackable().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::can_add_to_self ( const Item item) const [virtual]

Definition at line 654 of file item.cpp.

References Global_Ignore_CProps.

bool Item::check_equip_script ( Character chr,
bool  startup 
)

Definition at line 963 of file item.cpp.

References has_equip_script(), BObject::isTrue(), and run_equip_script().

Referenced by equip_item(), equip_loaded_item(), and undo_get_item().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::check_equiptest_scripts ( Character chr,
bool  startup = false 
)

Definition at line 1057 of file item.cpp.

References check_test_scripts().

Referenced by equip_item(), equip_loaded_item(), UOExecutorModule::mf_EquipItem(), and undo_get_item().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::check_test_scripts ( Character chr,
const std::string &  script_ecl,
bool  startup 
)

Definition at line 1020 of file item.cpp.

References call_script(), inuse(), packages, ScriptDef::quickconfig(), and script_loaded().

Referenced by check_equiptest_scripts(), and check_unequiptest_scripts().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1062 of file item.cpp.

References check_test_scripts().

Referenced by Character::die(), get_item(), UOExecutorModule::internal_MoveItem(), UOExecutorModule::mf_MoveItemToContainer(), and UOExecutorModule::mf_MoveItemToSecureTradeWin().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1067 of file item.cpp.

References chr_from_wornitems(), container, Character::is_equipped(), IsCharacter(), passert_always, and UObject::serial.

+ Here is the call graph for this function:

const char * Item::classname ( ) const [virtual]

Implements UObject.

Reimplemented in UMulti.

Definition at line 305 of file item.cpp.

Referenced by destroy_item(), and Character::get_from_ground().

+ Here is the caller graph for this function:

BObjectImp * Item::custom_script_method ( const char *  methodname,
Executor ex 
) [virtual]

Reimplemented from UObject.

Definition at line 1159 of file uoscrobj.cpp.

References Executor::fparams, itemdesc(), make_ref(), and Executor::numParams().

Referenced by EItemRefObjImp::call_method(), EMultiRefObjImp::call_method(), and EMultiRefObjImp::call_method_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::default_invisible ( ) const

Definition at line 319 of file item.cpp.

References ItemDesc::invisible, and itemdesc().

Referenced by printProperties(), and readProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::default_movable ( ) const

Definition at line 310 of file item.cpp.

References ItemDesc::DEFAULT, find_itemdesc(), UObject::graphic, FLAG::MOVABLE, movable(), UObject::objtype_, and tile_flags().

Referenced by printProperties(), and readProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::default_newbie ( ) const

Definition at line 324 of file item.cpp.

References itemdesc(), and ItemDesc::newbie.

Referenced by printProperties(), and readProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string Item::description ( ) const [virtual]

Reimplemented from UObject.

Definition at line 159 of file item.cpp.

References amount_, find_itemdesc(), format_description(), UObject::graphic, name(), UObject::objtype_, UObject::specific_name(), tile_desc(), and tile_flags().

Referenced by destroy_item(), dynamic_item_blocks_los(), Realm::dynamic_item_blocks_los(), Character::get_from_ground(), get_script_member_id(), and send_objdesc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 897 of file item.cpp.

References decayat_gameclock_, and UObject::set_dirty().

Referenced by UHouse::add_component(), UHouse::create_components(), and UBoat::create_components().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Item::extricate ( )

Definition at line 816 of file item.cpp.

References chr_from_wornitems(), container, Character::is_equipped(), IsCharacter(), passert_always, UContainer::remove(), UObject::serial, and Character::unequip().

Referenced by destroy_item(), get_item(), UOExecutorModule::internal_MoveItem(), and true_extricate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * Item::get_script_member ( const char *  membername) const [virtual]

Reimplemented from UObject.

Reimplemented in UCorpse, UBoat, UHouse, UWeapon, UMulti, Map, UArmor, Equipment, UDoor, UPlank, and ULockable.

Definition at line 931 of file uoscrobj.cpp.

References get_script_member_id(), getKnownObjMember(), and ObjMember::id.

+ Here is the call graph for this function:

BObjectImp * Item::get_script_member_id ( const int  id) const [virtual]

Reimplemented from UObject.

Reimplemented in UCorpse, UBoat, UHouse, UWeapon, UMulti, Map, UArmor, Equipment, UDoor, UPlank, and ULockable.

Definition at line 865 of file uoscrobj.cpp.

References amount_, buyprice(), calc_element_damage(), calc_element_resist(), Resistances_Mods::cold, ElementDamages_Mods::cold, container, decayat_gameclock_, description(), ItemDesc::doubleclick_range, UObject::element_damage_mod, UObject::element_resist_mod, ELEMENTAL_COLD, ELEMENTAL_ENERGY, ELEMENTAL_FIRE, ELEMENTAL_PHYSICAL, ELEMENTAL_POISON, Resistances_Mods::energy, ElementDamages_Mods::energy, equip_script_, Resistances_Mods::fire, ElementDamages_Mods::fire, UObject::get_script_member_id(), gotten_by, invisible_, is_gotten(), item_count(), itemdesc(), layer, make_ref(), MBR_AMOUNT, MBR_BUYPRICE, MBR_COLD_DAMAGE, MBR_COLD_DAMAGE_MOD, MBR_COLD_RESIST, MBR_COLD_RESIST_MOD, MBR_CONTAINER, MBR_DECAYAT, MBR_DESC, MBR_DOUBLECLICKRANGE, MBR_ENERGY_DAMAGE, MBR_ENERGY_DAMAGE_MOD, MBR_ENERGY_RESIST, MBR_ENERGY_RESIST_MOD, MBR_EQUIPSCRIPT, MBR_FIRE_DAMAGE, MBR_FIRE_DAMAGE_MOD, MBR_FIRE_RESIST, MBR_FIRE_RESIST_MOD, MBR_GETGOTTENBY, MBR_INVISIBLE, MBR_ITEM_COUNT, MBR_LAYER, MBR_MOVABLE, MBR_NEWBIE, MBR_PHYSICAL_DAMAGE, MBR_PHYSICAL_DAMAGE_MOD, MBR_PHYSICAL_RESIST, MBR_PHYSICAL_RESIST_MOD, MBR_POISON_DAMAGE, MBR_POISON_DAMAGE_MOD, MBR_POISON_RESIST, MBR_POISON_RESIST_MOD, MBR_SAVEONEXIT, MBR_SELLPRICE, MBR_STACKABLE, MBR_TILE_LAYER, MBR_UNEQUIPSCRIPT, MBR_USESCRIPT, movable_, newbie_, on_use_script_, Resistances_Mods::physical, ElementDamages_Mods::physical, Resistances_Mods::poison, ElementDamages_Mods::poison, saveonexit(), sellprice(), stackable(), tile_layer, and unequip_script_.

Referenced by get_script_member(), and Map::get_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned short Item::get_senditem_amount ( ) const [virtual]

Reimplemented in UCorpse, and USpellScroll.

Definition at line 488 of file item.cpp.

References amount_.

Referenced by send_container_contents(), send_item(), send_put_in_container(), and send_put_in_container_to_inrange().

+ Here is the caller graph for this function:

string Item::get_use_script_name ( ) const

Definition at line 179 of file item.cpp.

References on_use_script_.

Referenced by UOExecutorModule::mf_UseItem().

+ Here is the caller graph for this function:

bool Item::getbuyprice ( unsigned int &  buyprice) const

Definition at line 232 of file item.cpp.

References buyprice().

Referenced by oldSellHandler(), and send_vendorsell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::has_equip_script ( ) const

Definition at line 906 of file item.cpp.

References equip_script_.

Referenced by check_equip_script(), and UOExecutorModule::mf_EquipItem().

+ Here is the caller graph for this function:

bool Item::has_only_default_cprops ( const ItemDesc compare = NULL) const

Definition at line 682 of file item.cpp.

References UObject::getprops(), Global_Ignore_CProps, ItemDesc::ignore_cprops, itemdesc(), and ItemDesc::props.

Referenced by _create_item_in_container().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Item::inuse ( bool  newvalue) [inline]

Definition at line 225 of file item.h.

References inuse_.

void Item::invisible ( bool  newvalue) [inline]

Definition at line 245 of file item.h.

References invisible_.

bool Item::is_gotten ( ) const [inline]

Definition at line 230 of file item.h.

References is_gotten_.

Referenced by destroy_item(), drop_item(), drop_item_v2(), equip_item(), get_item(), get_script_member_id(), UOExecutorModule::mf_DestroyItem(), and undo_get_item().

+ Here is the caller graph for this function:

void Item::is_gotten ( bool  newvalue) [inline]

Definition at line 235 of file item.h.

References is_gotten_.

unsigned int Item::item_count ( ) const [virtual]

Reimplemented in UContainer.

Definition at line 856 of file item.cpp.

Referenced by StorageAreaImp::get_member(), and get_script_member_id().

+ Here is the caller graph for this function:

u8 Item::los_height ( ) const [virtual]

Implements UObject.

Definition at line 260 of file item.cpp.

References UObject::height.

string Item::merchant_description ( ) const

Definition at line 184 of file item.cpp.

References find_itemdesc(), format_description(), UObject::graphic, name(), UObject::objtype_, UObject::specific_name(), and tile_desc().

Referenced by send_vendorsell(), send_vendorwindow_contents(), and SendAOSTooltip().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Item::movable ( bool  newvalue) [inline]

Definition at line 215 of file item.h.

References movable_.

string Item::name ( ) const [virtual]

Reimplemented from UObject.

Definition at line 129 of file item.cpp.

References UObject::graphic, UObject::name_, and tile_desc().

Referenced by description(), find_giveitem_container(), UWeapon::get_script_member_id(), StorageArea::insert_root_item(), merchant_description(), read_shadow_realms(), and show_item().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::newbie ( ) const [inline]

Definition at line 250 of file item.h.

References newbie_.

Referenced by _create_item_in_container(), add_to_self(), ClientCreateChar(), ClientCreateChar70160(), ClientCreateCharKR(), Character::die(), oldSellHandler(), and send_vendorsell().

+ Here is the caller graph for this function:

void Item::newbie ( bool  newvalue) [inline]

Definition at line 255 of file item.h.

References newbie_.

void Item::on_color_changed ( ) [virtual]

Reimplemented from UObject.

Reimplemented in UBoat.

Definition at line 793 of file item.cpp.

References update_item_to_inrange().

Referenced by set_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Item::on_facing_changed ( ) [virtual]

Reimplemented from UObject.

Definition at line 811 of file item.cpp.

References update_item_to_inrange().

Referenced by set_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 798 of file item.cpp.

References update_item_to_inrange().

Referenced by set_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UObject * Item::owner ( ) [virtual]

Reimplemented from UObject.

Reimplemented in WornItemsContainer.

Definition at line 271 of file item.cpp.

References container, and UObject::self_as_owner().

+ Here is the call graph for this function:

const UObject * Item::owner ( ) const [virtual]

Reimplemented from UObject.

Reimplemented in WornItemsContainer.

Definition at line 279 of file item.cpp.

References container, and UObject::self_as_owner().

+ Here is the call graph for this function:

void Item::printDebugProperties ( std::ostream &  os) const [protected, virtual]

Reimplemented from UObject.

Definition at line 391 of file item.cpp.

References UObject::printDebugProperties().

+ Here is the call graph for this function:

Item * Item::remove_part_of_stack ( u16  amount_to_remove)

Definition at line 728 of file item.cpp.

References clone(), setamount(), and subamount().

Referenced by oldBuyHandler(), and script_method_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * Item::run_equip_script ( Character chr,
bool  startup 
)

Definition at line 911 of file item.cpp.

References ScriptDef::config(), equip_script_, itemdesc(), and run_script_to_completion().

Referenced by check_equip_script(), and UOExecutorModule::mf_EquipItem().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 937 of file item.cpp.

References ScriptDef::config(), itemdesc(), run_script_to_completion(), and unequip_script_.

Referenced by check_unequip_script().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::saveonexit ( ) const [virtual]

Reimplemented from UObject.

Reimplemented in WornItemsContainer.

Definition at line 747 of file item.cpp.

References UObject::saveonexit_.

Referenced by clone(), get_script_member_id(), StorageArea::print(), WornItemsContainer::print(), UContainer::printContents(), set_script_member_id(), and write_items().

+ Here is the caller graph for this function:

void Item::saveonexit ( bool  newvalue) [virtual]

Reimplemented from UObject.

Reimplemented in WornItemsContainer.

Definition at line 752 of file item.cpp.

References UObject::saveonexit_.

bool Item::script_isa ( unsigned  isatype) const [virtual]
BObjectImp * Item::script_method ( const char *  methodname,
Executor ex 
) [virtual]

id test

Reimplemented from UObject.

Reimplemented in UBoat, UHouse, Map, Spellbook, and UDoor.

Definition at line 1150 of file uoscrobj.cpp.

References getKnownObjMethod(), ObjMethod::id, and script_method_id().

Referenced by Map::script_method().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int Item::sellprice ( ) const

Definition at line 204 of file item.cpp.

References itemdesc(), sellprice_, and ItemDesc::vendor_sells_for.

Referenced by calculate_cost(), get_script_member_id(), oldBuyHandler(), and send_vendorwindow_contents().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Item::set_decay_after ( unsigned int  seconds)

Definition at line 866 of file item.cpp.

References decayat_gameclock_, read_gameclock(), and UObject::set_dirty().

Referenced by get_item(), move_to_ground(), and restart_decay_timer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * Item::set_script_member ( const char *  membername,
const std::string &  value 
) [virtual]

id test

Reimplemented from UObject.

Reimplemented in UWeapon, and UArmor.

Definition at line 961 of file uoscrobj.cpp.

References getKnownObjMember(), ObjMember::id, and set_script_member_id().

+ Here is the call graph for this function:

BObjectImp * Item::set_script_member ( const char *  membername,
int  value 
) [virtual]

Reimplemented from UObject.

Reimplemented in UWeapon, Map, UArmor, Equipment, and ULockable.

Definition at line 1042 of file uoscrobj.cpp.

References getKnownObjMember(), ObjMember::id, and set_script_member_id().

+ Here is the call graph for this function:

BObjectImp * Item::set_script_member_id ( const int  id,
const std::string &  value 
) [virtual]

Reimplemented from UObject.

Reimplemented in UWeapon, and UArmor.

Definition at line 940 of file uoscrobj.cpp.

References equip_script_, MBR_EQUIPSCRIPT, MBR_UNEQUIPSCRIPT, MBR_USESCRIPT, on_use_script_, UObject::set_script_member_id(), and unequip_script_.

Referenced by EUBoatRefObjImp::set_member_id(), EMultiRefObjImp::set_member_id(), set_script_member(), and Map::set_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Item::set_use_script ( const std::string &  scriptname)

Definition at line 741 of file item.cpp.

References on_use_script_, and UObject::set_dirty().

+ Here is the call graph for this function:

bool Item::setcolor ( u16  newcolor) [virtual]

Reimplemented from UObject.

Definition at line 778 of file item.cpp.

References UObject::color, ServSpecOpt::item_color_mask, UObject::set_dirty(), and ssopt.

+ Here is the call graph for this function:

void Item::setfacing ( u8  newfacing) [virtual]

Implements UObject.

Definition at line 803 of file item.cpp.

References UObject::facing.

Referenced by Item(), and set_script_member_id().

+ Here is the caller graph for this function:

bool Item::setgraphic ( u16  newobjtype) [virtual]

Reimplemented from UObject.

Definition at line 757 of file item.cpp.

References config, UObject::graphic, UObject::height, UObject::increv(), layer, LAYER_MOUNT, PolConfig::max_tile_id, UObject::set_dirty(), tile_layer, tileheight(), tilelayer(), and update_item_to_inrange().

+ Here is the call graph for this function:

bool Item::setlayer ( unsigned char  layer)

Definition at line 493 of file item.cpp.

References UObject::graphic, layer, and tilelayer().

+ Here is the call graph for this function:

bool Item::should_decay ( unsigned int  gameclock) const

Definition at line 876 of file item.cpp.

References decayat_gameclock_, inuse(), movable_, UObject::objtype_, and UOBJ_CORPSE.

Referenced by decay_worldzone(), and restart_decay_timer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Item * Item::slice_stacked_item ( u16  this_item_new_amount) [virtual]

Definition at line 717 of file item.cpp.

References amount_, clone(), and setamount().

Referenced by get_item(), and oldSellHandler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Item::slot_index ( u8  newvalue) [inline]
void Item::spill_contents ( UMulti supporting_multi) [virtual]

Reimplemented in UCorpse, and UContainer.

Definition at line 836 of file item.cpp.

Referenced by decay_worldzone().

+ Here is the caller graph for this function:

bool Item::stackable ( ) const

Definition at line 506 of file item.cpp.

References UObject::graphic, FLAG::STACKABLE, and tile_flags().

Referenced by add_item_to_stack(), drop_item_on_object(), get_script_member_id(), UOExecutorModule::mf_IsStackable(), and oldBuyHandler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Item::subamount ( u16  amount_subtract)

Definition at line 530 of file item.cpp.

References amount_, UObject::increv(), and setamount().

Referenced by remove_part_of_stack(), and subtract_amount_from_item().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const char * Item::target_tag ( ) const [virtual]

Reimplemented from UObject.

Definition at line 1158 of file item.cpp.

UObject * Item::toplevel_owner ( ) [virtual]

Reimplemented from UObject.

Definition at line 287 of file item.cpp.

References container.

Referenced by doubleclick(), drop_item_on_object(), get_item(), GetCharacterOwner(), UOExecutorModule::internal_MoveItem(), and place_item().

+ Here is the caller graph for this function:

const UObject * Item::toplevel_owner ( ) const [virtual]

Reimplemented from UObject.

Definition at line 296 of file item.cpp.

References container.

unsigned int Item::weight ( ) const [virtual]

Implements UObject.

Reimplemented in UContainer.

Definition at line 852 of file item.cpp.

References amount_, and weight_of().

Referenced by UContainer::add_bulk(), UContainer::can_add(), UContainer::remove_bulk(), setamount(), and Character::weight().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int Item::weight_of ( unsigned short  amount) const

Definition at line 840 of file item.cpp.

References find_itemdesc(), and UObject::objtype_.

Referenced by can_add_to_self(), and weight().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


Member Data Documentation

unsigned int Item::buyprice_ [protected]

Definition at line 180 of file item.h.

Referenced by buyprice(), clone(), printProperties(), readProperties(), and set_script_member_id().

bool Item::inuse_ [protected]

Definition at line 184 of file item.h.

Referenced by inuse().

bool Item::is_gotten_ [protected]

Definition at line 185 of file item.h.

Referenced by is_gotten().

unsigned int Item::sellprice_ [protected]

Definition at line 179 of file item.h.

Referenced by clone(), printProperties(), readProperties(), sellprice(), and set_script_member_id().

u8 Item::slot_index_ [protected]

Definition at line 188 of file item.h.

Referenced by slot_index().


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