ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/request.C
(Generate patch)

Comparing deliantra/server/socket/request.C (file contents):
Revision 1.90 by root, Fri Apr 27 00:49:58 2007 UTC vs.
Revision 1.92 by root, Mon Apr 30 17:39:59 2007 UTC

726send_query (client *ns, uint8 flags, const char *text) 726send_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 */
734static void
735rangetostring (object *ob, char *obuf)
736{
737 dynbuf_text buf;
738
739 player *pl = ob->contr;
740
741 if (pl->ranged_skill)
742 buf << " Range: "
743 << (pl->ranged_ob
744 ? pl->ranged_ob->name
745 : pl->ranged_skill->name);
746
747 if (pl->combat_skill)
748 buf << " Combat: "
749 << (pl->combat_ob
750 ? pl->combat_ob->name
751 : pl->combat_skill->name);
752
753 if (pl->golem)
754 buf << " Golem: " << pl->golem->name;
755
756 if (buf.empty ())
757 *obuf = 0;
758 else
759 memcpy (obuf, buf.linearise () + 1, buf.size () - 1);
760}
761
731#define AddIfInt64(Old,New,Type) if (Old != New) {\ 762#define AddIfInt64(Old,New,Type) if (Old != New) {\
732 Old = New; \ 763 Old = New; \
733 sl << uint8 (Type) << uint64 (New); \ 764 sl << uint8 (Type) << uint64 (New); \
734 } 765 }
735 766

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines