|
Pol
Rev 533
|
#include <house.h>
Inheritance diagram for UHouse:
Collaboration diagram for UHouse:Public Member Functions | |
| void | AcceptHouseCommit (Character *chr, bool accept) |
| void | add_component (Item *item, s32 xoff, s32 yoff, u8 zoff) |
| void | ClearSquatters () |
| void | CustomHouseSetInitialState () |
| void | CustomHousesQuit (Character *chr, bool drop_changes) |
| void | destroy_components () |
| bool | IsCustom () const |
| bool | IsEditing () const |
| bool | IsWaitingForAccept () const |
| virtual void | register_object (UObject *obj) |
| void | SetCustom (bool custom) |
| virtual void | unregister_object (UObject *obj) |
| virtual void | walk_on (Character *chr) |
Static Public Member Functions | |
| static UHouse * | FindWorkingHouse (u32 chrserial) |
| static void | list_contents (const UHouse *house, ItemList &items_in, MobileList &chrs_in) |
| static BObjectImp * | scripted_create (const ItemDesc &descriptor, u16 x, u16 y, s8 z, Realm *realm, int flags) |
Public Attributes | |
| CustomHouseDesign | BackupDesign |
| vector< u8 > | CurrentCompressed |
| CustomHouseDesign | CurrentDesign |
| bool | editing |
| int | editing_floor_num |
| u32 | revision |
| bool | waiting_for_accept |
| vector< u8 > | WorkingCompressed |
| CustomHouseDesign | WorkingDesign |
Protected Types | |
| typedef ItemRef | Component |
| typedef std::vector< Component > | Components |
Protected Member Functions | |
| UHouse (const ItemDesc &itemdesc) | |
| virtual class UHouse * | as_house () |
| ObjArray * | component_list () const |
| void | create_components () |
| Components * | get_components () |
| virtual class BObjectImp * | get_script_member (const char *membername) const |
| virtual class BObjectImp * | get_script_member_id (const int id) const |
| id test | |
| ObjArray * | items_list () const |
| ObjArray * | mobiles_list () const |
| virtual void | printProperties (std::ostream &os) const |
| virtual bool | readobjects (StaticList &vec, short x, short y, short zbase) |
| virtual void | readProperties (ConfigElem &elem) |
| virtual bool | readshapes (MapShapeList &vec, short x, short y, short zbase) |
| virtual bool | script_isa (unsigned isatype) const |
| id test | |
| virtual BObjectImp * | script_method (const char *membername, Executor &ex) |
| id test | |
| virtual BObjectImp * | script_method_id (const int id, Executor &ex) |
Protected Attributes | |
| bool | custom |
Private Types | |
| typedef UMulti | base |
| typedef UObjectRef | Squatter |
| typedef std::vector< Squatter > | Squatters |
Private Attributes | |
| Components | components_ |
| Squatters | squatters_ |
Friends | |
| class | CustomHouseDesign |
| class | UMulti |
typedef UMulti UHouse::base [private] |
typedef ItemRef UHouse::Component [protected] |
typedef std::vector< Component > UHouse::Components [protected] |
typedef UObjectRef UHouse::Squatter [private] |
typedef std::vector< Squatter > UHouse::Squatters [private] |
| UHouse::UHouse | ( | const ItemDesc & | itemdesc | ) | [explicit, protected] |
Definition at line 128 of file house.cpp.
Referenced by scripted_create().
Here is the caller graph for this function:| void UHouse::AcceptHouseCommit | ( | Character * | chr, |
| bool | accept | ||
| ) |
Definition at line 988 of file house.cpp.
References CustomHouseDesign::AddComponents(), CustomHouseDesign::ClearComponents(), Character::client, CurrentCompressed, CurrentDesign, CustomHousesSendFull(), CustomHousesSendFullToInRange(), CustomHouseStopEditing(), HOUSE_DESIGN_CURRENT, HOUSE_DESIGN_WORKING, RANGE_VISUAL_LARGE_BUILDINGS, revision, waiting_for_accept, and WorkingDesign.
Referenced by CustomHousesCommit(), script_method_id(), and write_multis().
Here is the call graph for this function:
Here is the caller graph for this function:| void UHouse::add_component | ( | Item * | item, |
| s32 | xoff, | ||
| s32 | yoff, | ||
| u8 | zoff | ||
| ) |
Definition at line 160 of file house.cpp.
References add_item_to_world(), components_, decint(), Item::disable_decay(), Item::movable(), UObject::realm, UObject::serial, UObject::setprop(), update_item_to_inrange(), UObject::x, UObject::y, and UObject::z.
Referenced by CustomHouseDesign::FillComponents().
Here is the call graph for this function:
Here is the caller graph for this function:| UHouse * UHouse::as_house | ( | ) | [protected, virtual] |
Reimplemented from UMulti.
Definition at line 220 of file house.cpp.
Referenced by Realm::walkheight().
Here is the caller graph for this function:| void UHouse::ClearSquatters | ( | ) |
Definition at line 951 of file house.cpp.
References squatters_.
Referenced by destroy_house().
Here is the caller graph for this function:| ObjArray * UHouse::component_list | ( | ) | const [protected] |
Definition at line 174 of file house.cpp.
References ObjArray::addElement(), components_, and UObject::orphan().
Here is the call graph for this function:| void UHouse::create_components | ( | ) | [protected] |
Definition at line 137 of file house.cpp.
References add_item_to_world(), components_, UMulti::create(), decint(), Item::disable_decay(), MultiDef::elems, MULTI_ELEM::is_static, Item::movable(), UMulti::multidef(), MULTI_ELEM::objtype, UObject::realm, UObject::serial, UObject::setprop(), update_item_to_inrange(), MULTI_ELEM::x, UObject::x, MULTI_ELEM::y, UObject::y, MULTI_ELEM::z, and UObject::z.
Referenced by scripted_create().
Here is the call graph for this function:
Here is the caller graph for this function:| void UHouse::CustomHouseSetInitialState | ( | ) |
Definition at line 1029 of file customhouses.cpp.
References CustomHouseDesign::AddMultiAtOffset(), BackupDesign, CustomHouseDesign::Clear(), CurrentCompressed, CurrentDesign, CustomHouseDesign::InitDesign(), MultiDef::maxrx, MultiDef::maxry, MultiDef::minrx, MultiDef::minry, UMulti::multidef(), UMulti::multiid, WorkingCompressed, and WorkingDesign.
Referenced by SetCustom().
Here is the call graph for this function:
Here is the caller graph for this function:| void UHouse::CustomHousesQuit | ( | Character * | chr, |
| bool | drop_changes | ||
| ) |
Definition at line 1053 of file customhouses.cpp.
References ExportedFunction::call(), Character::client, SystemHooks::close_customhouse_hook, CurrentCompressed, CurrentDesign, CustomHousesSendFull(), CustomHouseStopEditing(), CustomHouseDesign::FillComponents(), HOUSE_DESIGN_CURRENT, make_mobileref(), revision, system_hooks, WorkingCompressed, and WorkingDesign.
Referenced by CustomHousesQuit(), and script_method_id().
Here is the call graph for this function:
Here is the caller graph for this function:| void UHouse::destroy_components | ( | ) |
Definition at line 552 of file house.cpp.
References components_, config, destroy_item(), Log(), PolConfig::loglevel, UObject::orphan(), and UObject::serial.
Referenced by destroy_house().
Here is the call graph for this function:
Here is the caller graph for this function:| UHouse * UHouse::FindWorkingHouse | ( | u32 | chrserial | ) | [static] |
Definition at line 637 of file house.cpp.
References UMulti::as_house(), Character::client, ClientGameData::custom_house_serial, find_character(), Client::gd, and system_find_multi().
Referenced by CustomHousesAdd(), CustomHousesAddMulti(), CustomHousesBackup(), CustomHousesClear(), CustomHousesCommit(), CustomHousesErase(), CustomHousesQuit(), CustomHousesRestore(), CustomHousesRevert(), CustomHousesRoofRemove(), CustomHousesRoofSelect(), CustomHousesSelectFloor(), and CustomHousesSynch().
Here is the call graph for this function:
Here is the caller graph for this function:| Components* UHouse::get_components | ( | ) | [inline, protected] |
Definition at line 90 of file house.h.
References components_.
Referenced by CustomHouseDesign::AddComponents(), and CustomHouseDesign::ClearComponents().
Here is the caller graph for this function:| BObjectImp * UHouse::get_script_member | ( | const char * | membername | ) | const [protected, virtual] |
Reimplemented from UMulti.
Definition at line 252 of file house.cpp.
References get_script_member_id(), getKnownObjMember(), and ObjMember::id.
Here is the call graph for this function:| BObjectImp * UHouse::get_script_member_id | ( | const int | id | ) | const [protected, virtual] |
id test
Reimplemented from UMulti.
Definition at line 225 of file house.cpp.
References MBR_COMPONENTS, MBR_CUSTOM, MBR_EDITING, MBR_HOUSEPARTS, MBR_ITEMS, MBR_MOBILES, and MBR_MULTIID.
Referenced by get_script_member().
Here is the caller graph for this function:| bool UHouse::IsCustom | ( | ) | const [inline] |
Definition at line 42 of file house.h.
References custom.
Referenced by UOExecutorModule::mf_SendHousingTool(), Realm::readmultis(), script_method_id(), send_multi_if_newly_inrange(), and write_multis().
Here is the caller graph for this function:| bool UHouse::IsEditing | ( | ) | const [inline] |
Definition at line 46 of file house.h.
References editing.
Referenced by destroy_house(), and script_method_id().
Here is the caller graph for this function:| bool UHouse::IsWaitingForAccept | ( | ) | const [inline] |
Definition at line 47 of file house.h.
References waiting_for_accept.
Referenced by UOExecutorModule::mf_SendHousingTool(), script_method_id(), and write_multis().
Here is the caller graph for this function:| ObjArray * UHouse::items_list | ( | ) | const [protected] |
Definition at line 188 of file house.cpp.
References ObjArray::addElement(), components_, const_find_in(), and list_contents().
Here is the call graph for this function:| void UHouse::list_contents | ( | const UHouse * | house, |
| ItemList & | items_in, | ||
| MobileList & | chrs_in | ||
| ) | [static] |
Definition at line 63 of file house.cpp.
References Zone::characters, UObject::graphic, Zone::items, MultiDef::maxrx, MultiDef::maxry, MultiDef::minrx, MultiDef::minry, MOVEMODE_LAND, UMulti::multidef(), UObject::realm, tile_flags(), FLAG::WALKBLOCK, Realm::walkheight(), UObject::x, UObject::y, UObject::z, Realm::zone, and zone_convert_clip().
Referenced by CustomHouseStopEditing(), destroy_house(), items_list(), UOExecutorModule::mf_SendHousingTool(), and mobiles_list().
Here is the call graph for this function:
Here is the caller graph for this function:| ObjArray * UHouse::mobiles_list | ( | ) | const [protected] |
Definition at line 206 of file house.cpp.
References ObjArray::addElement(), and list_contents().
Here is the call graph for this function:| void UHouse::printProperties | ( | std::ostream & | os | ) | const [protected, virtual] |
Reimplemented from Item.
Definition at line 528 of file house.cpp.
References BackupDesign, components_, CurrentDesign, custom, hexint(), UMulti::multiid, UObject::orphan(), pf_endl, CustomHouseDesign::printProperties(), Item::printProperties(), revision, UObject::serial, and WorkingDesign.
Here is the call graph for this function:| bool UHouse::readobjects | ( | StaticList & | vec, |
| short | x, | ||
| short | y, | ||
| short | zbase | ||
| ) | [protected, virtual] |
Definition at line 603 of file house.cpp.
References CurrentDesign, custom, CUSTOM_HOUSE_NUM_PLANES, editing, CustomHouseDesign::Elements, CustomHouseElements::GetElementsAt(), StaticRec::height, CustomHouseDesign::height, tile_flags(), tileheight(), CustomHouseDesign::width, WorkingDesign, CustomHouseDesign::xoff, CustomHouseDesign::yoff, and StaticRec::z.
Here is the call graph for this function:| void UHouse::readProperties | ( | ConfigElem & | elem | ) | [protected, virtual] |
Reimplemented from Item.
Definition at line 493 of file house.cpp.
References BackupDesign, components_, CurrentDesign, custom, find_toplevel_item(), CustomHouseDesign::InitDesign(), MultiDef::maxrx, MultiDef::maxry, MultiDef::minrx, MultiDef::minry, UMulti::multidef(), UMulti::multiid, CustomHouseDesign::readProperties(), Item::readProperties(), ConfigElem::remove_bool(), ConfigElem::remove_prop(), ConfigElem::remove_ushort(), revision, and WorkingDesign.
Here is the call graph for this function:| bool UHouse::readshapes | ( | MapShapeList & | vec, |
| short | x, | ||
| short | y, | ||
| short | zbase | ||
| ) | [protected, virtual] |
Definition at line 567 of file house.cpp.
References CurrentDesign, custom, CUSTOM_HOUSE_NUM_PLANES, editing, CustomHouseDesign::Elements, MapShape::flags, CustomHouseElements::GetElementsAt(), MapShape::height, CustomHouseDesign::height, tile_flags(), tileheight(), CustomHouseDesign::width, WorkingDesign, CustomHouseDesign::xoff, CustomHouseDesign::yoff, and MapShape::z.
Here is the call graph for this function:| void UHouse::register_object | ( | UObject * | obj | ) | [virtual] |
Reimplemented from UMulti.
Definition at line 929 of file house.cpp.
References UObject::ismobile(), UObject::set_dirty(), and squatters_.
Here is the call graph for this function:| bool UHouse::script_isa | ( | unsigned | isatype | ) | const [protected, virtual] |
id test
Reimplemented from UMulti.
Definition at line 3715 of file uoscrobj.cpp.
References POLCLASS_HOUSE, and UMulti::script_isa().
Here is the call graph for this function:| BObjectImp * UHouse::script_method | ( | const char * | methodname, |
| Executor & | ex | ||
| ) | [protected, virtual] |
id test
Reimplemented from Item.
Definition at line 428 of file house.cpp.
References getKnownObjMethod(), ObjMethod::id, and script_method_id().
Here is the call graph for this function:| BObjectImp * UHouse::script_method_id | ( | const int | id, |
| Executor & | ex | ||
| ) | [protected, virtual] |
Reimplemented from Item.
Definition at line 261 of file house.cpp.
References AcceptHouseCommit(), CustomHouseDesign::Add(), Character::client, components_, CurrentCompressed, CurrentDesign, ClientGameData::custom_house_serial, CustomHousesQuit(), CustomHousesSendFullToInRange(), eitemrefobjimp_type, CustomHouseDesign::EraseGraphicAt(), Client::gd, Executor::getApplicObjParam(), getCharacterParam(), Executor::getParam(), CUSTOM_HOUSE_ELEMENT::graphic, UObject::graphic, Executor::hasParams(), HOUSE_DESIGN_CURRENT, IsCustom(), IsEditing(), IsWaitingForAccept(), MTH_ACCEPT_COMMIT, MTH_ADD_COMPONENT, MTH_ADD_HOUSE_PART, MTH_CANCEL_EDITING, MTH_ERASE_COMPONENT, MTH_ERASE_HOUSE_PART, MTH_SETCUSTOM, RANGE_VISUAL_LARGE_BUILDINGS, revision, Item::script_method_id(), UObject::serial, SetCustom(), BApplicObj< T >::value(), WorkingCompressed, WorkingDesign, CUSTOM_HOUSE_ELEMENT::xoffset, CUSTOM_HOUSE_ELEMENT::yoffset, CUSTOM_HOUSE_ELEMENT::z, and UObject::z.
Referenced by script_method().
Here is the call graph for this function:
Here is the caller graph for this function:| BObjectImp * UHouse::scripted_create | ( | const ItemDesc & | descriptor, |
| u16 | x, | ||
| u16 | y, | ||
| s8 | z, | ||
| Realm * | realm, | ||
| int | flags | ||
| ) | [static] |
Reimplemented from UMulti.
Definition at line 787 of file house.cpp.
References add_multi_to_world(), create_components(), CRMULTI_IGNORE_FLATNESS, CRMULTI_IGNORE_MULTIS, CRMULTI_IGNORE_OBJECTS, ctBEu32, GetNewItemSerialNumber(), hexint(), ObjectHash::Insert(), UMulti::make_ref(), MultiDef::maxrx, MultiDef::maxry, MultiDef::maxrz, MultiDef::minrx, MultiDef::minry, MultiDef::minrz, MultiDefByMultiID(), ItemDesc::multiid, multis_exist_in(), objecthash, objects_exist_in(), ItemDesc::objtype, UObject::realm, send_multi_to_inrange(), UObject::serial, UObject::serial_ext, statics_cause_problems(), UHouse(), Realm::valid(), UObject::x, UObject::y, and UObject::z.
Here is the call graph for this function:| void UHouse::SetCustom | ( | bool | custom | ) |
Definition at line 1022 of file customhouses.cpp.
References custom, and CustomHouseSetInitialState().
Referenced by script_method_id().
Here is the call graph for this function:
Here is the caller graph for this function:| void UHouse::unregister_object | ( | UObject * | obj | ) | [virtual] |
Reimplemented from UMulti.
Definition at line 940 of file house.cpp.
References UObject::set_dirty(), and squatters_.
Referenced by NPC::destroy(), Character::destroy(), UOExecutorModule::mf_CreateNpcFromTemplate(), Character::move(), move_character_to(), and start_client_char().
Here is the call graph for this function:
Here is the caller graph for this function:| void UHouse::walk_on | ( | Character * | chr | ) | [virtual] |
Reimplemented from Item.
Definition at line 956 of file house.cpp.
References Executor::addModule(), PolConfig::cache_interactive_scripts, config, create_script_executor(), ScriptDef::empty(), find_itemdesc(), find_script2(), ref_ptr< T >::get(), EScriptProgram::haveProgram, Item::itemdesc(), Character::lastx, Character::lasty, Character::lastz, UObject::objtype_, UOExecutor::os_module, OSExecutorModule::priority, Executor::pushArg(), schedule_executor(), Executor::setProgram(), and ItemDesc::walk_on_script.
Referenced by UOExecutorModule::mf_CreateNpcFromTemplate(), Character::move(), move_character_to(), and start_client_char().
Here is the call graph for this function:
Here is the caller graph for this function:friend class CustomHouseDesign [friend] |
Definition at line 38 of file house.h.
Referenced by CustomHousesBackup(), CustomHouseSetInitialState(), CustomHousesRestore(), printProperties(), and readProperties().
Components UHouse::components_ [private] |
Definition at line 97 of file house.h.
Referenced by add_component(), component_list(), create_components(), destroy_components(), get_components(), items_list(), printProperties(), readProperties(), and script_method_id().
| vector<u8> UHouse::CurrentCompressed |
Definition at line 39 of file house.h.
Referenced by AcceptHouseCommit(), ClientGameData::clear(), CustomHouseSetInitialState(), CustomHousesQuit(), CustomHousesSendFull(), and script_method_id().
Definition at line 36 of file house.h.
Referenced by AcceptHouseCommit(), ClientGameData::clear(), CustomHouseSetInitialState(), CustomHousesQuit(), CustomHousesRevert(), CustomHousesSendFull(), UOExecutorModule::mf_SendHousingTool(), printProperties(), readobjects(), readProperties(), readshapes(), and script_method_id().
bool UHouse::custom [protected] |
Definition at line 91 of file house.h.
Referenced by IsCustom(), printProperties(), readobjects(), readProperties(), readshapes(), and SetCustom().
| bool UHouse::editing |
Definition at line 48 of file house.h.
Referenced by ClientGameData::clear(), CustomHouseStopEditing(), IsEditing(), UOExecutorModule::mf_SendHousingTool(), readobjects(), readshapes(), and Realm::walkheight().
Definition at line 50 of file house.h.
Referenced by CustomHousesAdd(), CustomHousesAddMulti(), CustomHousesRoofSelect(), CustomHousesSelectFloor(), Character::CustomHousingMove(), and UOExecutorModule::mf_SendHousingTool().
Definition at line 51 of file house.h.
Referenced by AcceptHouseCommit(), ClientGameData::clear(), CustomHousesAdd(), CustomHousesAddMulti(), CustomHousesClear(), CustomHousesErase(), CustomHousesQuit(), CustomHousesRoofRemove(), CustomHousesRoofSelect(), CustomHousesSendFull(), CustomHousesSendShort(), printProperties(), readProperties(), and script_method_id().
Squatters UHouse::squatters_ [private] |
Definition at line 95 of file house.h.
Referenced by ClearSquatters(), register_object(), and unregister_object().
Definition at line 49 of file house.h.
Referenced by AcceptHouseCommit(), CustomHousesCommit(), and IsWaitingForAccept().
| vector<u8> UHouse::WorkingCompressed |
Definition at line 40 of file house.h.
Referenced by ClientGameData::clear(), CustomHousesAdd(), CustomHousesAddMulti(), CustomHousesClear(), CustomHousesErase(), CustomHouseSetInitialState(), CustomHousesQuit(), CustomHousesRestore(), CustomHousesRevert(), CustomHousesRoofRemove(), CustomHousesRoofSelect(), CustomHousesSendFull(), and script_method_id().
Definition at line 37 of file house.h.
Referenced by AcceptHouseCommit(), ClientGameData::clear(), CustomHousesAdd(), CustomHousesAddMulti(), CustomHousesBackup(), CustomHousesClear(), CustomHousesCommit(), CustomHousesErase(), CustomHouseSetInitialState(), CustomHousesQuit(), CustomHousesRestore(), CustomHousesRevert(), CustomHousesRoofRemove(), CustomHousesRoofSelect(), CustomHousesSendFull(), UOExecutorModule::mf_SendHousingTool(), printProperties(), readobjects(), readProperties(), readshapes(), and script_method_id().