--- deliantra/server/common/recipe.C 2007/01/27 02:19:36 1.15 +++ deliantra/server/common/recipe.C 2007/02/08 03:09:31 1.17 @@ -153,7 +153,7 @@ while (*cp == ' ') /* Skip blanks */ cp++; - if (!strncmp (cp, "Object", 6)) + if (!strncmp (cp, "Object", 6) || !strncmp (cp, "object", 6)) { formula = get_empty_formula (); formula->title = strchr (cp, ' ') + 1; @@ -424,10 +424,12 @@ mult = 10 * mult + (*name - '0'); name++; } + if (mult > 0) name++; else mult = 1; + /* first, try to match the name of an archetype */ for (at = first_archetype; at != NULL; at = at->next) { @@ -441,6 +443,7 @@ if (!strcasecmp (at->clone.name, name)) return mult * at->clone.value; } + /* second, try to match an artifact ("arch of something") */ cp = strstr (name, " of "); if (cp != NULL) @@ -464,9 +467,10 @@ } } } + /* third, try to match a body part ("arch's something") */ cp = strstr (name, "'s "); - if (cp != NULL) + if (cp) { strcpy (part1, name); part1[cp - name] = '\0'; @@ -483,6 +487,7 @@ } } } + /* failed to find any matching items -- formula should be checked */ return -1; }