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

Comparing deliantra/server/server/gods.C (file contents):
Revision 1.38 by root, Thu Sep 25 04:09:57 2008 UTC vs.
Revision 1.39 by root, Mon Sep 29 10:20:49 2008 UTC

192 192
193 if (tmp->type == item->type 193 if (tmp->type == item->type
194 && same_string (tmp->name, item->name) 194 && same_string (tmp->name, item->name)
195 && same_string (tmp->title, item->title) && same_string (tmp->msg, item->msg) && same_string (tmp->slaying, item->slaying)) 195 && same_string (tmp->title, item->title) && same_string (tmp->msg, item->msg) && same_string (tmp->slaying, item->slaying))
196 { 196 {
197
198 /* message */ 197 /* message */
199 if (tmp->nrof > 1) 198 new_draw_info_format (NDI_UNIQUE, 0, op,
200 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s crumble to dust!", query_short_name (tmp)); 199 tmp->nrof > 1 ? "The %s crumble to dust!" : "The %s crumbles to dust!",
201 else 200 query_short_name (tmp));
202 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s crumbles to dust!", query_short_name (tmp));
203 201
204 tmp->destroy (); 202 tmp->destroy (true);
205 } 203 }
206 204
207 if (tmp->inv) 205 if (tmp->inv)
208 follower_remove_similar_item (tmp, item); 206 follower_remove_similar_item (tmp, item);
209 } 207 }
438 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "You lose knowledge of %s.", &item->name); 436 new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "You lose knowledge of %s.", &item->name);
439 esrv_remove_spell (op->contr, item); 437 esrv_remove_spell (op->contr, item);
440 } 438 }
441 439
442 player_unready_range_ob (op->contr, item); 440 player_unready_range_ob (op->contr, item);
443 item->destroy (); 441 item->destroy (true);
444 } 442 }
445 } 443 }
446 444
447 /* remove any godgiven items from the old god */ 445 /* remove any godgiven items from the old god */
448 if (old_god) 446 if (old_god)
852 /* Follower lacks the required grace for the following 850 /* Follower lacks the required grace for the following
853 * treasure list items. */ 851 * treasure list items. */
854 852
855 tmp = get_archetype (HOLY_POSSESSION); 853 tmp = get_archetype (HOLY_POSSESSION);
856 cast_change_ability (op, op, tmp, 0, 1); 854 cast_change_ability (op, op, tmp, 0, 1);
857 tmp->destroy (); 855 tmp->destroy (true);
858 return; 856 return;
859 } 857 }
860 858
861 continue; 859 continue;
862 } 860 }
899 /* Various heal spells */ 897 /* Various heal spells */
900 if (item->type == BOOK && item->invisible && strcmp (item->name, "heal spell") == 0) 898 if (item->type == BOOK && item->invisible && strcmp (item->name, "heal spell") == 0)
901 { 899 {
902 object *tmp = archetype::get (item->slaying); 900 object *tmp = archetype::get (item->slaying);
903 int success = cast_heal (op, op, tmp, 0); 901 int success = cast_heal (op, op, tmp, 0);
904 tmp->destroy (); 902 tmp->destroy (true);
905 903
906 if (success) 904 if (success)
907 return; 905 return;
908 else 906 else
909 continue; 907 continue;
948 946
949 for (i = 0; i < NUM_STATS; i++) 947 for (i = 0; i < NUM_STATS; i++)
950 if (depl->stats.stat (i)) 948 if (depl->stats.stat (i))
951 new_draw_info (NDI_UNIQUE, 0, op, restore_msg[i]); 949 new_draw_info (NDI_UNIQUE, 0, op, restore_msg[i]);
952 950
953 depl->destroy (); 951 depl->destroy (true);
954 op->update_stats (); 952 op->update_stats ();
955 return; 953 return;
956 } 954 }
957 955
958 /* Voices */ 956 /* Voices */
1155 if (!caster_is_spell) 1153 if (!caster_is_spell)
1156 new_draw_info (NDI_UNIQUE, 0, caster, "This prayer is useless unless you worship an appropriate god"); 1154 new_draw_info (NDI_UNIQUE, 0, caster, "This prayer is useless unless you worship an appropriate god");
1157 else 1155 else
1158 LOG (llevError, "BUG: tailor_god_spell(): no god\n"); 1156 LOG (llevError, "BUG: tailor_god_spell(): no god\n");
1159 1157
1160 spellop->destroy (); 1158 spellop->destroy (true);
1161 return 0; 1159 return 0;
1162 } 1160 }
1163 1161
1164 /* either holy word or godpower attacks will set the slaying field */ 1162 /* either holy word or godpower attacks will set the slaying field */
1165 if (spellop->attacktype & AT_HOLYWORD || spellop->attacktype & AT_GODPOWER) 1163 if (spellop->attacktype & AT_HOLYWORD || spellop->attacktype & AT_GODPOWER)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines