--- deliantra/server/include/object.h 2008/04/10 15:35:16 1.155 +++ deliantra/server/include/object.h 2008/04/15 03:16:02 1.159 @@ -98,6 +98,27 @@ UUID (uint64 seq) : seq(seq) { } operator uint64() { return seq; } void operator =(uint64 seq) { this->seq = seq; } + + typedef char BUF [32]; + + bool parse (const char *s) + { + return sscanf (s, "<1.%" SCNx64 ">", &seq) == 1; + } + + const char *c_str (char *buf, int len) const + { + snprintf (buf, len, "<1.%" PRIx64 ">", seq); + + return buf; + } + + const char *c_str () const + { + static BUF buf; + + return c_str (buf, sizeof (buf)); + } }; /* Definition for WILL_APPLY values. Replaces having harcoded values @@ -450,7 +471,7 @@ MTH void activate_recursive (); MTH void deactivate_recursive (); - // set the givne flag on all objects in the inventory recursively + // set the given flag on all objects in the inventory recursively MTH void set_flag_inv (int flag, int value = 1); void enter_exit (object *exit);//Perl @@ -553,7 +574,7 @@ typedef struct oblinkpt { /* Used to link together several object links */ struct oblnk *link; - long value; /* Used as connected value in buttons/gates */ + sint32 value; /* Used as connected value in buttons/gates */ struct oblinkpt *next; } oblinkpt;