--- deliantra/server/include/object.h 2008/12/28 06:59:27 1.192 +++ deliantra/server/include/object.h 2009/01/01 19:42:43 1.194 @@ -310,36 +310,36 @@ key_value *key_values; /* Fields not explictly known by the loader. */ // privates / perl - const shstr &kv_get (const shstr &key) const; - void kv_del (const shstr &key); - void kv_set (const shstr &key, const shstr &value); + shstr_tmp kv_get (shstr_tmp key) const; + void kv_del (shstr_tmp key); + void kv_set (shstr_tmp key, shstr_tmp value); // custom extra fields management struct key_value_access_proxy { object &ob; - shstr key; + shstr_tmp key; - key_value_access_proxy (object &ob, const shstr &key) + key_value_access_proxy (object &ob, shstr_tmp key) : ob (ob), key (key) { } - const key_value_access_proxy &operator =(const shstr &value) const + const key_value_access_proxy &operator =(shstr_tmp value) const { ob.kv_set (key, value); return *this; } - operator const shstr &() const { return ob.kv_get (key); } - operator const char *() const { return ob.kv_get (key); } + operator const shstr_tmp () const { return ob.kv_get (key); } + operator const char *() const { return ob.kv_get (key); } private: void operator =(int); }; // operator [] is too annoying to use - const key_value_access_proxy kv (const shstr &key) + const key_value_access_proxy kv (shstr_tmp key) { return key_value_access_proxy (*this, key); } @@ -414,8 +414,8 @@ open_container (0); } - MTH object *force_find (const shstr name); - MTH object *force_add (const shstr name, int duration = 0); + MTH object *force_find (shstr_tmp name); + MTH object *force_add (shstr_tmp name, int duration = 0); // overwrite the attachable should_invoke function with a version that also checks ev_want_type bool should_invoke (event_type event) @@ -707,8 +707,8 @@ struct oblinkpt *next; } oblinkpt; -object *find_skill_by_name (object *who, const char *name); -object *find_skill_by_name (object *who, const shstr &sh); +object *find_skill_by_name_fuzzy (object *who, const char *name); +object *find_skill_by_name (object *who, shstr_cmp sh); object *find_skill_by_number (object *who, int skillno); /*