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

Comparing deliantra/server/common/button.C (file contents):
Revision 1.42 by root, Sun Apr 20 22:03:21 2008 UTC vs.
Revision 1.43 by root, Mon Apr 21 06:35:26 2008 UTC

376 376
377 /* Round up any sacrifices. Altars don't make change either */ 377 /* Round up any sacrifices. Altars don't make change either */
378 if (NROF_SACRIFICE (altar) % (*sacrifice)->value) 378 if (NROF_SACRIFICE (altar) % (*sacrifice)->value)
379 number++; 379 number++;
380 380
381 *sacrifice = decrease_ob_nr (*sacrifice, number); 381 if (!(*sacrifice)->decrease (number))
382 *sacrifice = 0;
382 } 383 }
383 else 384 else
384 *sacrifice = decrease_ob_nr (*sacrifice, NROF_SACRIFICE (altar)); 385 if (!(*sacrifice)->decrease (NROF_SACRIFICE (altar)))
386 *sacrifice = 0;
385 387
386 if (altar->msg) 388 if (altar->msg)
387 new_info_map (NDI_BLACK, altar->map, altar->msg); 389 new_info_map (NDI_BLACK, altar->map, altar->msg);
388 390
389 return 1; 391 return 1;
893 // and we have to set the value to 0 895 // and we have to set the value to 0
894 896
895 if (match && trig->last_sp) // match == having 897 if (match && trig->last_sp) // match == having
896 { 898 {
897 if (trig->last_heal) 899 if (trig->last_heal)
898 decrease_ob (match); 900 match->decrease ();
899 901
900 trig->value = (pl == op ? 1 : 0); // 1 if matching player entered, and 0 if he left 902 trig->value = (pl == op ? 1 : 0); // 1 if matching player entered, and 0 if he left
901 push_button (trig); 903 push_button (trig);
902 } 904 }
903 else if (!match && !trig->last_sp) // match == not having 905 else if (!match && !trig->last_sp) // match == not having

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines