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

Comparing deliantra/server/server/spell_util.C (file contents):
Revision 1.97 by root, Sat Jun 27 03:51:05 2009 UTC vs.
Revision 1.98 by root, Sun Oct 4 19:49:12 2009 UTC

889} 889}
890 890
891int 891int
892cast_party_spell (object *op, object *caster, int dir, object *spell_ob, char *spellparam) 892cast_party_spell (object *op, object *caster, int dir, object *spell_ob, char *spellparam)
893{ 893{
894 int success;
895 object *spell;
896
897 if (!spell_ob->other_arch) 894 if (!spell_ob->other_arch)
898 { 895 {
899 LOG (llevError, "cast_party_spell: empty other arch\n"); 896 LOG (llevError, "cast_party_spell: empty other arch\n");
900 return 0; 897 return 0;
901 } 898 }
902 899
903 spell = arch_to_object (spell_ob->other_arch); 900 object *spell = arch_to_object (spell_ob->other_arch);
904 901
905 /* Always cast spell on caster */ 902 /* Always cast spell on caster */
906 success = cast_spell (op, caster, dir, spell, spellparam); 903 int success = cast_spell (op, caster, dir, spell, spellparam);
907 904
908 if (!op->contr || !op->contr->party) 905 if (!op->contr || !op->contr->party)
909 { 906 {
910 spell->remove (); 907 spell->remove ();
911 return success; 908 return success;
912 } 909 }
913 910
914 for_all_players (pl) 911 for_all_players (pl)
915 if ((pl->ob->contr->party == op->contr->party) && (on_same_map (pl->ob, caster))) 912 if ((pl->ob->contr->party == op->contr->party)
913 && on_same_map (pl->ob, op)
914 && pl->ob != op)
916 cast_spell (pl->ob, caster, pl->ob->facing, spell, spellparam); 915 cast_spell (pl->ob, caster, pl->ob->facing, spell, spellparam);
917 916
918 spell->remove (); 917 spell->remove ();
919 return success; 918 return success;
920} 919}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines