|
Pol
Rev 533
|
#include <boat.h>
Inheritance diagram for UBoat:
Collaboration diagram for UBoat:Classes | |
| class | BoatContext |
Public Types | |
| enum | RELATIVE_DIR { NO_TURN, RIGHT, AROUND, LEFT } |
Public Member Functions | |
| void | adjust_traveller_z (s8 delta_z) |
| virtual UBoat * | as_boat () |
| UFACING | boat_facing () const |
| void | cleanup_deck () |
| bool | deck_empty () const |
| void | destroy_components () |
| bool | has_offline_mobiles () const |
| bool | hold_empty () const |
| virtual BObjectImp * | make_ref () |
| bool | move (UFACING dir) |
| bool | move_xy (unsigned short x, unsigned short y, int flags, Realm *oldrealm) |
| virtual void | on_color_changed () |
| void | realm_changed () |
| virtual void | register_object (UObject *obj) |
| void | regself () |
| void | remove_orphans () |
| bool | turn (RELATIVE_DIR dir) |
| void | unregself () |
Static Public Member Functions | |
| static bool | navigable (const MultiDef &, unsigned short x, unsigned short y, short z, Realm *realm) |
| static BObjectImp * | scripted_create (const ItemDesc &descriptor, u16 x, u16 y, s8 z, Realm *realm, int flags) |
Public Attributes | |
| Item * | hold |
| Item * | portplank |
| Item * | starboardplank |
| Item * | tillerman |
Protected Member Functions | |
| UBoat (const ItemDesc &descriptor) | |
| const BoatShape & | boatshape () const |
| BObjectImp * | component_list (unsigned char type) const |
| void | do_tellmoves () |
| virtual class BObjectImp * | get_script_member (const char *membername) const |
| virtual class BObjectImp * | get_script_member_id (const int id) const |
| id test | |
| BObjectImp * | items_list () const |
| BObjectImp * | mobiles_list () const |
| void | move_components (Realm *oldrealm) |
| void | move_offline_mobiles (xcoord x, ycoord y, zcoord z, Realm *realm) |
| void | move_travellers (enum UFACING facing, const BoatContext &oldlocation, unsigned short x=USHRT_MAX, unsigned short y=USHRT_MAX, Realm *oldrealm=NULL) |
| const MultiDef & | multi_ifturn (RELATIVE_DIR dir) |
| unsigned short | multiid_ifturn (RELATIVE_DIR dir) |
| virtual void | printProperties (std::ostream &os) const |
| virtual void | readProperties (ConfigElem &elem) |
| void | reread_components () |
| void | rescan_components () |
| virtual bool | script_isa (unsigned isatype) const |
| virtual class BObjectImp * | script_method (const char *methodname, Executor &ex) |
| id test | |
| virtual class BObjectImp * | script_method_id (const int id, Executor &ex) |
| void | transform_components (const BoatShape &old_boatshape, Realm *oldrealm) |
| void | turn_traveller_coords (Character *chr, RELATIVE_DIR dir) |
| void | turn_travellers (RELATIVE_DIR dir, const BoatContext &oldlocation) |
Static Protected Member Functions | |
| static bool | on_ship (const BoatContext &bc, const UObject *obj) |
Private Types | |
| typedef UMulti | base |
| typedef UObjectRef | Traveller |
| typedef std::vector< Traveller > | Travellers |
Private Member Functions | |
| void | create_components () |
Private Attributes | |
| vector< Item * > | Components |
| Travellers | travellers_ |
Friends | |
| class | EUBoatRefObjImp |
| class | UMulti |
typedef UMulti UBoat::base [private] |
typedef UObjectRef UBoat::Traveller [private] |
typedef std::vector< Traveller > UBoat::Travellers [private] |
| enum UBoat::RELATIVE_DIR |
| UBoat::UBoat | ( | const ItemDesc & | descriptor | ) | [explicit, protected] |
Definition at line 358 of file boat.cpp.
References boatshapes, hold, UMulti::multiid, passert, portplank, starboardplank, and tillerman.
Referenced by scripted_create().
Here is the caller graph for this function:| void UBoat::adjust_traveller_z | ( | s8 | delta_z | ) |
Definition at line 784 of file boat.cpp.
References Components, travellers_, and UObject::z.
| UBoat * UBoat::as_boat | ( | ) | [virtual] |
Reimplemented from UMulti.
Definition at line 367 of file boat.cpp.
Referenced by getUBoatParam().
Here is the caller graph for this function:| UFACING UBoat::boat_facing | ( | ) | const |
Definition at line 969 of file boat.cpp.
References UMulti::multiid.
Referenced by UBoatExecutorModule::mf_MoveBoatRelative().
Here is the caller graph for this function:| const BoatShape & UBoat::boatshape | ( | ) | const [protected] |
Definition at line 974 of file boat.cpp.
References boatshapes, UMulti::multiid, and passert.
Referenced by create_components(), move_components(), readProperties(), transform_components(), and turn().
Here is the caller graph for this function:| void UBoat::cleanup_deck | ( | ) |
Definition at line 713 of file boat.cpp.
References on_ship(), UObject::orphan(), remove_orphans(), UObject::set_dirty(), and travellers_.
Referenced by destroy_boat().
Here is the call graph for this function:
Here is the caller graph for this function:| BObjectImp * UBoat::component_list | ( | unsigned char | type | ) | const [protected] |
Definition at line 1312 of file boat.cpp.
References ObjArray::addElement(), COMPONENT_ALL, Components, get_component_objtype(), make_itemref(), UObject::objtype_, and UObject::orphan().
Referenced by get_script_member_id().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::create_components | ( | ) | [private] |
Definition at line 1245 of file boat.cpp.
References add_item_to_world(), boatshape(), Components, BoatShape::Componentshapes, UMulti::create(), Item::disable_decay(), extobj, UObject::graphic, UObject::height, ExternalObject::hold, hold, Item::movable(), UObject::objtype_, ExternalObject::port_plank, portplank, UObject::realm, ExternalObject::starboard_plank, starboardplank, tileheight(), ExternalObject::tillerman, tillerman, update_item_to_inrange(), UObject::x, UObject::y, and UObject::z.
Referenced by scripted_create().
Here is the call graph for this function:
Here is the caller graph for this function:| bool UBoat::deck_empty | ( | ) | const |
Definition at line 840 of file boat.cpp.
References travellers_.
Referenced by destroy_boat().
Here is the caller graph for this function:| void UBoat::destroy_components | ( | ) |
Definition at line 1334 of file boat.cpp.
References Components, destroy_item(), and UObject::orphan().
Referenced by destroy_boat().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::do_tellmoves | ( | ) | [protected] |
Definition at line 856 of file boat.cpp.
References UObject::CLASS_NPC, Character::has_active_client(), UObject::isa(), UObject::ismobile(), Character::tellmove(), and travellers_.
Referenced by move_travellers(), and turn_travellers().
Here is the call graph for this function:
Here is the caller graph for this function:| BObjectImp * UBoat::get_script_member | ( | const char * | membername | ) | const [protected, virtual] |
Reimplemented from UMulti.
Definition at line 2758 of file uoscrobj.cpp.
References get_script_member_id(), getKnownObjMember(), and ObjMember::id.
Here is the call graph for this function:| BObjectImp * UBoat::get_script_member_id | ( | const int | id | ) | const [protected, virtual] |
id test
Reimplemented from UMulti.
Definition at line 2697 of file uoscrobj.cpp.
References COMPONENT_ALL, COMPONENT_HULL, component_list(), COMPONENT_ROPE, COMPONENT_RUDDER, COMPONENT_SAILS, COMPONENT_STORAGE, COMPONENT_TILLER, COMPONENT_WEAPONSLOT, COMPONENT_WHEEL, UMulti::get_script_member_id(), has_offline_mobiles(), hold, items_list(), MBR_COMPONENTS, MBR_HAS_OFFLINE_MOBILES, MBR_HOLD, MBR_HULL, MBR_ITEMS, MBR_MOBILES, MBR_MULTIID, MBR_PORTPLANK, MBR_ROPE, MBR_RUDDER, MBR_SAILS, MBR_STARBOARDPLANK, MBR_STORAGE, MBR_TILLER, MBR_TILLERMAN, MBR_WEAPONSLOT, MBR_WHEEL, mobiles_list(), UMulti::multiid, portplank, starboardplank, and tillerman.
Referenced by EUBoatRefObjImp::get_member_id(), and get_script_member().
Here is the call graph for this function:
Here is the caller graph for this function:| bool UBoat::has_offline_mobiles | ( | ) | const |
Definition at line 732 of file boat.cpp.
References UObject::ismobile(), Character::logged_in, on_ship(), UObject::orphan(), and travellers_.
Referenced by destroy_boat(), and get_script_member_id().
Here is the call graph for this function:
Here is the caller graph for this function:| bool UBoat::hold_empty | ( | ) | const |
Definition at line 845 of file boat.cpp.
References UContainer::count(), and hold.
Referenced by destroy_boat().
Here is the call graph for this function:
Here is the caller graph for this function:| BObjectImp * UBoat::items_list | ( | ) | const [protected] |
Definition at line 1278 of file boat.cpp.
References ObjArray::addElement(), IsItem(), make_itemref(), on_ship(), UObject::orphan(), UObject::serial, and travellers_.
Referenced by get_script_member_id().
Here is the call graph for this function:
Here is the caller graph for this function:| BObjectImp * UBoat::make_ref | ( | ) | [virtual] |
Reimplemented from UMulti.
Definition at line 2687 of file uoscrobj.cpp.
References EUBoatRefObjImp.
Referenced by UBoatExecutorModule::mf_BoatFromItem(), and UBoatExecutorModule::mf_SystemFindBoatBySerial().
Here is the caller graph for this function:| BObjectImp * UBoat::mobiles_list | ( | ) | const [protected] |
Definition at line 1295 of file boat.cpp.
References ObjArray::addElement(), UObject::ismobile(), Character::logged_in, make_mobileref(), on_ship(), UObject::orphan(), and travellers_.
Referenced by get_script_member_id().
Here is the call graph for this function:
Here is the caller graph for this function:| bool UBoat::move | ( | UFACING | dir | ) |
Definition at line 916 of file boat.cpp.
References UObject::facing, move_components(), move_delta, move_multi_in_world(), move_travellers(), UMulti::multidef(), navigable(), UObject::realm, regself(), send_boat_to_inrange(), UObject::set_dirty(), unpause_paused(), unregself(), UObject::x, MoveDelta::xmove, UObject::y, MoveDelta::ymove, and UObject::z.
Referenced by UBoatExecutorModule::mf_MoveBoat(), and UBoatExecutorModule::mf_MoveBoatRelative().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::move_components | ( | Realm * | oldrealm | ) | [protected] |
Definition at line 1013 of file boat.cpp.
References boatshape(), Components, BoatShape::Componentshapes, move_boat_item(), UObject::orphan(), UObject::set_dirty(), UObject::x, UObject::y, and UObject::z.
Referenced by move(), and move_xy().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::move_offline_mobiles | ( | xcoord | x, |
| ycoord | y, | ||
| zcoord | z, | ||
| Realm * | realm | ||
| ) | [protected] |
Definition at line 755 of file boat.cpp.
References UObject::ismobile(), Character::logged_in, on_ship(), UObject::orphan(), UObject::realm, Character::realm_changed(), remove_orphans(), UObject::set_dirty(), travellers_, UObject::x, UObject::y, and UObject::z.
Referenced by script_method_id().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::move_travellers | ( | enum UFACING | facing, |
| const BoatContext & | oldlocation, | ||
| unsigned short | x = USHRT_MAX, |
||
| unsigned short | y = USHRT_MAX, |
||
| Realm * | oldrealm = NULL |
||
| ) | [protected] |
Definition at line 467 of file boat.cpp.
References Character::client, do_tellmoves(), UObject::facing, UObject::ismobile(), Character::lastx, Character::lasty, Character::logged_in, move_delta, move_item(), Character::move_reason, MoveCharacterWorldPosition(), Character::MULTIMOVE, on_ship(), UObject::orphan(), Client::pause(), Character::position_changed(), UObject::realm, remove_orphans(), Client::restart(), send_goxyz(), send_new_subserver(), send_objects_newly_inrange(), send_owncreate(), UObject::set_dirty(), travellers_, UBoat::BoatContext::x, UObject::x, MoveDelta::xmove, UBoat::BoatContext::y, UObject::y, MoveDelta::ymove, and UObject::z.
Referenced by move(), and move_xy().
Here is the call graph for this function:
Here is the caller graph for this function:| bool UBoat::move_xy | ( | unsigned short | x, |
| unsigned short | y, | ||
| int | flags, | ||
| Realm * | oldrealm | ||
| ) |
Definition at line 880 of file boat.cpp.
References FACING_N, move_components(), move_multi_in_world(), move_travellers(), MOVEITEM_FORCELOCATION, UMulti::multidef(), navigable(), UObject::realm, regself(), send_boat_to_inrange(), UObject::set_dirty(), unpause_paused(), unregself(), UObject::x, UObject::y, and UObject::z.
Referenced by UBoatExecutorModule::mf_MoveBoatXY().
Here is the call graph for this function:
Here is the caller graph for this function:| const MultiDef & UBoat::multi_ifturn | ( | RELATIVE_DIR | dir | ) | [protected] |
Definition at line 962 of file boat.cpp.
References MultiDefByMultiID(), MultiDefByMultiIDExists(), UMulti::multiid, multiid_ifturn(), and passert.
Referenced by turn().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned short UBoat::multiid_ifturn | ( | RELATIVE_DIR | dir | ) | [inline, protected] |
Definition at line 957 of file boat.cpp.
References UMulti::multiid.
Referenced by multi_ifturn(), and turn().
Here is the caller graph for this function:| bool UBoat::navigable | ( | const MultiDef & | md, |
| unsigned short | x, | ||
| unsigned short | y, | ||
| short | z, | ||
| Realm * | realm | ||
| ) | [static] |
Definition at line 406 of file boat.cpp.
References Realm::encode_global_hull(), Realm::global_hulls, Tile::height, Realm::height(), MultiDef::hull, MultiDef::maxrx, MultiDef::maxry, MultiDef::minrx, MultiDef::minry, Realm::name(), Realm::navigable(), tile, Realm::width(), WORLD_MIN_X, and WORLD_MIN_Y.
Referenced by UOExecutorModule::internal_MoveBoat(), move(), move_xy(), scripted_create(), and turn().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::on_color_changed | ( | ) | [virtual] |
Reimplemented from Item.
Definition at line 800 of file boat.cpp.
References send_boat_to_inrange().
Here is the call graph for this function:| bool UBoat::on_ship | ( | const BoatContext & | bc, |
| const UObject * | obj | ||
| ) | [static, protected] |
Definition at line 453 of file boat.cpp.
References MultiDef::body_contains(), Item::container, IsItem(), UBoat::BoatContext::mdef, UObject::serial, UBoat::BoatContext::x, UObject::x, UBoat::BoatContext::y, and UObject::y.
Referenced by cleanup_deck(), has_offline_mobiles(), items_list(), mobiles_list(), move_offline_mobiles(), move_travellers(), printProperties(), readProperties(), realm_changed(), and turn_travellers().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::printProperties | ( | std::ostream & | os | ) | const [protected, virtual] |
Reimplemented from Item.
Definition at line 1169 of file boat.cpp.
References Components, UMulti::multiid, on_ship(), UObject::orphan(), pf_endl, Item::printProperties(), UObject::serial, and travellers_.
Here is the call graph for this function:| void UBoat::readProperties | ( | ConfigElem & | elem | ) | [protected, virtual] |
Reimplemented from Item.
Definition at line 1112 of file boat.cpp.
References boatshape(), Components, find_toplevel_item(), IsItem(), make_boatref(), UMulti::multidef(), UMulti::multiid, UObject::objtype_, BoatShape::objtype_is_component(), on_ship(), Item::readProperties(), regself(), ConfigElem::remove_prop(), ConfigElem::remove_ushort(), reread_components(), rescan_components(), start_script(), system_find_item(), system_find_mobile(), and travellers_.
Here is the call graph for this function:| void UBoat::realm_changed | ( | ) |
Definition at line 805 of file boat.cpp.
References UObject::CLASS_CONTAINER, Components, UContainer::for_each_item(), UObject::isa(), IsItem(), UObject::ismobile(), on_ship(), UObject::orphan(), UObject::realm, Character::realm_changed(), send_remove_character_to_nearby(), UObject::serial, setrealm(), and travellers_.
Here is the call graph for this function:| void UBoat::register_object | ( | UObject * | obj | ) | [virtual] |
Reimplemented from UMulti.
Definition at line 1067 of file boat.cpp.
References UObject::set_dirty(), and travellers_.
Referenced by UBoatExecutorModule::mf_RegisterItemWithBoat().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::regself | ( | ) |
Definition at line 375 of file boat.cpp.
References Realm::encode_global_hull(), Realm::global_hulls, MultiDef::hull, UMulti::multidef(), UObject::realm, UObject::x, and UObject::y.
Referenced by move(), move_xy(), readProperties(), scripted_create(), and turn().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::remove_orphans | ( | ) |
Definition at line 691 of file boat.cpp.
References UObject::set_dirty(), and travellers_.
Referenced by cleanup_deck(), move_offline_mobiles(), move_travellers(), and turn_travellers().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::reread_components | ( | ) | [protected] |
Definition at line 1093 of file boat.cpp.
References Components, extobj, ExternalObject::hold, hold, UObject::objtype_, ExternalObject::port_plank, portplank, ExternalObject::starboard_plank, starboardplank, ExternalObject::tillerman, and tillerman.
Referenced by readProperties().
Here is the caller graph for this function:| void UBoat::rescan_components | ( | ) | [protected] |
Definition at line 1076 of file boat.cpp.
References UObject::orphan(), portplank, UPlank::setboat(), and starboardplank.
Referenced by readProperties(), and scripted_create().
Here is the call graph for this function:
Here is the caller graph for this function:| bool UBoat::script_isa | ( | unsigned | isatype | ) | const [protected, virtual] |
Reimplemented from UMulti.
Definition at line 3710 of file uoscrobj.cpp.
References POLCLASS_BOAT, and UMulti::script_isa().
Here is the call graph for this function:| BObjectImp * UBoat::script_method | ( | const char * | methodname, |
| Executor & | ex | ||
| ) | [protected, virtual] |
id test
Reimplemented from Item.
Definition at line 2831 of file uoscrobj.cpp.
References getKnownObjMethod(), ObjMethod::id, and script_method_id().
Here is the call graph for this function:| BObjectImp * UBoat::script_method_id | ( | const int | id, |
| Executor & | ex | ||
| ) | [protected, virtual] |
Reimplemented from Item.
Definition at line 2767 of file uoscrobj.cpp.
References find_realm(), Executor::getParam(), Executor::getStringParam(), move_offline_mobiles(), MTH_MOVE_OFFLINE_MOBILES, Executor::numParams(), UObject::realm, Item::script_method_id(), UObject::set_dirty(), Realm::valid(), String::value(), UObject::x, UObject::y, UObject::z, ZCOORD_MAX, and ZCOORD_MIN.
Referenced by EUBoatRefObjImp::call_method_id(), and script_method().
Here is the call graph for this function:
Here is the caller graph for this function:| BObjectImp * UBoat::scripted_create | ( | const ItemDesc & | descriptor, |
| u16 | x, | ||
| u16 | y, | ||
| s8 | z, | ||
| Realm * | realm, | ||
| int | flags | ||
| ) | [static] |
Reimplemented from UMulti.
Definition at line 1195 of file boat.cpp.
References add_multi_to_world(), boatshapes, create_components(), CRMULTI_FACING_MASK, CRMULTI_FACING_SHIFT, ctBEu32, UObject::facing, GetNewItemSerialNumber(), hexint(), ObjectHash::Insert(), make_boatref(), MultiDefByMultiID(), UMulti::multiid, ItemDesc::multiid, navigable(), objecthash, ItemDesc::objtype, UObject::realm, regself(), rescan_components(), send_boat_to_inrange(), UObject::serial, UObject::serial_ext, start_script(), UBoat(), unpause_paused(), UObject::x, UObject::y, and UObject::z.
Here is the call graph for this function:| void UBoat::transform_components | ( | const BoatShape & | old_boatshape, |
| Realm * | oldrealm | ||
| ) | [protected] |
Definition at line 981 of file boat.cpp.
References boatshape(), Components, BoatShape::Componentshapes, extobj, UObject::graphic, move_boat_item(), UObject::objtype_, UObject::orphan(), ExternalObject::port_plank, UObject::set_dirty(), ExternalObject::starboard_plank, UObject::x, UObject::y, and UObject::z.
Referenced by turn().
Here is the call graph for this function:
Here is the caller graph for this function:| bool UBoat::turn | ( | RELATIVE_DIR | dir | ) |
Definition at line 1037 of file boat.cpp.
References boatshape(), UObject::facing, multi_ifturn(), UMulti::multiid, multiid_ifturn(), navigable(), UObject::realm, regself(), send_boat_to_inrange(), UObject::set_dirty(), transform_components(), turn_travellers(), unpause_paused(), unregself(), UObject::x, UObject::y, and UObject::z.
Referenced by UBoatExecutorModule::mf_TurnBoat().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::turn_traveller_coords | ( | Character * | chr, |
| RELATIVE_DIR | dir | ||
| ) | [protected] |
Definition at line 575 of file boat.cpp.
References AROUND, UObject::facing, Character::lastx, Character::lasty, LEFT, NO_TURN, RIGHT, UObject::x, and UObject::y.
Referenced by turn_travellers().
Here is the caller graph for this function:| void UBoat::turn_travellers | ( | RELATIVE_DIR | dir, |
| const BoatContext & | oldlocation | ||
| ) | [protected] |
Definition at line 605 of file boat.cpp.
References AROUND, Character::client, do_tellmoves(), UObject::ismobile(), Character::lastx, Character::lasty, LEFT, Character::logged_in, move_item(), Character::move_reason, MoveCharacterWorldPosition(), Character::MULTIMOVE, NO_TURN, on_ship(), UObject::orphan(), Character::position_changed(), remove_orphans(), RIGHT, send_goxyz(), send_objects_newly_inrange(), UObject::set_dirty(), travellers_, turn_traveller_coords(), UObject::x, UObject::y, and UObject::z.
Referenced by turn().
Here is the call graph for this function:
Here is the caller graph for this function:| void UBoat::unregself | ( | ) |
Definition at line 390 of file boat.cpp.
References Realm::encode_global_hull(), Realm::global_hulls, MultiDef::hull, UMulti::multidef(), UObject::realm, UObject::x, and UObject::y.
Referenced by destroy_boat(), move(), move_xy(), and turn().
Here is the call graph for this function:
Here is the caller graph for this function:friend class EUBoatRefObjImp [friend] |
Definition at line 110 of file boat.h.
Referenced by make_ref().
vector<Item*> UBoat::Components [private] |
Definition at line 117 of file boat.h.
Referenced by adjust_traveller_z(), component_list(), create_components(), destroy_components(), move_components(), printProperties(), readProperties(), realm_changed(), reread_components(), and transform_components().
Definition at line 77 of file boat.h.
Referenced by create_components(), get_script_member_id(), hold_empty(), reread_components(), and UBoat().
Definition at line 75 of file boat.h.
Referenced by create_components(), get_script_member_id(), reread_components(), rescan_components(), and UBoat().
Definition at line 76 of file boat.h.
Referenced by create_components(), get_script_member_id(), reread_components(), rescan_components(), and UBoat().
Definition at line 74 of file boat.h.
Referenced by create_components(), get_script_member_id(), reread_components(), and UBoat().
Travellers UBoat::travellers_ [private] |
Definition at line 115 of file boat.h.
Referenced by adjust_traveller_z(), cleanup_deck(), deck_empty(), do_tellmoves(), has_offline_mobiles(), items_list(), mobiles_list(), move_offline_mobiles(), move_travellers(), printProperties(), readProperties(), realm_changed(), register_object(), remove_orphans(), and turn_travellers().