… | |
… | |
177 | } |
177 | } |
178 | |
178 | |
179 | object * |
179 | object * |
180 | find_skill_by_name_fuzzy (object *who, const char *name) |
180 | find_skill_by_name_fuzzy (object *who, const char *name) |
181 | { |
181 | { |
182 | if (!name) |
182 | if (name) |
183 | return 0; |
|
|
184 | |
|
|
185 | for (object *tmp = who->inv; tmp; tmp = tmp->below) |
183 | for (object *tmp = who->inv; tmp; tmp = tmp->below) |
186 | if ((tmp->type == SKILL || tmp->type == SKILL_TOOL) |
184 | if ((tmp->type == SKILL || tmp->type == SKILL_TOOL) |
187 | && tmp->skill.starts_with (name)) |
185 | && tmp->skill.starts_with (name)) |
188 | if (object *skop = find_skill_by_name (who, tmp->skill)) |
186 | if (object *skop = find_skill_by_name (who, tmp->skill)) |
189 | return skop; |
187 | return skop; |
190 | |
188 | |
191 | return 0; |
189 | return 0; |
192 | } |
190 | } |
193 | |
191 | |
194 | /* This returns the skill pointer of the given name (the |
192 | /* This returns the skill pointer of the given name (the |