#include <Item.h>
Inheritance diagram for Item:

Definition at line 34 of file Item.h.
| enum Item::extflags |
| EXT_FIXED | Item came from FIXED. |
| EXT_INCURMAP | Item is in a CurrentMap display list. |
| EXT_LERP_NOPREV | Item can't be lerped this frame. |
| EXT_HIGHLIGHT | Item should be Painted highlighted. |
| EXT_CAMERA | Item is being followed by the camera. |
| EXT_SPRITE | Item is a sprite. |
| EXT_TRANSPARENT | Item should be painted transparent. |
| EXT_PERMANENT_NPC | Item is a permanent NPC. |
| enum Item::statusflags |
| FLG_DISPOSABLE | Item is discarded on map change. |
| FLG_OWNED | Item is owned by avatar. |
| FLG_CONTAINED | Item is in a container. |
| FLG_INVISIBLE | Item is invisible. |
| FLG_FLIPPED | Item is flipped horizontally. |
| FLG_IN_NPC_LIST | Item is a NPC. |
| FLG_FAST_ONLY | Item is discarded when leaving fast area. |
| FLG_GUMP_OPEN | Item has a gump open. |
| FLG_EQUIPPED | Item is equipped. |
| FLG_BOUNCING | Item has bounced. |
| FLG_ETHEREAL | Item is in the ethereal list. |
| FLG_HANGING | Item is suspended in the air. |
| FLG_FASTAREA | Item is in the fast area. |
| FLG_LOW_FRICTION | Item has low friction. |
| void Item::animateItem | ( | ) | [private] |
Animate the item (called by setupLerp).
Definition at line 1263 of file Item.cpp.
References ShapeInfo::animdata, ShapeInfo::animtype, callUsecodeEvent_anim(), frame, Shape::frameCount(), getShapeInfo(), getShapeObject(), last_setup, Object::objid, and pout.
Referenced by setupLerp().
| sint32 Item::ascend | ( | int | delta | ) |
Make the item move up (delta>0) or down (delta<0), including any items on top of it
| delta | distance in Z-direction to move |
Definition at line 1443 of file Item.cpp.
References collideMove(), World::get_instance(), World::getCurrentMap(), getItem(), getLocation(), UCList::getSize(), UCList::getuint16(), ix, iy, iz, moveToEtherealVoid(), and CurrentMap::surfaceSearch().
Call a Usecode Event. Use the separate functions instead!
Definition at line 1028 of file Item.cpp.
References Object::callUsecode(), EXT_PERMANENT_NPC, extendedflags, flags, FLG_FAST_ONLY, Usecode::get_class_event(), UCMachine::get_instance(), GameData::get_instance(), getFamily(), GameData::getMainUsecode(), Object::objid, pout, quality, ShapeInfo::SF_UNKEGG, and shape.
Referenced by callUsecodeEvent_anim(), callUsecodeEvent_AvatarStoleSomething(), callUsecodeEvent_cachein(), callUsecodeEvent_cast(), callUsecodeEvent_combine(), callUsecodeEvent_enterFastArea(), callUsecodeEvent_guardianBark(), callUsecodeEvent_hatch(), callUsecodeEvent_justMoved(), callUsecodeEvent_leaveFastArea(), callUsecodeEvent_look(), callUsecodeEvent_release(), callUsecodeEvent_schedule(), and callUsecodeEvent_use().
| uint32 Item::callUsecodeEvent_anim | ( | ) |
Definition at line 1079 of file Item.cpp.
References callUsecodeEvent().
Referenced by animateItem().
Definition at line 1149 of file Item.cpp.
References BaseUCStack::access(), callUsecodeEvent(), and BaseUCStack::push2().
Referenced by movedByPlayer().
| uint32 Item::callUsecodeEvent_cachein | ( | ) |
Definition at line 1084 of file Item.cpp.
References callUsecodeEvent().
Referenced by StartU8Process::run().
Definition at line 1137 of file Item.cpp.
References BaseUCStack::access(), callUsecodeEvent(), and BaseUCStack::push2().
Referenced by Actor::setInCombat().
| uint32 Item::callUsecodeEvent_combine | ( | ) |
Definition at line 1122 of file Item.cpp.
References callUsecodeEvent().
Referenced by Actor::giveTreasure(), and SplitItemProcess::run().
| uint32 Item::callUsecodeEvent_enterFastArea | ( | ) |
Definition at line 1127 of file Item.cpp.
References callUsecodeEvent().
Referenced by enterFastArea().
Definition at line 1156 of file Item.cpp.
References BaseUCStack::access(), callUsecodeEvent(), and BaseUCStack::push2().
| uint32 Item::callUsecodeEvent_hatch | ( | ) |
Definition at line 1105 of file Item.cpp.
References callUsecodeEvent().
Referenced by Egg::hatch().
Referenced by collideMove().
| uint32 Item::callUsecodeEvent_justMoved | ( | ) |
Definition at line 1144 of file Item.cpp.
References callUsecodeEvent().
Referenced by move(), and moveToContainer().
| uint32 Item::callUsecodeEvent_leaveFastArea | ( | ) |
Definition at line 1132 of file Item.cpp.
References callUsecodeEvent().
Referenced by leaveFastArea().
| uint32 Item::callUsecodeEvent_look | ( | ) |
Definition at line 1069 of file Item.cpp.
References callUsecodeEvent().
Referenced by GameMapGump::OnMouseClick(), and ContainerGump::OnMouseClick().
| uint32 Item::callUsecodeEvent_release | ( | ) |
Definition at line 1117 of file Item.cpp.
References callUsecodeEvent().
Referenced by collideMove(), and grab().
Definition at line 1110 of file Item.cpp.
References BaseUCStack::access(), callUsecodeEvent(), and BaseUCStack::push4().
Referenced by SchedulerProcess::run(), and Actor::schedule().
| uint32 Item::callUsecodeEvent_use | ( | ) |
Definition at line 1074 of file Item.cpp.
References callUsecodeEvent().
Referenced by MainActor::ConCmd_useBackpack(), MainActor::ConCmd_useInventory(), MiniStatsGump::OnMouseDouble(), use(), and MainActor::useInventoryItem().
| bool Item::canDrag | ( | ) |
can this item be dragged?
Definition at line 1638 of file Item.cpp.
References getShapeInfo(), ShapeInfo::is_fixed(), Actor::isDead(), and ShapeInfo::weight.
Referenced by getThrowRange(), and GameMapGump::StartDraggingItem().
Check if this item can exist at the given coordinates.
Definition at line 540 of file Item.cpp.
References World::get_instance(), World::getCurrentMap(), Object::getObjId(), getShape(), and CurrentMap::isValidPosition().
Referenced by ActorAnimProcess::doSpecial(), GameMapGump::DraggingItem(), and MonsterEgg::hatch().
| bool Item::canMergeWith | ( | Item * | other | ) |
Check if we can merge with another item.
Definition at line 1778 of file Item.cpp.
References GameInfo::GAME_U8, CoreApp::get_instance(), getFamily(), getFrame(), Object::getObjId(), getShape(), ShapeInfo::SF_QUANTITY, and ShapeInfo::SF_REAGENT.
Referenced by ContainerGump::DropItem().
Check if this item can reach another item. (This includes LoS.)
| other | item to be reached | |
| range | range | |
| x | x coordinate of other to use, If zero, use real coords. | |
| y | y coordinate of other to use | |
| z | z coordinate of other to use. |
Definition at line 1697 of file Item.cpp.
References checkLineOfSightCollisions(), World::get_instance(), World::getCurrentMap(), getFootpadWorld(), getLocationAbsolute(), Object::getObjId(), getTopItem(), Object::objid, ShapeInfo::SI_SOLID, and CurrentMap::sweepTest().
Referenced by GameMapGump::DraggingItem(), ContainerGump::DraggingItem(), GameMapGump::DropItem(), GameMapGump::OnMouseDouble(), ContainerGump::OnMouseDouble(), GameMapGump::StartDraggingItem(), and ContainerGump::StartDraggingItem().
Check this Item against the given loopscript
| script | The loopscript to run | |
| scriptsize | The size (in bytes) of the loopscript |
check for i out of bounds
check for i out of bounds
check for i out of bounds
Definition at line 655 of file Item.cpp.
References getFamily(), getFlags(), getFrame(), getNpcNum(), getQuality(), getShape(), perr, BaseUCStack::pop2(), and BaseUCStack::push2().
Referenced by UCMachine::execProcess().
| void Item::clearExtFlag | ( | uint32 | mask | ) | [inline] |
Clear the extendedflags set in the given mask.
Definition at line 143 of file Item.h.
References extendedflags.
Referenced by CurrentMap::removeItemFromList(), and CameraProcess::terminate().
| void Item::clearFlag | ( | uint32 | mask | ) | [inline] |
Clear the flags set in the given mask.
Definition at line 131 of file Item.h.
References flags.
Referenced by GameMapGump::ConCmd_dumpMap(), Actor::setEquip(), GravityProcess::terminate(), and AnimationTracker::updateActorFlags().
| void Item::clearGump | ( | ) |
Call this to notify the Item's open Gump has closed.
Definition at line 1437 of file Item.cpp.
References flags, FLG_GUMP_OPEN, and gump.
Referenced by PaperdollGump::Close(), ContainerGump::Close(), and closeGump().
| void Item::closeGump | ( | ) |
Close this Item's gump, if any.
Definition at line 1423 of file Item.cpp.
References clearGump(), Gump::Close(), flags, FLG_GUMP_OPEN, GUIApp::get_instance(), GUIApp::getGump(), and gump.
Referenced by ResurrectionProcess::run(), and use().
| sint32 Item::collideMove | ( | sint32 | x, | |
| sint32 | y, | |||
| sint32 | z, | |||
| bool | teleport, | |||
| bool | force, | |||
| ObjId * | hititem = 0 | |||
| ) |
Move the object to (x,y,z) colliding with objects in the way.
| teleport | move without colliding with objects between source and destination | |
| force | force the object to get to the destination without being blocked by solid objects | |
| hititem | if non-NULL, this is set to (one of) the item(s) blocking the movement, or to zero if nothing blocked it |
Definition at line 833 of file Item.cpp.
References callUsecodeEvent_hit(), callUsecodeEvent_release(), EXT_HIGHLIGHT, flags, Kernel::get_instance(),