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.66 by root, Sun Apr 11 00:34:05 2010 UTC vs.
Revision 1.68 by root, Sat Apr 23 04:56:45 2011 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992 Frank Tore Johansen 6 * Copyright (©) 1992 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 9 * the terms of the Affero GNU General Public License as published by the
349 * objects on the same space that take the same sacrifice. 349 * objects on the same space that take the same sacrifice.
350 */ 350 */
351int 351int
352check_altar_sacrifice (object *altar, object *sacrifice, object *originator) 352check_altar_sacrifice (object *altar, object *sacrifice, object *originator)
353{ 353{
354 if (sacrifice->flag [FLAG_UNPAID]) 354 if (sacrifice->flag [FLAG_UNPAID]
355 || sacrifice->flag [FLAG_IS_LINKED]
356 || sacrifice->is_player ())
355 return 0; 357 return 0;
356 358
357 if (is_match_expr (ARCH_SACRIFICE (altar))) 359 if (is_match_expr (ARCH_SACRIFICE (altar)))
358 return match (ARCH_SACRIFICE (altar), altar, originator); 360 return match (ARCH_SACRIFICE (altar), sacrifice, altar, originator);
359 361
360 if (!sacrifice->flag [FLAG_ALIVE] 362 if (!sacrifice->flag [FLAG_ALIVE])
361 && !sacrifice->flag [FLAG_IS_LINKED]
362 && sacrifice->type != PLAYER)
363 { 363 {
364 if (ARCH_SACRIFICE (altar) == shstr_money 364 if (ARCH_SACRIFICE (altar) == shstr_money
365 && sacrifice->type == MONEY 365 && sacrifice->type == MONEY
366 && sacrifice->nrof * sacrifice->value >= NROF_SACRIFICE (altar)) 366 && sacrifice->nrof * sacrifice->value >= NROF_SACRIFICE (altar))
367 return 1; 367 return 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines