--- deliantra/server/common/recipe.C 2007/01/27 02:19:36 1.15 +++ deliantra/server/common/recipe.C 2007/02/05 01:24:45 1.16 @@ -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; }