14 #include "../clib/clib_endian.h" 15 #include "../clib/logfacility.h" 16 #include "../clib/rawtypes.h" 43 if ( target_cursor_serial == 0 ||
50 if ( tcursor != targetter->
tcursor2 )
53 <<
" used out of sequence cursor.\n";
119 throw std::runtime_error(
"Too many targetting cursors!" );
140 msg->Write<
u8>( crstype );
142 msg.
Send( client,
sizeof msg->buffer );
165 if ( chr->
client !=
nullptr )
173 if ( chr->
client !=
nullptr )
190 if ( targeted !=
nullptr )
225 ( *func )( chr, msg );
231 bool inform_on_cancel )
238 if ( msgin ==
nullptr )
240 ( *func )( chr, nullptr );
248 bool additlegal =
false;
249 if ( uobj ==
nullptr )
252 if ( uobj ==
nullptr )
255 if ( uobj ==
nullptr )
257 if ( chr->
client !=
nullptr )
260 ( *func )( chr, nullptr );
266 if ( chr->
client !=
nullptr )
269 ( *func )( chr, nullptr );
273 ( *func )( chr, uobj );
280 bool inform_on_cancel )
287 if ( msgin ==
nullptr )
289 ( *func )( chr, nullptr );
297 bool additlegal =
false;
298 if ( uobj ==
nullptr )
301 if ( uobj ==
nullptr )
304 if ( uobj ==
nullptr )
306 if ( chr->
client !=
nullptr )
309 ( *func )( chr, nullptr );
313 ( *func )( chr, uobj );
319 bool inform_on_cancel )
333 msg.
Send( client,
sizeof msg->buffer );
345 ( *func_ )( chr, msg );
355 int flags,
s16 xoffset,
s16 yoffset,
u32 hue )
358 msg->Write<
u8>( 0x1u );
364 msg->WriteFlipped<
u16>( multiid );
365 msg->WriteFlipped<
s16>( xoffset );
366 msg->WriteFlipped<
s16>( yoffset );
369 msg->WriteFlipped<
u32>( hue );
376 ( *func_ )( chr, msg );
388 if ( msgin ==
nullptr )
392 if ( chr !=
nullptr )
393 ( *func )( targetter, chr );
397 bool inform_on_cancel )
404 if ( msgin ==
nullptr )
406 ( *func )( targetter, nullptr );
414 ( *func )( targetter, obj );
418 ( *func )( targetter, nullptr );
void handle_script_cursor(Character *chr, UObject *obj)
void cancel(Mobile::Character *chr)
void handle_target_cursor(Mobile::Character *targetter, PKTBI_6C *msg)
void handle_target_cursor(Network::Client *client, PKTBI_6C *msg)
UObject * system_find_object(u32 serial)
void start_packetlog(Mobile::Character *looker, Mobile::Character *mob)
LosCheckedTargetCursor(void(*func)(Mobile::Character *, UObject *), bool inform_on_cancel=false)
void stop_packetlog(Mobile::Character *looker, Mobile::Character *mob)
MultiPlacementCursor(void(*func)(Mobile::Character *, PKTBI_6C *msg))
const int CRMULTI_FACING_MASK
virtual void on_target_cursor(Mobile::Character *, PKTBI_6C *msg) POL_OVERRIDE
bool target_cursor_busy() const
void show_repdata(Mobile::Character *looker, Mobile::Character *mob)
NoLosCharacterCursor(void(*func)(Mobile::Character *targetter, Mobile::Character *targetted))
bool is_visible_to_me(const Character *chr) const
Core::TargetCursor * tcursor2
TargetCursor(bool inform_on_cancel)
Item * find_legal_item(const Character *chr, u32 serial, bool *additlegal, bool *isRemoteContainer)
void(* func)(Mobile::Character *targetter, PKTBI_6C *msg)
void handle_ident_cursor(Mobile::Character *chr, PKTBI_6C *msgin)
virtual bool script_isa(unsigned isatype) const
bool can_freemove() const
bool private_say_above(Character *chr, const UObject *obj, const char *text, unsigned short font, unsigned short color, unsigned int journal_print)
void(* func)(Mobile::Character *, UObject *targetted)
Multi::UMulti * system_find_multi(u32 serial)
bool send_coord_cursor(Network::Client *client)
virtual void on_target_cursor(Mobile::Character *, PKTBI_6C *msg) POL_OVERRIDE
LosCheckedCoordCursor(void(*func)(Mobile::Character *, PKTBI_6C *msg), bool inform_on_cancel=false)
virtual void on_target_cursor(Mobile::Character *targetter, PKTBI_6C *msg) POL_OVERRIDE
void Send(Client *client, int len=-1) const
bool has_los(const Core::ULWObject &att, const Core::ULWObject &tgt) const
void(* func_)(Mobile::Character *, PKTBI_6C *)
virtual UObject * toplevel_owner()
const unsigned POLCLASS_MOBILE
Mobile::Character * find_character(u32 serial)
const int CRMULTI_FACING_SHIFT
void send_placemulti(Network::Client *client, unsigned int objtype, int flags, s16 xoffset, s16 yoffset, u32 hue)
void handle_add_member_cursor(Mobile::Character *chr, PKTBI_6C *msgin)
virtual void on_target_cursor(Mobile::Character *targetter, PKTBI_6C *msg)=0
void handle_remove_member_cursor(Mobile::Character *chr, PKTBI_6C *msgin)
virtual void on_target_cursor(Mobile::Character *chr, PKTBI_6C *msg) POL_OVERRIDE
NoLosUObjectCursor(void(*func)(Mobile::Character *, UObject *), bool inform_on_cancel=false)
FullMsgTargetCursor(void(*func)(Mobile::Character *, PKTBI_6C *))
const MultiDesc & find_multidesc(u32 objtype)
std::array< TargetCursor *, 10 > _target_cursors
bool send_object_cursor(Network::Client *client, PKTBI_6C::CURSOR_TYPE crstype=PKTBI_6C::CURSOR_TYPE_NEUTRAL)
static bool RunNoCombatCheck(Network::Client *client)
virtual void on_target_cursor(Mobile::Character *, PKTBI_6C *msg) POL_OVERRIDE
virtual void on_target_cursor(Mobile::Character *, PKTBI_6C *msg) POL_OVERRIDE
virtual std::string name() const
virtual void on_target_cursor(Mobile::Character *, PKTBI_6C *msg) POL_OVERRIDE
NoLosCheckedTargetCursor(void(*func)(Mobile::Character *, UObject *), bool inform_on_cancel=false)
void handle_coord_cursor(Character *chr, PKTBI_6C *msg)
const unsigned POLCLASS_NPC
void send_sysmessage(Network::Client *client, const char *text, unsigned short font, unsigned short color)
void(* func)(Mobile::Character *, UObject *targetted)
void(* func)(Mobile::Character *targetter, Mobile::Character *targetted)
UObject * find_toplevel_object(u32 serial)