Pol  Rev 533
UHouse Class Reference

#include <house.h>

+ Inheritance diagram for UHouse:
+ Collaboration diagram for UHouse:

List of all members.

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 UHouseFindWorkingHouse (u32 chrserial)
static void list_contents (const UHouse *house, ItemList &items_in, MobileList &chrs_in)
static BObjectImpscripted_create (const ItemDesc &descriptor, u16 x, u16 y, s8 z, Realm *realm, int flags)

Public Attributes

CustomHouseDesign BackupDesign
vector< u8CurrentCompressed
CustomHouseDesign CurrentDesign
bool editing
int editing_floor_num
u32 revision
bool waiting_for_accept
vector< u8WorkingCompressed
CustomHouseDesign WorkingDesign

Protected Types

typedef ItemRef Component
typedef std::vector< ComponentComponents

Protected Member Functions

 UHouse (const ItemDesc &itemdesc)
virtual class UHouseas_house ()
ObjArraycomponent_list () const
void create_components ()
Componentsget_components ()
virtual class BObjectImpget_script_member (const char *membername) const
virtual class BObjectImpget_script_member_id (const int id) const
 id test
ObjArrayitems_list () const
ObjArraymobiles_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 BObjectImpscript_method (const char *membername, Executor &ex)
 id test
virtual BObjectImpscript_method_id (const int id, Executor &ex)

Protected Attributes

bool custom

Private Types

typedef UMulti base
typedef UObjectRef Squatter
typedef std::vector< SquatterSquatters

Private Attributes

Components components_
Squatters squatters_

Friends

class CustomHouseDesign
class UMulti

Detailed Description

Definition at line 28 of file house.h.


Member Typedef Documentation

typedef UMulti UHouse::base [private]

Reimplemented from UMulti.

Definition at line 30 of file house.h.

typedef ItemRef UHouse::Component [protected]

Definition at line 88 of file house.h.

typedef std::vector< Component > UHouse::Components [protected]

Definition at line 89 of file house.h.

typedef UObjectRef UHouse::Squatter [private]

Definition at line 93 of file house.h.

typedef std::vector< Squatter > UHouse::Squatters [private]

Definition at line 94 of file house.h.


Constructor & Destructor Documentation

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:


Member Function Documentation

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:

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:

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:

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:

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:

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:

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:


Friends And Related Function Documentation

friend class CustomHouseDesign [friend]

Definition at line 86 of file house.h.

friend class UMulti [friend]

Definition at line 85 of file house.h.


Member Data Documentation

bool UHouse::custom [protected]

Definition at line 91 of file house.h.

Referenced by IsCustom(), printProperties(), readobjects(), readProperties(), readshapes(), and SetCustom().

Definition at line 95 of file house.h.

Referenced by ClearSquatters(), register_object(), and unregister_object().


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