… | |
… | |
399 | if (flags & UPD_FLAGS) |
399 | if (flags & UPD_FLAGS) |
400 | sl << uint32 (query_flags (op)); |
400 | sl << uint32 (query_flags (op)); |
401 | |
401 | |
402 | if (flags & UPD_WEIGHT) |
402 | if (flags & UPD_WEIGHT) |
403 | { |
403 | { |
404 | sint32 weight = op->flag [FLAG_NO_PICK] ? -1 : op->client_weight (); |
404 | sint32 weight = op->client_weight (); |
405 | |
405 | |
406 | if (op) |
406 | if (op == pl) |
407 | ns->last_weight = weight; |
407 | ns->last_weight = weight; |
408 | |
408 | |
409 | sl << uint32 (weight); |
409 | sl << uint32 (weight); |
410 | } |
410 | } |
411 | |
411 | |
… | |
… | |
597 | |
597 | |
598 | if (object *op = esrv_get_ob_from_count (pl->ob, tag)) |
598 | if (object *op = esrv_get_ob_from_count (pl->ob, tag)) |
599 | { |
599 | { |
600 | std::string s = op->describe (pl->ob); |
600 | std::string s = op->describe (pl->ob); |
601 | |
601 | |
602 | if (msg_is_special (s.c_str (), false)) |
|
|
603 | cfperl_expand_cfpod (pl, s); |
|
|
604 | |
|
|
605 | packet sl ("ex"); |
602 | packet sl ("ex"); |
606 | sl << ber32 (tag) << s.c_str (); |
603 | sl << ber32 (tag) |
|
|
604 | << data (*pl->expand_cfpod (s.c_str ())); |
607 | |
605 | |
608 | pl->ns->send_packet (sl); |
606 | pl->ns->send_packet (sl); |
609 | } |
607 | } |
610 | } |
608 | } |
611 | |
609 | |
… | |
… | |
696 | { |
694 | { |
697 | if (tmp->invisible && !QUERY_FLAG (ob, FLAG_WIZ)) |
695 | if (tmp->invisible && !QUERY_FLAG (ob, FLAG_WIZ)) |
698 | continue; |
696 | continue; |
699 | |
697 | |
700 | if (QUERY_FLAG (ob, FLAG_WIZ)) |
698 | if (QUERY_FLAG (ob, FLAG_WIZ)) |
701 | buf.printf ("- %s (%d).\n", query_name (tmp), tmp->count); |
699 | buf.printf (" - %s (%d).\n", query_name (tmp), tmp->count); |
702 | else |
700 | else |
703 | buf.printf ("- %s.\n", query_name (tmp)); |
701 | buf.printf (" - %s.\n", query_name (tmp)); |
704 | |
702 | |
705 | object *head = tmp->head_ (); |
703 | object *head = tmp->head_ (); |
706 | |
704 | |
707 | if (head->inv) |
705 | if (head->inv) |
708 | if ((head->type != CONTAINER && head->type != FLESH) |
706 | if ((head->type != CONTAINER && head->type != FLESH) |
709 | || QUERY_FLAG (ob, FLAG_WIZ)) |
707 | || QUERY_FLAG (ob, FLAG_WIZ)) |
710 | buf << head->query_inventory (ob, " "); |
708 | buf << head->query_inventory (ob, " "); |
711 | |
709 | |
712 | 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 */ |
713 | break; |
711 | break; |
714 | } |
712 | } |
715 | |
713 | |
… | |
… | |
731 | |
729 | |
732 | int dy = atoi (cp); |
730 | int dy = atoi (cp); |
733 | |
731 | |
734 | if (player *opl = pl->observe->contr) |
732 | if (player *opl = pl->observe->contr) |
735 | if (client *ns = opl->ns) |
733 | if (client *ns = opl->ns) |
736 | { |
734 | if (opl->blocked_los (dx, dy) >= LOS_MAX) |
737 | if (fabs (dx) > ns->mapx / 2 || fabs (dy) > ns->mapy / 2) |
|
|
738 | return; |
735 | return; |
739 | |
|
|
740 | if (opl->blocked_los[dx + ns->mapx / 2][dy + ns->mapy / 2]) |
|
|
741 | return; |
|
|
742 | } |
|
|
743 | |
736 | |
744 | look_at (pl, dx, dy); |
737 | look_at (pl, dx, dy); |
745 | } |
738 | } |
746 | |
739 | |
747 | /** Move an object to a new location */ |
740 | /** Move an object to a new location */ |