|
Pol
Revision:cb584c9
|
#include <umap.h>
Inheritance diagram for Pol::Core::Map:Public Types | |
| typedef PinPoints::iterator | pin_points_itr |
| typedef std::vector< PinPoint > | PinPoints |
Public Member Functions | |
| virtual | ~Map () |
| virtual Items::Item * | clone () const POL_OVERRIDE |
| virtual size_t | estimatedSize () const POL_OVERRIDE |
| u16 | get_xeast () |
| u16 | get_xwest () |
| u16 | get_ynorth () |
| u16 | get_ysouth () |
| u16 | gumpXtoWorldX (u16 gumpx) |
| u16 | gumpYtoWorldY (u16 gumpy) |
| bool | msgCoordsInBounds (PKTBI_56 *msg) |
| u16 | worldXtoGumpX (u16 worldx) |
| u16 | worldYtoGumpY (u16 worldy) |
Public Member Functions inherited from Pol::Items::Item | |
| virtual | ~Item () |
| void | add_to_self (Item *&item) |
| bool | amount_to_remove_is_partial (u16 amount_to_remove) const |
| u32 | buyprice () const |
| void | buyprice (u32) |
| Bscript::BObject | call_custom_method (const char *methodname, Bscript::BObjectImpRefVec &pmore) |
| Bscript::BObject | call_custom_method (const char *methodname) |
| bool | can_add_to_self (unsigned short amount, bool force_stacking) const |
| bool | can_add_to_self (const Item &item, bool force_stacking) const |
| bool | can_decay () const |
| bool | check_equip_script (Mobile::Character *chr, bool startup) |
| bool | check_equiptest_scripts (Mobile::Character *chr, bool startup=false) |
| bool | check_test_scripts (Mobile::Character *chr, const std::string &script_ecl, bool startup) |
| bool | check_unequip_script () |
| bool | check_unequiptest_scripts (Mobile::Character *chr) |
| bool | check_unequiptest_scripts () |
| virtual const char * | classname () const POL_OVERRIDE |
| virtual Bscript::BObjectImp * | custom_script_method (const char *methodname, Bscript::Executor &ex) POL_OVERRIDE |
| bool | default_insured () const |
| bool | default_invisible () const |
| bool | default_movable () const |
| bool | default_newbie () const |
| bool | default_no_drop () const |
| virtual std::string | description () const POL_OVERRIDE |
| void | disable_decay () |
| virtual void | double_click (Network::Client *client) |
| DYN_PROPERTY (maxhp_mod, s16, Core::PROP_MAXHP_MOD, 0) | |
| DYN_PROPERTY (name_suffix, std::string, Core::PROP_NAME_SUFFIX,"") | |
| DYN_PROPERTY_POINTER (gotten_by, Mobile::Character *, Core::PROP_GOTTEN_BY) | |
| DYN_PROPERTY_POINTER (process, Module::UOExecutorModule *, Core::PROP_PROCESS) | |
| DYN_PROPERTY_POINTER (house, Multi::UHouse *, Core::PROP_HOUSE) | |
| void | extricate () |
| virtual u16 | get_senditem_amount () const |
| std::string | get_use_script_name () const |
| u16 | getamount () const |
| bool | getbuyprice (u32 &buyprice) const |
| Mobile::Character * | GetCharacterOwner () |
| virtual double | getQuality () const |
| bool | has_equip_script () const |
| bool | has_only_default_cprops (const ItemDesc *compare=nullptr) const |
| bool | insured () const |
| void | insured (bool newvalue) |
| bool | inuse () const |
| void | inuse (bool newvalue) |
| bool | invisible () const |
| void | invisible (bool newvalue) |
| virtual unsigned int | item_count () const |
| const ItemDesc & | itemdesc () const |
| virtual Bscript::BObjectImp * | make_ref () POL_OVERRIDE |
| unsigned short | maxhp () const |
| std::string | merchant_description () const |
| bool | movable () const |
| void | movable (bool newvalue) |
| virtual std::string | name () const POL_OVERRIDE |
| bool | newbie () const |
| void | newbie (bool newvalue) |
| bool | no_drop () const |
| void | no_drop (bool newvalue) |
| virtual void | on_color_changed () POL_OVERRIDE |
| virtual void | on_facing_changed () POL_OVERRIDE |
| void | on_invisible_changed () |
| void | on_movable_changed () |
| virtual UObject * | owner () POL_OVERRIDE |
| virtual const UObject * | owner () const POL_OVERRIDE |
| Item * | remove_part_of_stack (u16 amount_to_remove) |
| void | reset_slot () |
| void | restart_decay_timer () |
| Bscript::BObjectImp * | run_equip_script (Mobile::Character *chr, bool startup) |
| Bscript::BObjectImp * | run_unequip_script (Mobile::Character *who) |
| u32 | sellprice () const |
| void | sellprice (u32) |
| void | set_decay_after (unsigned int seconds) |
| virtual Bscript::BObjectImp * | set_script_member (const char *membername, const std::string &value) POL_OVERRIDE |
| id test More... | |
| virtual Bscript::BObjectImp * | set_script_member_double (const char *membername, double value) POL_OVERRIDE |
| id test More... | |
| virtual Bscript::BObjectImp * | set_script_member_id (const int id, const std::string &value) POL_OVERRIDE |
| virtual Bscript::BObjectImp * | set_script_member_id_double (const int id, double value) POL_OVERRIDE |
| void | set_use_script (const std::string &scriptname) |
| void | setamount (u16 amount) |
| virtual bool | setcolor (u16 newcolor) POL_OVERRIDE |
| virtual void | setfacing (u8 newfacing) POL_OVERRIDE |
| virtual bool | setgraphic (u16 newobjtype) POL_OVERRIDE |
| bool | setlayer (unsigned char layer) |
| virtual void | setQuality (double value) |
| bool | should_decay (unsigned int gameclock) const |
| Item * | slice_stacked_item (u16 this_item_new_amount) |
| u8 | slot_index () const |
| bool | slot_index (u8 newvalue) |
| virtual void | spill_contents (Multi::UMulti *supporting_multi) |
| bool | stackable () const |
| void | subamount (u16 amount_subtract) |
| virtual const char * | target_tag () const POL_OVERRIDE |
| virtual UObject * | toplevel_owner () POL_OVERRIDE |
| virtual const UObject * | toplevel_owner () const POL_OVERRIDE |
| bool | use_insurance () |
| Returns current insurance value and resets it to false. More... | |
| virtual void | walk_on (Mobile::Character *chr) |
| virtual unsigned int | weight () const POL_OVERRIDE |
| unsigned int | weight_of (unsigned short amount) const |
Public Member Functions inherited from Pol::Core::UObject | |
| ref_counted * | as_ref_counted () |
| void | clear_dirty () const |
| void | copyprops (const UObject &obj) |
| void | copyprops (const PropertyList &proplist) |
| virtual void | destroy () |
| bool | dirty () const |
| DYN_PROPERTY (maxhp_mod, s16, PROP_MAXHP_MOD, 0) | |
| DYN_PROPERTY (fire_resist, ValueModPack, PROP_RESIST_FIRE, ValueModPack::DEFAULT) | |
| DYN_PROPERTY (cold_resist, ValueModPack, PROP_RESIST_COLD, ValueModPack::DEFAULT) | |
| DYN_PROPERTY (energy_resist, ValueModPack, PROP_RESIST_ENERGY, ValueModPack::DEFAULT) | |
| DYN_PROPERTY (poison_resist, ValueModPack, PROP_RESIST_POISON, ValueModPack::DEFAULT) | |
| DYN_PROPERTY (physical_resist, ValueModPack, PROP_RESIST_PHYSICAL, ValueModPack::DEFAULT) | |
| DYN_PROPERTY (fire_damage, ValueModPack, PROP_DAMAGE_FIRE, ValueModPack::DEFAULT) | |
| DYN_PROPERTY (cold_damage, ValueModPack, PROP_DAMAGE_COLD, ValueModPack::DEFAULT) | |
| DYN_PROPERTY (energy_damage, ValueModPack, PROP_DAMAGE_ENERGY, ValueModPack::DEFAULT) | |
| DYN_PROPERTY (poison_damage, ValueModPack, PROP_DAMAGE_POISON, ValueModPack::DEFAULT) | |
| DYN_PROPERTY (physical_damage, ValueModPack, PROP_DAMAGE_PHYSICAL, ValueModPack::DEFAULT) | |
| void | eraseprop (const std::string &propname) |
| virtual void | fixInvalidGraphic () |
| Fixes invalid graphic, moving here to allow it to be overridden in subclass (see Multi) More... | |
| bool | getprop (const std::string &propname, std::string &propvalue) const |
| void | getpropnames (std::vector< std::string > &propnames) const |
| const PropertyList & | getprops () const |
| void | increv () |
| virtual void | printOn (Clib::StreamWriter &) const |
| virtual void | printOnDebug (Clib::StreamWriter &sw) const |
| virtual void | printSelfOn (Clib::StreamWriter &sw) const |
| void | ref_counted_add_ref () |
| unsigned | ref_counted_count () const |
| void | ref_counted_release () |
| u32 | rev () const |
| bool | saveonexit () const |
| void | saveonexit (bool newvalue) |
| virtual UObject * | self_as_owner () |
| virtual const UObject * | self_as_owner () const |
| void | set_dirty () |
| void | setname (const std::string &) |
| void | setprop (const std::string &propname, const std::string &propvalue) |
| bool | specific_name () const |
Public Member Functions inherited from Pol::Core::ULWObject | |
| bool | isa (UOBJ_CLASS uobj_class) const |
| bool | isitem () const |
| bool | ismobile () const |
| bool | ismulti () const |
| u8 | look_height () const |
| bool | orphan () const |
Public Member Functions inherited from Pol::Core::DynamicPropsHolder | |
| DynamicPropsHolder () | |
| size_t | estimateSizeDynProps () const |
| template<typename V > | |
| bool | getmember (DynPropTypes member, V *value) const |
| bool | hasmember (DynPropTypes member) const |
| template<typename V > | |
| void | setmember (DynPropTypes member, const V &value, const V &defaultvalue) |
| template<typename V > | |
| void | setmemberPointer (DynPropTypes member, V value) |
Public Attributes | |
| bool | editable |
| u16 | gumpheight |
| u16 | gumpwidth |
| PinPoints | pin_points |
| bool | plotting |
Public Attributes inherited from Pol::Items::Item | |
| Core::UContainer * | container |
| unsigned short | hp_ |
| u8 | layer |
| u8 | tile_layer |
Public Attributes inherited from Pol::Core::UObject | |
| u16 | color |
| u8 | facing |
| const u32 | objtype_ |
| u32 | serial_ext |
Public Attributes inherited from Pol::Core::ULWObject | |
| u16 | graphic |
| u8 | height |
| Realms::Realm * | realm |
| u32 | serial |
| u16 | x |
| u16 | y |
| s8 | z |
Protected Member Functions | |
| Map (const Items::MapDesc &mapdesc) | |
| virtual void | builtin_on_use (Network::Client *client) POL_OVERRIDE |
| virtual Bscript::BObjectImp * | get_script_member (const char *membername) const POL_OVERRIDE |
| virtual Bscript::BObjectImp * | get_script_member_id (const int id) const POL_OVERRIDE |
| void | printPinPoints (Clib::StreamWriter &sw) const |
| virtual void | printProperties (Clib::StreamWriter &sw) const POL_OVERRIDE |
| virtual void | readProperties (Clib::ConfigElem &elem) POL_OVERRIDE |
| virtual bool | script_isa (unsigned isatype) const POL_OVERRIDE |
| virtual Bscript::BObjectImp * | script_method (const char *methodname, Bscript::Executor &ex) POL_OVERRIDE |
| virtual Bscript::BObjectImp * | script_method_id (const int id, Bscript::Executor &ex) POL_OVERRIDE |
| virtual Bscript::BObjectImp * | set_script_member (const char *membername, int value) POL_OVERRIDE |
| id test More... | |
| virtual Bscript::BObjectImp * | set_script_member_id (const int id, int value) POL_OVERRIDE |
| id test More... | |
Protected Member Functions inherited from Pol::Items::Item | |
| Item (const ItemDesc &itemdesc, Core::UOBJ_CLASS uobj_class) | |
| virtual void | printDebugProperties (Clib::StreamWriter &sw) const POL_OVERRIDE |
Protected Member Functions inherited from Pol::Core::UObject | |
| UObject (u32 objtype, UOBJ_CLASS uobj_class) | |
| virtual | ~UObject () |
Protected Member Functions inherited from ref_counted | |
| ref_counted () | |
| ~ref_counted ()=default | |
| unsigned int | add_ref () |
| unsigned int | count () const |
| unsigned int | release () |
Protected Member Functions inherited from Pol::Core::ULWObject | |
| ULWObject (UOBJ_CLASS uobj_class) | |
| ULWObject (const ULWObject &)=delete | |
| ~ULWObject ()=default | |
| ULWObject & | operator= (const ULWObject &)=delete |
| bool | isa (UOBJ_CLASS uobj_class) const |
| bool | isitem () const |
| bool | ismobile () const |
| bool | ismulti () const |
| u8 | look_height () const |
| bool | orphan () const |
Protected Member Functions inherited from Pol::Core::DynamicPropsHolder | |
| ~DynamicPropsHolder ()=default | |
| DynamicPropsHolder () | |
| size_t | estimateSizeDynProps () const |
| template<typename V > | |
| bool | getmember (DynPropTypes member, V *value) const |
| bool | hasmember (DynPropTypes member) const |
| template<typename V > | |
| void | setmember (DynPropTypes member, const V &value, const V &defaultvalue) |
| template<typename V > | |
| void | setmemberPointer (DynPropTypes member, V value) |
Private Types | |
| typedef Items::Item | base |
Private Member Functions | |
| Map (const Map &map) | |
| Map & | operator= (const Map &map) |
Private Attributes | |
| u16 | facetid |
| u16 | xeast |
| u16 | xwest |
| u16 | ynorth |
| u16 | ysouth |
Friends | |
| Items::Item * | Items::Item::create (const Items::ItemDesc &itemdesc, u32 serial) |
|
private |
| typedef PinPoints::iterator Pol::Core::Map::pin_points_itr |
| typedef std::vector<PinPoint> Pol::Core::Map::PinPoints |
|
protected |
Definition at line 36 of file umap.cpp.
References Pol::Core::CLASS_ITEM.
|
private |
|
protectedvirtual |
Reimplemented from Pol::Items::Item.
Definition at line 116 of file umap.cpp.
References Pol::Network::Client::ClientType, Pol::Network::CLIENTTYPE_70130, facetid, gumpheight, gumpwidth, pin_points, Pol::Network::PktHelper::PacketOut< T >::Send(), Pol::Core::UObject::serial_ext, Pol::Core::PKTBI_56::TYPE_ADD, Pol::Core::PKTBI_56::TYPE_REMOVE_ALL, worldXtoGumpX(), worldYtoGumpY(), xeast, xwest, ynorth, and ysouth.
|
virtual |
This is a pretty good clone. Somewhat inefficient, but does work for derived classes that do not have data. (since it calls Item::create, virtual tables are copied)
Reimplemented from Pol::Items::Item.
Definition at line 327 of file umap.cpp.
References Pol::Items::Item::clone(), editable, facetid, gumpheight, gumpwidth, pin_points, plotting, xeast, xwest, ynorth, and ysouth.
|
virtual |
Reimplemented from Pol::Items::Item.
Definition at line 344 of file umap.cpp.
References Pol::Items::Item::estimatedSize(), and pin_points.
|
protectedvirtual |
Reimplemented from Pol::Items::Item.
Definition at line 3759 of file uoscrobj.cpp.
References Pol::Bscript::getKnownObjMember(), and Pol::Bscript::ObjMember::id.
|
protectedvirtual |
Reimplemented from Pol::Items::Item.
Definition at line 3722 of file uoscrobj.cpp.
References Pol::Bscript::MBR_EDITABLE, Pol::Bscript::MBR_FACETID, Pol::Bscript::MBR_GUMPHEIGHT, Pol::Bscript::MBR_GUMPWIDTH, Pol::Bscript::MBR_XEAST, Pol::Bscript::MBR_XWEST, Pol::Bscript::MBR_YNORTH, and Pol::Bscript::MBR_YSOUTH.
|
inline |
Definition at line 71 of file umap.h.
Referenced by gumpXtoWorldX(), msgCoordsInBounds(), and worldXtoGumpX().
|
inline |
Definition at line 70 of file umap.h.
Referenced by gumpXtoWorldX(), msgCoordsInBounds(), and worldXtoGumpX().
|
inline |
Definition at line 72 of file umap.h.
Referenced by gumpYtoWorldY(), msgCoordsInBounds(), and worldYtoGumpY().
|
inline |
Definition at line 73 of file umap.h.
References Pol::Items::Item::create(), and POL_OVERRIDE.
Referenced by gumpYtoWorldY(), msgCoordsInBounds(), and worldYtoGumpY().
Definition at line 298 of file umap.cpp.
References get_xeast(), get_xwest(), and gumpwidth.
Referenced by Pol::Core::handle_map_pin().
Definition at line 305 of file umap.cpp.
References get_ynorth(), get_ysouth(), and gumpheight.
Referenced by Pol::Core::handle_map_pin().
| bool Pol::Core::Map::msgCoordsInBounds | ( | PKTBI_56 * | msg | ) |
Definition at line 286 of file umap.cpp.
References cfBEu16, get_xeast(), get_xwest(), get_ynorth(), get_ysouth(), Pol::Core::PKTBI_56::pinx, and Pol::Core::PKTBI_56::piny.
Referenced by Pol::Core::handle_map_pin().
|
protected |
Definition at line 72 of file umap.cpp.
References pf_endl, and pin_points.
Referenced by printProperties().
|
protectedvirtual |
Reimplemented from Pol::Items::Item.
Definition at line 53 of file umap.cpp.
References editable, facetid, gumpheight, gumpwidth, pf_endl, printPinPoints(), Pol::Items::Item::printProperties(), xeast, xwest, ynorth, and ysouth.
|
protectedvirtual |
Reimplemented from Pol::Items::Item.
Definition at line 84 of file umap.cpp.
References editable, facetid, gumpheight, gumpwidth, pin_points, Pol::Items::Item::readProperties(), Pol::Clib::ConfigElem::remove_bool(), Pol::Clib::ConfigElem::remove_string(), Pol::Clib::ConfigElem::remove_ushort(), Pol::Core::PinPoint::x, xeast, xwest, Pol::Core::PinPoint::y, ynorth, and ysouth.
|
protectedvirtual |
Reimplemented from Pol::Items::Item.
Definition at line 4596 of file uoscrobj.cpp.
References Pol::Core::POLCLASS_MAP.
|
protectedvirtual |
Reimplemented from Pol::Items::Item.
Definition at line 273 of file umap.cpp.
References Pol::Bscript::getKnownObjMethod(), Pol::Bscript::ObjMethod::id, Pol::Items::Item::script_method(), and script_method_id().
|
protectedvirtual |
Reimplemented from Pol::Items::Item.
Definition at line 175 of file umap.cpp.
References Pol::Bscript::Executor::getParam(), Pol::Bscript::MTH_APPENDPIN, Pol::Bscript::MTH_ERASEPIN, Pol::Bscript::MTH_GETPINS, Pol::Bscript::MTH_INSERTPIN, pin_points, Pol::Core::ULWObject::realm, Pol::Items::Item::script_method_id(), Pol::Core::UObject::set_dirty(), Pol::Realms::Realm::valid(), Pol::Core::PinPoint::x, and Pol::Core::PinPoint::y.
Referenced by script_method().
|
protectedvirtual |
id test
Reimplemented from Pol::Items::Item.
Definition at line 3795 of file uoscrobj.cpp.
References Pol::Bscript::getKnownObjMember(), and Pol::Bscript::ObjMember::id.
|
protectedvirtual |
id test
Reimplemented from Pol::Items::Item.
Definition at line 3768 of file uoscrobj.cpp.
References Pol::Bscript::MBR_EDITABLE, Pol::Bscript::MBR_FACETID, Pol::Bscript::MBR_GUMPHEIGHT, Pol::Bscript::MBR_GUMPWIDTH, Pol::Bscript::MBR_XEAST, Pol::Bscript::MBR_XWEST, Pol::Bscript::MBR_YNORTH, and Pol::Bscript::MBR_YSOUTH.
Definition at line 312 of file umap.cpp.
References get_xeast(), get_xwest(), and gumpwidth.
Referenced by builtin_on_use().
Definition at line 319 of file umap.cpp.
References get_ynorth(), get_ysouth(), and gumpheight.
Referenced by builtin_on_use().
|
friend |
| bool Pol::Core::Map::editable |
Definition at line 64 of file umap.h.
Referenced by clone(), Pol::Core::handle_map_pin(), printProperties(), and readProperties().
|
private |
Definition at line 111 of file umap.h.
Referenced by builtin_on_use(), clone(), printProperties(), and readProperties().
| u16 Pol::Core::Map::gumpheight |
Definition at line 63 of file umap.h.
Referenced by builtin_on_use(), clone(), gumpYtoWorldY(), printProperties(), readProperties(), and worldYtoGumpY().
| u16 Pol::Core::Map::gumpwidth |
Definition at line 62 of file umap.h.
Referenced by builtin_on_use(), clone(), gumpXtoWorldX(), printProperties(), readProperties(), and worldXtoGumpX().
| PinPoints Pol::Core::Map::pin_points |
Definition at line 67 of file umap.h.
Referenced by builtin_on_use(), clone(), estimatedSize(), Pol::Core::handle_map_pin(), printPinPoints(), readProperties(), and script_method_id().
| bool Pol::Core::Map::plotting |
Definition at line 65 of file umap.h.
Referenced by clone(), and Pol::Core::handle_map_pin().
|
private |
Definition at line 108 of file umap.h.
Referenced by builtin_on_use(), clone(), printProperties(), and readProperties().
|
private |
Definition at line 107 of file umap.h.
Referenced by builtin_on_use(), clone(), printProperties(), and readProperties().
|
private |
Definition at line 109 of file umap.h.
Referenced by builtin_on_use(), clone(), printProperties(), and readProperties().
|
private |
Definition at line 110 of file umap.h.
Referenced by builtin_on_use(), clone(), printProperties(), and readProperties().