… | |
… | |
726 | send_query (client *ns, uint8 flags, const char *text) |
726 | send_query (client *ns, uint8 flags, const char *text) |
727 | { |
727 | { |
728 | ns->send_packet_printf ("query %d %s", flags, text ? text : ""); |
728 | ns->send_packet_printf ("query %d %s", flags, text ? text : ""); |
729 | } |
729 | } |
730 | |
730 | |
|
|
731 | /** |
|
|
732 | * Get player's current range attack in obuf. |
|
|
733 | */ |
|
|
734 | static void |
|
|
735 | rangetostring (object *ob, char *obuf) |
|
|
736 | { |
|
|
737 | dynbuf_text buf; |
|
|
738 | |
|
|
739 | player *pl = ob->contr; |
|
|
740 | |
|
|
741 | if (pl->ranged_ob) |
|
|
742 | buf << " Range: " << pl->ranged_ob->name; |
|
|
743 | |
|
|
744 | if (pl->combat_ob) |
|
|
745 | buf << " Combat: " << pl->combat_ob->name; |
|
|
746 | |
|
|
747 | if (pl->golem) |
|
|
748 | buf << " Golem: " << pl->golem->name; |
|
|
749 | |
|
|
750 | buf.linearise (obuf); |
|
|
751 | obuf [buf.size ()] = 0; |
|
|
752 | } |
|
|
753 | |
731 | #define AddIfInt64(Old,New,Type) if (Old != New) {\ |
754 | #define AddIfInt64(Old,New,Type) if (Old != New) {\ |
732 | Old = New; \ |
755 | Old = New; \ |
733 | sl << uint8 (Type) << uint64 (New); \ |
756 | sl << uint8 (Type) << uint64 (New); \ |
734 | } |
757 | } |
735 | |
758 | |