Crossfire Client, Trunk
|
#include "client.h"
#include <ctype.h>
#include "external.h"
#include "item.h"
#include "script.h"
#include "item-types.h"
Go to the source code of this file.
Functions | |
static void | add_item (item *env, item *op) |
void | animate_objects (void) |
int | can_write_spell_on (item *it) |
static item * | create_new_item (item *env, gint32 tag) |
void | free_all_items (item *op) |
static void | get_flags (item *op, guint16 flags) |
const char * | get_number (guint32 i) |
guint8 | get_type_from_name (const char *name) |
void | inscribe_magical_scroll (item *scroll, Spell *spell) |
static void | insert_item_before_item (item *newitem, item *before) |
item * | locate_item (gint32 tag) |
static item * | locate_item_from_item (item *op, gint32 tag) |
item * | map_item (void) |
static item * | new_item (void) |
item * | player_item (void) |
void | print_inventory (item *op) |
void | remove_item (item *op) |
void | remove_item_inventory (item *op) |
void | send_mark_obj (item *op) |
static void | set_flag_string (item *op) |
void | set_item_values (item *op, char *name, gint32 weight, guint16 face, guint16 flags, guint16 anim, guint16 animspeed, guint32 nrof, guint16 type) |
void | toggle_locked (item *op) |
void | update_item (int tag, int loc, char *name, int weight, int face, int flags, int anim, int animspeed, guint32 nrof, int type) |
void | update_item_sort (item *it) |
Variables | |
static const char *const | apply_string [] |
static item * | map |
static item * | player |
Provides functions that process items in various ways.
Definition in file item.c.
Definition at line 361 of file item.c.
References item_struct::env, item_struct::inv, item_struct::next, and item_struct::prev.
Referenced by create_new_item().
void animate_objects | ( | void | ) |
Definition at line 654 of file item.c.
References item_struct::anim_speed, item_struct::anim_state, item_struct::animation_id, animations, Player_Struct::below, Player_Struct::container, cpl, item_struct::face, Animations::faces, item_struct::inv, item_struct::inv_updated, item_struct::last_anim, item_struct::next, Animations::num_animations, and player.
int can_write_spell_on | ( | item * | it | ) |
Definition at line 720 of file item.c.
References item_struct::type.
Definition at line 386 of file item.c.
References add_item(), item_struct::locked, new_item(), and item_struct::tag.
Referenced by update_item().
void free_all_items | ( | item * | op | ) |
Definition at line 242 of file item.c.
References free_all_items(), item_struct::inv, and item_struct::next.
Referenced by free_all_items().
|
static |
Definition at line 444 of file item.c.
References item_struct::applied, item_struct::apply_type, item_struct::blessed, item_struct::cursed, item_struct::damned, F_APPLIED, F_BLESSED, F_CURSED, F_DAMNED, F_LOCKED, F_MAGIC, F_OPEN, F_READ, F_UNPAID, item_struct::flagsval, item_struct::locked, item_struct::magical, item_struct::open, item_struct::read, set_flag_string(), item_struct::unpaid, and item_struct::was_open.
Referenced by set_item_values(), and update_item().
const char* get_number | ( | guint32 | i | ) |
Definition at line 186 of file item.c.
References MAX_BUF.
Referenced by set_item_values().
guint8 get_type_from_name | ( | const char * | name | ) |
Definition at line 38 of file item.c.
References item_types, LOG(), LOG_WARNING, and NUM_ITEM_TYPES.
Referenced by set_item_values().
Definition at line 725 of file item.c.
References csocket, ClientSocket::fd, MAX_BUF, script_monitor_str(), SockList_AddChar(), SockList_AddInt(), SockList_AddString(), SockList_Init(), SockList_Send(), item_struct::tag, and Spell_struct::tag.
Definition at line 68 of file item.c.
References item_struct::env, item_struct::inv, item_struct::inv_updated, item_struct::next, and item_struct::prev.
Referenced by update_item_sort().
item* locate_item | ( | gint32 | tag | ) |
Definition at line 278 of file item.c.
References Player_Struct::container, cpl, item_struct::inv, locate_item_from_item(), map, player, and item_struct::tag.
Referenced by DeleteInventory(), DeleteItem(), hide_main_client(), Item2Cmd(), update_item(), and UpdateItemCmd().
Definition at line 259 of file item.c.
References item_struct::inv, item_struct::next, and item_struct::tag.
Referenced by locate_item().
item* map_item | ( | void | ) |
Definition at line 571 of file item.c.
References map, new_item(), and item_struct::weight.
Referenced by client_init().
|
static |
Definition at line 209 of file item.c.
References item_struct::anim_state, item_struct::animation_id, item_struct::applied, item_struct::blessed, copy_name, item_struct::cursed, item_struct::d_name, item_struct::damned, item_struct::env, item_struct::face, item_struct::flagsval, item_struct::inv, item_struct::inv_updated, item_struct::last_anim, item_struct::locked, item_struct::magical, item_struct::next, NO_ITEM_TYPE, item_struct::nrof, item_struct::open, item_struct::p_name, item_struct::prev, item_struct::s_name, item_struct::tag, item_struct::type, item_struct::unpaid, and item_struct::weight.
Referenced by create_new_item(), map_item(), and player_item().
item* player_item | ( | void | ) |
Definition at line 565 of file item.c.
References new_item(), and player.
Referenced by client_init().
void print_inventory | ( | item * | op | ) |
Definition at line 620 of file item.c.
References item_struct::d_name, draw_ext_info(), item_struct::flags, get_info_width(), item_struct::inv, MAX_BUF, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_DEBUG, NDI_BLACK, item_struct::next, item_struct::nrof, print_inventory(), item_struct::tag, and item_struct::weight.
Referenced by do_inv(), and print_inventory().
void remove_item | ( | item * | op | ) |
Definition at line 309 of file item.c.
References Player_Struct::container, cpl, item_struct::env, item_struct::inv, item_struct::inv_updated, item_event_item_deleting(), map, item_struct::next, player, item_struct::prev, and remove_item_inventory().
Referenced by DeleteItem(), remove_item_inventory(), and update_item().
void remove_item_inventory | ( | item * | op | ) |
Definition at line 344 of file item.c.
References item_struct::inv, item_struct::inv_updated, item_event_container_clearing(), and remove_item().
Referenced by DeleteInventory(), hide_main_client(), and remove_item().
void send_mark_obj | ( | item * | op | ) |
Definition at line 548 of file item.c.
References csocket, item_struct::env, ClientSocket::fd, MAX_BUF, script_monitor_str(), SockList_AddInt(), SockList_AddString(), SockList_Init(), SockList_Send(), and item_struct::tag.
Referenced by list_item_action(), and ma_mark().
|
static |
Definition at line 407 of file item.c.
References apply_string, item_struct::apply_type, item_struct::blessed, item_struct::cursed, item_struct::damned, item_struct::flags, item_struct::locked, item_struct::magical, item_struct::open, item_struct::read, and item_struct::unpaid.
Referenced by get_flags().
void set_item_values | ( | item * | op, |
char * | name, | ||
gint32 | weight, | ||
guint16 | face, | ||
guint16 | flags, | ||
guint16 | anim, | ||
guint16 | animspeed, | ||
guint32 | nrof, | ||
guint16 | type | ||
) |
Definition at line 461 of file item.c.
References item_struct::anim_speed, item_struct::animation_id, copy_name, csocket, item_struct::d_name, item_struct::env, item_struct::face, get_flags(), get_number(), get_type_from_name(), item_struct::inv_updated, item_event_item_changed(), map, NO_ITEM_TYPE, item_struct::nrof, item_struct::p_name, item_struct::s_name, ClientSocket::sc_version, item_struct::type, update_item_sort(), and item_struct::weight.
Referenced by update_item().
void toggle_locked | ( | item * | op | ) |
Definition at line 530 of file item.c.
References csocket, item_struct::env, ClientSocket::fd, item_struct::locked, MAX_BUF, script_monitor_str(), SockList_AddChar(), SockList_AddInt(), SockList_AddString(), SockList_Init(), SockList_Send(), and item_struct::tag.
Referenced by list_item_action(), and ma_lock().
void update_item | ( | int | tag, |
int | loc, | ||
char * | name, | ||
int | weight, | ||
int | face, | ||
int | flags, | ||
int | anim, | ||
int | animspeed, | ||
guint32 | nrof, | ||
int | type | ||
) |
Definition at line 579 of file item.c.
References item_struct::anim_speed, item_struct::animation_id, copy_name, create_new_item(), item_struct::d_name, item_struct::env, item_struct::face, get_flags(), item_struct::inv, item_struct::inv_updated, locate_item(), item_struct::nrof, player, remove_item(), set_item_values(), item_struct::tag, and item_struct::weight.
Referenced by Item2Cmd(), and UpdateItemCmd().
void update_item_sort | ( | item * | it | ) |
Definition at line 87 of file item.c.
References item_struct::applied, item_struct::env, insert_item_before_item(), item_struct::inv, item_struct::locked, map, item_struct::next, item_struct::prev, item_struct::s_name, and item_struct::type.
Referenced by set_item_values().
|
static |
Definition at line 403 of file item.c.
Referenced by set_flag_string().
|
static |
Definition at line 27 of file item.c.
Referenced by AccountPlayersCmd(), locate_item(), pprof-latency::main(), map_item(), mapdata_alloc(), remove_item(), set_item_values(), update_character_choose(), and update_item_sort().
|
static |
Definition at line 27 of file item.c.
Referenced by animate_objects(), locate_item(), player_item(), remove_item(), and update_item().