ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/recipe.c
(Generate patch)

Comparing deliantra/server/common/recipe.c (file contents):
Revision 1.1.1.1 by root, Fri Feb 3 07:11:40 2006 UTC vs.
Revision 1.1.1.2 by elmex, Wed Feb 22 18:01:23 2006 UTC

74} 74}
75 75
76/* check_recipe() - makes sure we actually have the requested artifact 76/* check_recipe() - makes sure we actually have the requested artifact
77 * and archetype. */ 77 * and archetype. */
78 78
79static int check_recipe(recipe *rp) { 79static int check_recipe(const recipe *rp) {
80 size_t i; 80 size_t i;
81 int result; 81 int result;
82 82
83 result = 1; 83 result = 1;
84 for (i = 0; i < rp->arch_names; i++) { 84 for (i = 0; i < rp->arch_names; i++) {
282} 282}
283 283
284/* Find a treasure with a matching name. The 'depth' parameter is 284/* Find a treasure with a matching name. The 'depth' parameter is
285 * only there to prevent infinite loops in treasure lists (a list 285 * only there to prevent infinite loops in treasure lists (a list
286 * referencing another list pointing back to the first one). */ 286 * referencing another list pointing back to the first one). */
287archetype *find_treasure_by_name (treasure *t, const char *name, int depth) 287archetype *find_treasure_by_name (const treasure *t, const char *name, int depth)
288{ 288{
289 treasurelist *tl; 289 treasurelist *tl;
290 archetype *at; 290 archetype *at;
291 291
292 if (depth > 10) 292 if (depth > 10)
523 cp++; len--; 523 cp++; len--;
524 } 524 }
525 return val*mult; 525 return val*mult;
526} 526}
527 527
528artifact * locate_recipe_artifact(recipe *rp, size_t idx) { 528artifact * locate_recipe_artifact(const recipe *rp, size_t idx) {
529 object *item=get_archetype(rp->arch_name[idx]); 529 object *item=get_archetype(rp->arch_name[idx]);
530 artifactlist *at=NULL; 530 artifactlist *at=NULL;
531 artifact *art=NULL; 531 artifact *art=NULL;
532 532
533 if(!item) return (artifact *) NULL; 533 if(!item) return (artifact *) NULL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines