12 #include "../clib/clib_endian.h" 13 #include "../clib/logfacility.h" 14 #include "../clib/rawtypes.h" 44 if ( item ==
nullptr )
47 "Character 0x{:X} tried to equip item 0x{:X}, which did not exist in gotten_items.\n" )
53 if ( item->
serial != serial )
56 "Character 0x{:X} tried to equip item 0x{:X}, but had gotten item 0x{:X}\n" )
59 item->gotten_by(
nullptr );
67 item->gotten_by(
nullptr );
68 client->
chr->gotten_item(
nullptr );
71 if ( equip_on_serial == client->
chr->
serial )
73 equip_on = client->
chr;
78 if ( equip_on ==
nullptr || !client->
chr->
can_clothe( equip_on ) )
105 if ( client->
chr == equip_on )
134 if ( item->
container ==
nullptr && !item->has_gotten_by() )
138 if ( multi !=
nullptr )
142 equip_on->
equip( item );
void equip_item(Network::Client *client, PKTIN_13 *msg)
bool strong_enough_to_equip(const Items::Item *item) const
#define MOVE_ITEM_FAILURE_ALREADY_WORN
void send_item_move_failure(Network::Client *client, u8 reason)
void undo_get_item(Mobile::Character *chr, Items::Item *item)
#define MOVE_ITEM_FAILURE_ILLEGAL_EQUIP
bool check_equip_script(Mobile::Character *chr, bool startup)
Core::UContainer * container
Mobile::Character * find_character(u32 serial)
void equip(Items::Item *item)
ref_ptr< Items::Item > ItemRef
bool can_clothe(const Character *chr) const
void send_wornitem_to_inrange(const Character *chr, const Item *item)
bool check_equiptest_scripts(Mobile::Character *chr, bool startup=false)
bool equippable(const Items::Item *item) const
Multi::UMulti * find_supporting_multi(unsigned short x, unsigned short y, short z) const
virtual void unregister_object(UObject *obj)
bool layer_is_equipped(int layer) const
void send_sysmessage(Network::Client *client, const char *text, unsigned short font, unsigned short color)