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

Comparing deliantra/server/server/shop.C (file contents):
Revision 1.20 by pippijn, Mon Dec 11 19:46:47 2006 UTC vs.
Revision 1.23 by root, Thu Dec 14 22:45:41 2006 UTC

590 { 590 {
591 // This should not happen, but if it does, just merge the two. 591 // This should not happen, but if it does, just merge the two.
592 if (coin_objs [i]) 592 if (coin_objs [i])
593 { 593 {
594 LOG (llevError, "%s has two money entries of (%s)\n", &pouch->name, coins[NUM_COINS - 1 - i]); 594 LOG (llevError, "%s has two money entries of (%s)\n", &pouch->name, coins[NUM_COINS - 1 - i]);
595 remove_ob (tmp); 595 tmp->remove ();
596 coin_objs[i]->nrof += tmp->nrof; 596 coin_objs[i]->nrof += tmp->nrof;
597 esrv_del_item (pl->contr, tmp->count); 597 esrv_del_item (pl->contr, tmp->count);
598 free_object (tmp); 598 tmp->destroy ();
599 } 599 }
600 else 600 else
601 { 601 {
602 remove_ob (tmp); 602 tmp->remove ();
603 603
604 if (pouch->type == PLAYER) 604 if (pouch->type == PLAYER)
605 esrv_del_item (pl->contr, tmp->count); 605 esrv_del_item (pl->contr, tmp->count);
606 606
607 coin_objs[i] = tmp; 607 coin_objs[i] = tmp;
666 666
667 if (pl->type != PLAYER) 667 if (pl->type != PLAYER)
668 esrv_send_item (pl, pl); 668 esrv_send_item (pl, pl);
669 } 669 }
670 else 670 else
671 free_object (coin_objs[i]); 671 coin_objs[i]->destroy ();
672 } 672 }
673} 673}
674 674
675/* Checks all unpaid items in op's inventory, adds up all the money they 675/* Checks all unpaid items in op's inventory, adds up all the money they
676 * have, and checks that they can actually afford what they want to buy. 676 * have, and checks that they can actually afford what they want to buy.
1178 case RING: 1178 case RING:
1179 case AMULET: 1179 case AMULET:
1180 case BRACERS: 1180 case BRACERS:
1181 case GIRDLE: 1181 case GIRDLE:
1182 sprintf (buf, "%s %s", query_base_name (tmp, 0), describe_item (tmp, NULL)); 1182 sprintf (buf, "%s %s", query_base_name (tmp, 0), describe_item (tmp, NULL));
1183 items[*numitems].item_sort = strdup_local (buf); 1183 items[*numitems].item_sort = strdup (buf);
1184 sprintf (buf, "%s %s", query_name (tmp), describe_item (tmp, NULL)); 1184 sprintf (buf, "%s %s", query_name (tmp), describe_item (tmp, NULL));
1185 items[*numitems].item_real = strdup_local (buf); 1185 items[*numitems].item_real = strdup (buf);
1186 (*numitems)++; 1186 (*numitems)++;
1187 break; 1187 break;
1188#endif 1188#endif
1189 1189
1190 default: 1190 default:
1191 items[*numitems].item_sort = strdup_local (query_base_name (tmp, 0)); 1191 items[*numitems].item_sort = strdup (query_base_name (tmp, 0));
1192 items[*numitems].item_real = strdup_local (query_base_name (tmp, 1)); 1192 items[*numitems].item_real = strdup (query_base_name (tmp, 1));
1193 (*numitems)++; 1193 (*numitems)++;
1194 break; 1194 break;
1195 } 1195 }
1196 SET_FLAG (tmp, FLAG_UNPAID); 1196 SET_FLAG (tmp, FLAG_UNPAID);
1197} 1197}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines