… | |
… | |
903 | spell = arch_to_object (spell_ob->other_arch); |
903 | spell = arch_to_object (spell_ob->other_arch); |
904 | |
904 | |
905 | /* Always cast spell on caster */ |
905 | /* Always cast spell on caster */ |
906 | success = cast_spell (op, caster, dir, spell, stringarg); |
906 | success = cast_spell (op, caster, dir, spell, stringarg); |
907 | |
907 | |
908 | if (caster->contr->party == NULL) |
908 | if (!op->contr || !op->contr->party) |
909 | { |
909 | { |
910 | spell->remove (); |
910 | spell->remove (); |
911 | return success; |
911 | return success; |
912 | } |
912 | } |
913 | |
913 | |
914 | for_all_players (pl) |
914 | for_all_players (pl) |
915 | if ((pl->ob->contr->party == caster->contr->party) && (on_same_map (pl->ob, caster))) |
915 | if ((pl->ob->contr->party == op->contr->party) && (on_same_map (pl->ob, caster))) |
916 | cast_spell (pl->ob, caster, pl->ob->facing, spell, stringarg); |
916 | cast_spell (pl->ob, caster, pl->ob->facing, spell, stringarg); |
917 | |
917 | |
918 | spell->remove (); |
918 | spell->remove (); |
919 | return success; |
919 | return success; |
920 | } |
920 | } |