1 | |
1 | |
2 | /* |
2 | /* |
3 | * static char *rcs_treasure_c = |
3 | * static char *rcs_treasure_c = |
4 | * "$Id: treasure.c,v 1.4 2006/08/10 20:50:34 elmex Exp $"; |
4 | * "$Id: treasure.c,v 1.5 2006/08/11 12:40:22 elmex Exp $"; |
5 | */ |
5 | */ |
6 | |
6 | |
7 | /* |
7 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
8 | CrossFire, A Multiplayer game for X-windows |
9 | |
9 | |
… | |
… | |
838 | /* restore the item_power field to the object if we haven't changed it. |
838 | /* restore the item_power field to the object if we haven't changed it. |
839 | * we don't care about num_enchantments - that will basically just |
839 | * we don't care about num_enchantments - that will basically just |
840 | * have calculated some value from the base attributes of the archetype. |
840 | * have calculated some value from the base attributes of the archetype. |
841 | */ |
841 | */ |
842 | op->item_power = save_item_power; |
842 | op->item_power = save_item_power; |
|
|
843 | } |
|
|
844 | else |
|
|
845 | { |
|
|
846 | /* item_power was zero. This is suspicious, as it may be because it |
|
|
847 | * was never previously calculated. Let's compute a value and see if |
|
|
848 | * it is non-zero. If it indeed is, then assign it as the new |
|
|
849 | * item_power value. |
|
|
850 | * - gros, 21th of July 2006. |
|
|
851 | */ |
|
|
852 | op->item_power = calc_item_power(op,0); |
|
|
853 | save_item_power = op->item_power; /* Just in case it would get used |
|
|
854 | * again below */ |
843 | } |
855 | } |
844 | } |
856 | } |
845 | |
857 | |
846 | /* materialtype modifications. Note we allow this on artifacts. */ |
858 | /* materialtype modifications. Note we allow this on artifacts. */ |
847 | set_materialname (op, difficulty, NULL); |
859 | set_materialname (op, difficulty, NULL); |