--- deliantra/server/common/treasure.C 2008/09/29 10:31:32 1.81
+++ deliantra/server/common/treasure.C 2009/10/12 14:00:57 1.86
@@ -5,18 +5,19 @@
* Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992,2007 Frank Tore Johansen
*
- * Deliantra is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * Deliantra is free software: you can redistribute it and/or modify it under
+ * the terms of the Affero GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the Affero GNU General Public License
+ * and the GNU General Public License along with this program. If not, see
+ * .
*
* The authors can be reached via e-mail to
*/
@@ -250,14 +251,14 @@
//TODO: flag such as objects... as such (no drop, anybody?)
if (op->type == SPELL)
{
- op->destroy (true);
+ op->destroy ();
return;
}
op->expand_tail ();
if (!creator->is_on_map () || op->blocked (creator->map, creator->x, creator->y))
- op->destroy (true);
+ op->destroy ();
else
{
SET_FLAG (op, FLAG_OBJ_ORIGINAL);
@@ -442,7 +443,7 @@
if (ob->inv)
LOG (llevError, "In generate treasure, created multiple objects.\n");
- ob->destroy (true);
+ ob->destroy ();
return tmp;
}
@@ -998,8 +999,8 @@
}
}
- if (GET_ANIM_ID (op))
- SET_ANIMATION (op, rndm (NUM_ANIMATIONS (op)));
+ if (op->animation_id)
+ op->set_anim_frame (rndm (op->anim_frames ()));
break;
@@ -1568,9 +1569,11 @@
#endif
return;
}
- if (!strcmp (art->item->name, "NONE"))
+
+ if (art->item->name == shstr_NONE)
return;
- if (FABS (op->magic) < art->item->magic)
+
+ if (fabs (op->magic) < art->item->magic)
continue; /* Not magic enough to be this item */
/* Map difficulty not high enough */
@@ -1631,8 +1634,10 @@
/* if donor has some attacktypes, the flesh is poisonous */
if (donor->attacktype & AT_POISON)
item->type = POISON;
+
if (donor->attacktype & AT_ACID)
item->stats.hp = -1 * item->stats.food;
+
SET_FLAG (item, FLAG_NO_STEAL);
}
}
@@ -1679,7 +1684,7 @@
if (at->next) free_artifact (at->next);
if (at->allowed) free_charlinks (at->allowed);
- at->item->destroy (true);
+ at->item->destroy ();
sfree (at);
}