ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/alchemy.C
(Generate patch)

Comparing deliantra/server/server/alchemy.C (file contents):
Revision 1.38 by sf-marcmagus, Fri Oct 9 22:46:39 2009 UTC vs.
Revision 1.39 by sf-marcmagus, Fri Oct 9 23:00:39 2009 UTC

427 if (rp->transmute) /* look for matching ingredient/prod archs */ 427 if (rp->transmute) /* look for matching ingredient/prod archs */
428 for (object *item = first_ingred; item; item = item->below) 428 for (object *item = first_ingred; item; item = item->below)
429 { 429 {
430 for (int i = 0; i < rp->arch_names; i++) 430 for (int i = 0; i < rp->arch_names; i++)
431 //TODO: should be a shstr comparison 431 //TODO: should be a shstr comparison
432 if (&item->arch->archname == rp->arch_name[i]) 432 if (!strcmp(&item->arch->archname,rp->arch_name[i]))
433 { 433 {
434 *rp_arch_index = i; 434 *rp_arch_index = i;
435 prod_item = item; 435 prod_item = item;
436 break; 436 break;
437 } 437 }
450 { 450 {
451 LOG (llevDebug, " had item: arch %s(nrof:%d)\n", 451 LOG (llevDebug, " had item: arch %s(nrof:%d)\n",
452 &prod_item->arch->archname, prod_item->nrof); 452 &prod_item->arch->archname, prod_item->nrof);
453 } 453 }
454#endif 454#endif
455 if (!prod_item)
455 *rp_arch_index = rndm (rp->arch_names); 456 *rp_arch_index = rndm (rp->arch_names);
456 prod_item = get_archetype (rp->arch_name[*rp_arch_index]); 457 prod_item = get_archetype (rp->arch_name[*rp_arch_index]);
457 } 458 }
458 459
459#ifdef ALCHEMY_DEBUG 460#ifdef ALCHEMY_DEBUG
460 LOG (llevDebug, "recipe calls for%stransmution.\n", rp->transmute ? " " : " no "); 461 LOG (llevDebug, "recipe calls for%stransmution.\n", rp->transmute ? " " : " no ");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines