… | |
… | |
164 | sl << uint8 (anim_speed) |
164 | sl << uint8 (anim_speed) |
165 | << uint32 (head->nrof); |
165 | << uint32 (head->nrof); |
166 | |
166 | |
167 | if (ns.itemcmd == 2) |
167 | if (ns.itemcmd == 2) |
168 | sl << uint16 (head->client_type); |
168 | sl << uint16 (head->client_type); |
169 | |
|
|
170 | SET_FLAG (head, FLAG_CLIENT_SENT); |
|
|
171 | } |
169 | } |
172 | |
170 | |
173 | static faceidx |
171 | static faceidx |
174 | need_face_now (player *pl, const char *name) |
172 | need_face_now (player *pl, const char *name) |
175 | { |
173 | { |
… | |
… | |
384 | return; |
382 | return; |
385 | |
383 | |
386 | client *ns = pl->contr->ns; |
384 | client *ns = pl->contr->ns; |
387 | if (!ns) |
385 | if (!ns) |
388 | return; |
386 | return; |
389 | |
|
|
390 | if (!QUERY_FLAG (op, FLAG_CLIENT_SENT)) |
|
|
391 | /* FLAG_CLIENT_SENT is debug only. We are using it to see where |
|
|
392 | * this is happening - we can set a breakpoint here in the debugger |
|
|
393 | * and track back the call. |
|
|
394 | */ |
|
|
395 | LOG (llevDebug | logBacktrace, "We have not sent item %s (%d)\n", &op->name, op->count); |
|
|
396 | |
387 | |
397 | packet sl ("upditem"); |
388 | packet sl ("upditem"); |
398 | |
389 | |
399 | sl << uint8 (flags); |
390 | sl << uint8 (flags); |
400 | |
391 | |
… | |
… | |
509 | sl << uint32 (op->env ? op->env->count : 0); |
500 | sl << uint32 (op->env ? op->env->count : 0); |
510 | |
501 | |
511 | add_object_to_socklist (*pl->contr->ns, sl, op); |
502 | add_object_to_socklist (*pl->contr->ns, sl, op); |
512 | |
503 | |
513 | pl->contr->ns->send_packet (sl); |
504 | pl->contr->ns->send_packet (sl); |
514 | SET_FLAG (op, FLAG_CLIENT_SENT); |
|
|
515 | } |
505 | } |
516 | |
506 | |
517 | /** |
507 | /** |
518 | * Tells the client to delete an item. |
508 | * Tells the client to delete an item. |
519 | */ |
509 | */ |
… | |
… | |
607 | |
597 | |
608 | if (object *op = esrv_get_ob_from_count (pl->ob, tag)) |
598 | if (object *op = esrv_get_ob_from_count (pl->ob, tag)) |
609 | { |
599 | { |
610 | std::string s = op->describe (pl->ob); |
600 | std::string s = op->describe (pl->ob); |
611 | |
601 | |
612 | if (msg_is_special (s.c_str (), false)) |
|
|
613 | cfperl_expand_cfpod (pl, s); |
|
|
614 | |
|
|
615 | packet sl ("ex"); |
602 | packet sl ("ex"); |
616 | sl << ber32 (tag) << s.c_str (); |
603 | sl << ber32 (tag) |
|
|
604 | << data (*pl->expand_cfpod (s.c_str ())); |
617 | |
605 | |
618 | pl->ns->send_packet (sl); |
606 | pl->ns->send_packet (sl); |
619 | } |
607 | } |
620 | } |
608 | } |
621 | |
609 | |
… | |
… | |
706 | { |
694 | { |
707 | if (tmp->invisible && !QUERY_FLAG (ob, FLAG_WIZ)) |
695 | if (tmp->invisible && !QUERY_FLAG (ob, FLAG_WIZ)) |
708 | continue; |
696 | continue; |
709 | |
697 | |
710 | if (QUERY_FLAG (ob, FLAG_WIZ)) |
698 | if (QUERY_FLAG (ob, FLAG_WIZ)) |
711 | buf.printf ("- %s (%d).\n", query_name (tmp), tmp->count); |
699 | buf.printf (" - %s (%d).\n", query_name (tmp), tmp->count); |
712 | else |
700 | else |
713 | buf.printf ("- %s.\n", query_name (tmp)); |
701 | buf.printf (" - %s.\n", query_name (tmp)); |
714 | |
702 | |
715 | object *head = tmp->head_ (); |
703 | object *head = tmp->head_ (); |
716 | |
704 | |
717 | if (head->inv) |
705 | if (head->inv) |
718 | if ((head->type != CONTAINER && head->type != FLESH) |
706 | if ((head->type != CONTAINER && head->type != FLESH) |
719 | || QUERY_FLAG (ob, FLAG_WIZ)) |
707 | || QUERY_FLAG (ob, FLAG_WIZ)) |
720 | buf << head->query_inventory (ob, " "); |
708 | buf << head->query_inventory (ob, " "); |
721 | |
709 | |
722 | if (QUERY_FLAG (tmp, FLAG_IS_FLOOR) && !QUERY_FLAG (ob, FLAG_WIZ)) /* don't continue under the floor */ |
710 | if (QUERY_FLAG (tmp, FLAG_IS_FLOOR) && !QUERY_FLAG (ob, FLAG_WIZ)) /* don't continue under the floor */ |
723 | break; |
711 | break; |
724 | } |
712 | } |
725 | |
713 | |