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

Comparing deliantra/server/server/attack.C (file contents):
Revision 1.57 by root, Fri Apr 27 17:16:13 2007 UTC vs.
Revision 1.58 by root, Sun Apr 29 03:44:36 2007 UTC

779 if ((hitter->type == PLAYER) && (hitter->casting_time > -1)) 779 if ((hitter->type == PLAYER) && (hitter->casting_time > -1))
780 { 780 {
781 hitter->casting_time = -1; 781 hitter->casting_time = -1;
782 new_draw_info (NDI_UNIQUE, 0, hitter, "You attacked and lost your spell!"); 782 new_draw_info (NDI_UNIQUE, 0, hitter, "You attacked and lost your spell!");
783 } 783 }
784
784 if ((op->casting_time > -1) && (hitdam > 0)) 785 if ((op->casting_time > -1) && (hitdam > 0))
785 { 786 {
786 op->casting_time = -1; 787 op->casting_time = -1;
787 if (op->type == PLAYER) 788 if (op->type == PLAYER)
788 { 789 {
789 new_draw_info (NDI_UNIQUE, 0, op, "You were hit and lost your spell!"); 790 new_draw_info (NDI_UNIQUE, 0, op, "You were hit and lost your spell!");
790 new_draw_info_format (NDI_ALL | NDI_UNIQUE, 5, NULL, "%s was hit by %s and lost a spell.", &op_name, &hitter->name); 791 new_draw_info_format (NDI_ALL | NDI_UNIQUE, 5, NULL, "%s was hit by %s and lost a spell.", &op_name, &hitter->name);
791 } 792 }
792 } 793 }
793 } 794 }
795
794 if (!simple_attack) 796 if (!simple_attack)
795 { 797 {
796 /* If you hit something, the victim should *always* wake up. 798 /* If you hit something, the victim should *always* wake up.
797 * Before, invisible hitters could avoid doing this. 799 * Before, invisible hitters could avoid doing this.
798 * -b.t. */ 800 * -b.t. */
869} 871}
870 872
871int 873int
872attack_ob (object *op, object *hitter) 874attack_ob (object *op, object *hitter)
873{ 875{
874
875 if (hitter->head)
876 hitter = hitter->head; 876 hitter = hitter->head_ ();
877
877 return attack_ob_simple (op, hitter, hitter->stats.dam, hitter->stats.wc); 878 return attack_ob_simple (op, hitter, hitter->stats.dam, hitter->stats.wc);
878} 879}
879 880
880/* op is the arrow, tmp is what is stopping the arrow. 881/* op is the arrow, tmp is what is stopping the arrow.
881 * 882 *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines