Crossfire Server, Branch 1.12  R12190
Defines | Functions
c_object.c File Reference

Object commands, including picking/dropping, locking, etc. More...

#include <global.h>
#include <loader.h>
#include <skills.h>
#include <sproto.h>
#include <living.h>
#include <math.h>
Include dependency graph for c_object.c:

Go to the source code of this file.

Defines

#define OBLINKMALLOC(p)
 Simple ::objectlink allocation, fail-safe.

Functions

int command_apply (object *op, char *params)
 'apply' command.
int command_disarm (object *op, char *params)
 'disarm' command.
int command_drop (object *op, char *params)
 'drop' command.
int command_dropall (object *op, char *params)
 Command to drop all items that have not been locked.
int command_empty (object *op, char *params)
 'empty' command.
int command_examine (object *op, char *params)
 'examine' command.
int command_lock_item (object *op, char *params)
 Alternate way to lock/unlock items (command line).
int command_mark (object *op, char *params)
 'mark' command, to mark an item for some effects (enchant armor, ...).
int command_pickup (object *op, char *params)
 'pickup' command.
int command_rename_item (object *op, char *params)
 Changing the custom name of an item.
int command_rskill (object *pl, char *params)
 'ready_skill' command.
int command_search (object *op, char *params)
 'search' command.
int command_search_items (object *op, char *params)
 'search-items' command.
int command_take (object *op, char *params)
 This takes (picks up) and item.
int command_throw (object *op, char *params)
 'throw' command.
int command_use (object *op, char *params)
 Try to use an item on another.
int command_uskill (object *pl, char *params)
 'use_skill' command.
static void display_new_pickup (const object *op)
 Utility function to display the pickup mode for a player.
void drop (object *op, object *tmp)
 Drop an item, either on the floor or in a container.
object * drop_object (object *op, object *tmp, uint32 nrof)
 Try to drop an object on the floor.
static void empty_container (object *container, object *pl)
 Put all contents of the container on the ground below the player or in opened container, except locked items.
void examine (object *op, object *tmp)
 Player examines some object.
void examine_monster (object *op, object *tmp)
 Player examine a monster.
static object * find_best_apply_object_match (object *start, object *pl, const char *params, int aflag)
 Search from start and through below for what matches best with params.
static object * find_best_object_match (object *pl, const char *params)
 Shortcut to find_best_apply_object_match(pl->inv, pl, params, AF_NULL);.
object * find_marked_object (object *op)
 Return the object the player has marked with the 'mark' command below.
void inventory (object *op, object *inv)
 Prints object's inventory.
void pick_up (object *op, object *alt)
 Try to pick up an item.
static void pick_up_object (object *pl, object *op, object *tmp, int nrof)
 Try to pick up some item.
void put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof)
 Something tries to put an object into another.
int sack_can_hold (const object *pl, const object *sack, const object *op, uint32 nrof)
 Check if an item op can be put into a sack.
static void set_pickup_mode (const object *op, int i)
 Sets the 'old' pickup mode.

Detailed Description

Object commands, including picking/dropping, locking, etc.

Todo:
clean multiple variations of same stuff (pickup and such), or rename for less confusion.

Definition in file c_object.c.


Define Documentation

#define OBLINKMALLOC (   p)
Value:
if (!((p) = (objectlink *)malloc(sizeof(objectlink)))) \
                            fatal(OUT_OF_MEMORY);

Simple ::objectlink allocation, fail-safe.

Definition at line 50 of file c_object.c.


Function Documentation

int command_apply ( object *  op,
char *  params 
)

'apply' command.

Parameters:
opplayer.
paramswhat to apply.
Returns:
whether skill was used or not.

Definition at line 221 of file c_object.c.

References AP_APPLY, AP_UNAPPLY, draw_ext_info_format(), find_best_apply_object_match(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, player_apply(), and player_apply_below().

Here is the call graph for this function:

int command_disarm ( object *  op,
char *  params 
)

'disarm' command.

Parameters:
opplayer.
paramsunused.
Returns:
whether skill was used or not.

Definition at line 181 of file c_object.c.

References SK_DISARM_TRAPS, skill_names, and use_skill().

Here is the call graph for this function:

int command_drop ( object *  op,
char *  params 
)

'drop' command.

Parameters:
opplayer.
paramswhat to drop.
Returns:
0.

Definition at line 1173 of file c_object.c.

References draw_ext_info(), draw_ext_info_format(), drop(), FLAG_INV_LOCKED, FLAG_NO_DROP, item_matched_string(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, PLAYER, and QUERY_FLAG.

Here is the call graph for this function:

int command_dropall ( object *  op,
char *  params 
)

Command to drop all items that have not been locked.

Parameters:
opplayer.
paramsoptional specifier, like 'armour', 'weapon' and such.
Returns:
0.

Definition at line 1021 of file c_object.c.

References AMULET, ARMOUR, ARMOUR_IMPROVER, ARROW, BOOK, BOOTS, BOW, BRACERS, CLEAR_FLAG, CLOAK, CONTAINER, draw_ext_info(), DRINK, drop(), esrv_update_item(), fix_object(), FLAG_APPLIED, FLAG_INV_LOCKED, FLAG_NO_FIX_PLAYER, FLESH, FOOD, GEM, GIRDLE, GLOVES, HELMET, HORN, KEY, MONEY, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, PLAYER, POTION, QUERY_FLAG, RING, ROD, SCROLL, SET_FLAG, SHIELD, SPECIAL_KEY, SPELLBOOK, UPD_WEIGHT, WAND, WEAPON, and WEAPON_IMPROVER.

Here is the call graph for this function:

int command_empty ( object *  op,
char *  params 
)

'empty' command.

Parameters:
opplayer.
paramsitem specifier.
Returns:
0.

Definition at line 1263 of file c_object.c.

References CONTAINER, draw_ext_info(), empty_container(), find_best_object_match(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, and NDI_UNIQUE.

Here is the call graph for this function:

int command_examine ( object *  op,
char *  params 
)

'examine' command.

Parameters:
opplayer.
paramsoptional item specifier.
Returns:
0.

Definition at line 1306 of file c_object.c.

References draw_ext_info_format(), examine(), find_best_object_match(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, and NDI_UNIQUE.

Here is the call graph for this function:

int command_lock_item ( object *  op,
char *  params 
)

Alternate way to lock/unlock items (command line).

Parameters:
opplayer
paramssent command line.

Definition at line 2234 of file c_object.c.

References CLEAR_FLAG, draw_ext_info(), draw_ext_info_format(), esrv_update_item(), find_best_object_match(), FLAG_INV_LOCKED, HUGE_BUF, merge_ob(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_FAILURE, NDI_UNIQUE, QUERY_FLAG, query_short_name(), SET_FLAG, and UPD_FLAGS.

Here is the call graph for this function:

int command_mark ( object *  op,
char *  params 
)

'mark' command, to mark an item for some effects (enchant armor, ...).

Parameters:
opplayer.
paramsIf empty, we print out the currently marked object. Otherwise, try to find a matching object - try best match first.
Returns:
1 or 0.

Definition at line 1376 of file c_object.c.

References draw_ext_info(), draw_ext_info_format(), find_best_object_match(), find_marked_object(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, and query_name().

Here is the call graph for this function:

int command_pickup ( object *  op,
char *  params 
)

'pickup' command.

Parameters:
opplayer.
paramspickup mode. Can be empty to display the current mode.
Returns:
1 if success, 0 else.
Todo:
trash old pickup mode, merge with new pickup.

Definition at line 1867 of file c_object.c.

References display_new_pickup(), draw_ext_info(), draw_ext_info_format(), llevDebug, LOG(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, PU_ALLWEAPON, PU_ARMOUR, PU_ARROW, PU_BOOTS, PU_BOW, PU_CLOAK, PU_DEBUG, PU_DRINK, PU_FLESH, PU_FOOD, PU_GLOVES, PU_HELMET, PU_INHIBIT, PU_JEWELS, PU_KEY, PU_MAGIC_DEVICE, PU_MAGICAL, PU_MISSILEWEAPON, PU_NEWMODE, PU_NOT_CURSED, PU_POTION, PU_READABLES, PU_SHIELD, PU_SKILLSCROLL, PU_SPELLBOOK, PU_STOP, PU_VALUABLES, and set_pickup_mode().

Here is the call graph for this function:

int command_rename_item ( object *  op,
char *  params 
)

Changing the custom name of an item.

Syntax is: rename <what object> to <new name>

  • if 'what object' is omitted, marked object is used
  • if 'to new name' is omitted, custom name is cleared

Names are considered for all purpose having a length <=127 (max length sent to client by server).

Parameters:
opplayer.
paramshow to rename.
Returns:
1

Definition at line 2047 of file c_object.c.

References draw_ext_info(), draw_ext_info_format(), esrv_update_item(), find_best_object_match(), find_marked_object(), FREE_AND_CLEAR_STR, FREE_AND_COPY, MAX_BUF, merge_ob(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, query_base_name(), snprintf(), UPD_NAME, and VERY_BIG_BUF.

Here is the call graph for this function:

int command_rskill ( object *  pl,
char *  params 
)

'ready_skill' command.

Parameters:
plplayer.
paramsskill name.
Returns:
whether skill was readied or not.

Definition at line 132 of file c_object.c.

References change_skill(), draw_ext_info(), draw_ext_info_format(), find_skill_by_name(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_SKILL, MSG_TYPE_SKILL_MISSING, and NDI_UNIQUE.

Here is the call graph for this function:

int command_search ( object *  op,
char *  params 
)

'search' command.

Parameters:
opplayer.
paramsunused.
Returns:
whether skill was used or not.

Definition at line 167 of file c_object.c.

References SK_FIND_TRAPS, skill_names, and use_skill().

Here is the call graph for this function:

int command_search_items ( object *  op,
char *  params 
)

'search-items' command.

Parameters:
opplayer.
paramsoptions.
Returns:
1.

Definition at line 1998 of file c_object.c.

References draw_ext_info(), draw_ext_info_format(), FALSE, fix_object(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, Settings::search_items, and settings.

Here is the call graph for this function:

int command_take ( object *  op,
char *  params 
)

This takes (picks up) and item.

Parameters:
opplayer who issued the command.
paramsstring to match against the item name.
Returns:
0.

Definition at line 602 of file c_object.c.

References can_pick(), draw_ext_info(), draw_ext_info_format(), FLAG_IS_FLOOR, item_matched_string(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_FAILURE, NDI_UNIQUE, pick_up(), and QUERY_FLAG.

Here is the call graph for this function:

int command_throw ( object *  op,
char *  params 
)

'throw' command.

A little special because we do want to pass the full params along as it includes the object to throw.

Parameters:
opplayer.
paramswhat to throw.
Returns:
whether skill was used or not.

Definition at line 198 of file c_object.c.

References do_skill(), draw_ext_info(), find_skill_by_name(), MSG_TYPE_SKILL, MSG_TYPE_SKILL_MISSING, NDI_UNIQUE, SK_THROWING, and skill_names.

Here is the call graph for this function:

int command_use ( object *  op,
char *  params 
)

Try to use an item on another.

Items are checked for key/values matching.

Parameters:
opplayer.
paramssent string, with all parameters.
Returns:
1.

Definition at line 2282 of file c_object.c.

References decrease_ob, draw_ext_info(), draw_ext_info_format(), find_archetype(), find_best_object_match(), get_ob_key_value(), insert_ob_in_ob(), llevError, LOG(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_FAILURE, NDI_UNIQUE, object_create_arch(), PLAYER, and snprintf().

Here is the call graph for this function:

int command_uskill ( object *  pl,
char *  params 
)

'use_skill' command.

Parameters:
plplayer.
paramsskill to use, and optional parameters.
Returns:
whether skill was used or not.

Definition at line 113 of file c_object.c.

References draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, and use_skill().

Here is the call graph for this function:

static void display_new_pickup ( const object *  op) [static]

Utility function to display the pickup mode for a player.

Parameters:
opmust be a player.

Definition at line 1723 of file c_object.c.

References draw_ext_info(), draw_ext_info_format(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, NDI_UNIQUE, PU_ALLWEAPON, PU_ARMOUR, PU_ARROW, PU_BOOTS, PU_BOW, PU_CLOAK, PU_DEBUG, PU_DRINK, PU_FLESH, PU_FOOD, PU_GLOVES, PU_HELMET, PU_INHIBIT, PU_JEWELS, PU_KEY, PU_MAGIC_DEVICE, PU_MAGICAL, PU_MISSILEWEAPON, PU_NEWMODE, PU_NOT_CURSED, PU_POTION, PU_RATIO, PU_READABLES, PU_SHIELD, PU_SKILLSCROLL, PU_SPELLBOOK, PU_STOP, and PU_VALUABLES.

Referenced by command_pickup().

Here is the call graph for this function:

Here is the caller graph for this function:

void drop ( object *  op,
object *  tmp 
)

Drop an item, either on the floor or in a container.

Parameters:
opwho is dropping an item.
tmpwhat object to drop.

Definition at line 943 of file c_object.c.

References draw_ext_info(), drop_object(), FLAG_INV_LOCKED, FLAG_NO_DROP, free_object(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, PLAYER, put_object_in_sack(), QUERY_FLAG, and remove_ob().

Referenced by cfapi_object_drop(), command_drop(), command_dropall(), empty_container(), and handle_apply_yield().

Here is the call graph for this function:

Here is the caller graph for this function:

object* drop_object ( object *  op,
object *  tmp,
uint32  nrof 
)

Try to drop an object on the floor.

This function was part of drop, now is own function.

Parameters:
opwho is dropping the item.
tmpitem to drop.
nrofif is non zero, then nrof objects is tried to be dropped.
Returns:
object dropped, NULL if it was destroyed.
Todo:
shouldn't tmp be NULL if was_destroyed returns true?

Definition at line 847 of file c_object.c.

References AP_NO_MERGE, AP_UNAPPLY, apply_special(), draw_ext_info(), draw_ext_info_format(), esrv_update_item(), EVENT_DROP, execute_event(), fix_object(), FLAG_APPLIED, FLAG_NO_DROP, FLAG_NO_FIX_PLAYER, FLAG_STARTEQUIP, FLAG_UNPAID, free_object(), get_split_ob(), insert_ob_in_map(), is_in_shop(), MAX_BUF, MONEY, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, PLAYER, QUERY_FLAG, query_name(), remove_ob(), save_player(), SCRIPT_FIX_ALL, sell_item(), and UPD_WEIGHT.

Referenced by drop(), esrv_move_object(), and transport_type_apply().

Here is the call graph for this function:

Here is the caller graph for this function:

static void empty_container ( object *  container,
object *  pl 
) [static]

Put all contents of the container on the ground below the player or in opened container, except locked items.

Parameters:
containerwhat to empty.
plplayer to drop for.

Definition at line 1223 of file c_object.c.

References draw_ext_info_format(), drop(), esrv_update_item(), FLAG_INV_LOCKED, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, QUERY_FLAG, query_name(), and UPD_WEIGHT.

Referenced by command_empty().

Here is the call graph for this function:

Here is the caller graph for this function:

void examine ( object *  op,
object *  tmp 
)
void examine_monster ( object *  op,
object *  tmp 
)

Player examine a monster.

Parameters:
opplayer.
tmpmonster being examined.

Definition at line 1424 of file c_object.c.

References AT_ACID, draw_ext_info(), FLAG_UNDEAD, mon, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_EXAMINE, NDI_UNIQUE, POISONING, present_in_ob(), and QUERY_FLAG.

Referenced by examine(), and probe().

Here is the call graph for this function:

Here is the caller graph for this function:

static object* find_best_apply_object_match ( object *  start,
object *  pl,
const char *  params,
int  aflag 
) [static]

Search from start and through below for what matches best with params.

we use item_matched_string above - this gives us consistent behaviour between many commands. Return the best match, or NULL if no match.

Parameters:
startfirst object to start searching at.
plwhat object we're searching for.
paramswhat to search for.
aflagEither 0 or AP_APPLY or AP_UNAPPLY. Used with apply -u, and apply -a to only unapply applied, or apply unapplied objects.
Returns:
matching object, or NULL if no suitable.

Definition at line 70 of file c_object.c.

References AP_APPLY, AP_UNAPPLY, FLAG_APPLIED, item_matched_string(), and QUERY_FLAG.

Referenced by command_apply(), and find_best_object_match().

Here is the call graph for this function:

Here is the caller graph for this function:

static object* find_best_object_match ( object *  pl,
const char *  params 
) [static]

Shortcut to find_best_apply_object_match(pl->inv, pl, params, AF_NULL);.

Parameters:
plwho to search an item for.
paramswhat to search for.
Returns:
matching object, or NULL if no suitable.

Definition at line 99 of file c_object.c.

References AP_NULL, and find_best_apply_object_match().

Referenced by command_empty(), command_examine(), command_lock_item(), command_mark(), command_rename_item(), and command_use().

Here is the call graph for this function:

Here is the caller graph for this function:

object* find_marked_object ( object *  op)

Return the object the player has marked with the 'mark' command below.

If no match is found (or object has changed), we return NULL. We leave it up to the calling function to print messages if nothing is found.

Parameters:
opobject. Should be a player.
Returns:
marked object if still valid, NULL else.

Definition at line 1339 of file c_object.c.

Referenced by animate_weapon(), apply_map_builder(), armour_improver_type_apply(), cast_item_curse_or_curse(), cfapi_object_get_property(), command_mark(), command_rename_item(), find_throw_ob(), identify_altar_type_move_on(), lighter_type_apply(), recharge(), weapon_improver_type_apply(), and write_on_item().

Here is the caller graph for this function:

void inventory ( object *  op,
object *  inv 
)

Prints object's inventory.

Parameters:
opwho to print for.
invif NULL then print op's inventory, else print the inventory of inv.

Definition at line 1653 of file c_object.c.

References CONTAINER, draw_ext_info(), draw_ext_info_format(), FLAG_APPLIED, FLAG_WIZ, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_INVENTORY, NDI_UNIQUE, QUERY_FLAG, query_name(), and query_weight().

Referenced by command_inventory(), and look_at().

Here is the call graph for this function:

Here is the caller graph for this function:

void pick_up ( object *  op,
object *  alt 
)

Try to pick up an item.

Parameters:
opobject trying to pick up.
altoptional object op is trying to pick. If NULL, try to pick first item under op.

Definition at line 462 of file c_object.c.

References can_pick(), CONTAINER, draw_ext_info(), draw_ext_info_format(), FLAG_APPLIED, FLAG_STARTEQUIP, insert_ob_in_map(), llevDebug, LOG(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, pick_up_object(), PLAYER, QUERY_FLAG, sack_can_hold(), and stop_item().

Referenced by attempt_steal(), cast_create_missile(), cfapi_object_pickup(), check_pick(), command_take(), and esrv_move_object().

Here is the call graph for this function:

Here is the caller graph for this function:

static void pick_up_object ( object *  pl,
object *  op,
object *  tmp,
int  nrof 
) [static]

Try to pick up some item.

Parameters:
plobject (player or monster) picking up.
opobject to put tmp into.
tmpobject to pick up.
nrofnumber of tmp to pick up (0 means all of them).

Definition at line 340 of file c_object.c.

References draw_ext_info(), esrv_update_item(), EVENT_PICKUP, execute_event(), F_BUY, F_SHOP, FALSE, fix_object(), FLAG_NO_DROP, FLAG_REMOVED, FLAG_UNPAID, FLAG_WAS_WIZ, FLAG_WIZ, free_object(), get_player_container(), get_split_ob(), HUGE_BUF, insert_ob_in_ob(), MAX_BUF, MAX_STAT, MOVE_FLYING, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_FAILURE, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, PLAYER, query_cost_string(), QUERY_FLAG, query_name(), Settings::real_wiz, remove_ob(), SCRIPT_FIX_ALL, SET_FLAG, settings, snprintf(), stringbuffer_finish(), UPD_WEIGHT, and weight_limit.

Referenced by pick_up().

Here is the call graph for this function:

Here is the caller graph for this function:

void put_object_in_sack ( object *  op,
object *  sack,
object *  tmp,
uint32  nrof 
)

Something tries to put an object into another.

This function was part of drop(), now is own function.

Note:
the 'sack' in question can now be a transport, so this function isn't named very good anymore.
Parameters:
opwho is moving the item.
sackwhere to put the object.
tmpwhat to put into sack.
nrofif non zero, then nrof objects is tried to put into sack, else everything is put.

Definition at line 700 of file c_object.c.

References AP_NO_MERGE, AP_UNAPPLY, apply_special(), CLEAR_FLAG, CONTAINER, draw_ext_info(), draw_ext_info_format(), esrv_update_item(), fix_object(), FLAG_APPLIED, FLAG_NO_FIX_PLAYER, FLAG_STARTEQUIP, get_split_ob(), insert_ob_in_map_at(), insert_ob_in_ob(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_FAILURE, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, PLAYER, put_object_in_sack(), QUERY_FLAG, query_name(), remove_ob(), sack_can_hold(), set_object_face_main(), TRANSPORT, transport_can_hold(), and UPD_WEIGHT.

Referenced by drop(), esrv_move_object(), put_object_in_sack(), and START_TEST().

Here is the call graph for this function:

Here is the caller graph for this function:

int sack_can_hold ( const object *  pl,
const object *  sack,
const object *  op,
uint32  nrof 
)

Check if an item op can be put into a sack.

If pl exists then tell a player the reason of failure.

Parameters:
plplayer.
sackcontainer to try to put into.
opwhat to put in the sack.
nrofnumber of objects (op) we want to put in. We specify it separately instead of using op->nrof because often times, a player may have specified a certain number of objects to drop, so we can pass that number, and not need to use split_ob() and stuff.
Returns:
1 if it will fit, 0 if it will not.

Definition at line 282 of file c_object.c.

References CONTAINER, draw_ext_info_format(), FLAG_APPLIED, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, QUERY_FLAG, query_name(), and SPECIAL_KEY.

Referenced by esrv_move_object(), pick_up(), and put_object_in_sack().

Here is the call graph for this function:

Here is the caller graph for this function:

static void set_pickup_mode ( const object *  op,
int  i 
) [static]

Sets the 'old' pickup mode.

Parameters:
opplayer.
inew pickup mode.

Definition at line 1944 of file c_object.c.

References draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_SUCCESS, and NDI_UNIQUE.

Referenced by command_pickup().

Here is the call graph for this function:

Here is the caller graph for this function: