version 1.77 | | version 1.78 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.77 2002/11/26 07:48:31 garbled Exp $"; | | * "$Id: attack.c,v 1.78 2002/11/26 08:48:20 garbled Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
if (get_attack_mode (&op, &hitter, &simple_attack)) | | if (get_attack_mode (&op, &hitter, &simple_attack)) |
goto error; | | goto error; |
| | |
#ifdef PLUGINS | | |
/* GROS: Handle for plugin attack event */ | | /* GROS: Handle for plugin attack event */ |
if(op->event_hook[EVENT_ATTACK] != NULL) | | if(op->event_hook[EVENT_ATTACK] != NULL) |
{ | | { |
| | |
} | | } |
}; | | }; |
}; | | }; |
#endif | | |
op_tag = op->count; | | op_tag = op->count; |
hitter_tag = hitter->count; | | hitter_tag = hitter->count; |
| | |
| | |
victim_y = victim->y; | | victim_y = victim->y; |
victim_tag = victim->count; | | victim_tag = victim->count; |
hitter_tag = hitter->count; | | hitter_tag = hitter->count; |
#ifdef PLUGINS | | |
/* GROS: Handling plugin attack event for thrown items */ | | /* GROS: Handling plugin attack event for thrown items */ |
if(op->event_hook[EVENT_ATTACK] != NULL) | | if(op->event_hook[EVENT_ATTACK] != NULL) |
{ | | { |
| | |
} | | } |
} | | } |
else | | else |
#endif | | |
| | |
hit_something = attack_ob_simple (victim, hitter, op->stats.dam, | | hit_something = attack_ob_simple (victim, hitter, op->stats.dam, |
op->stats.wc); | | op->stats.wc); |
| | |
int killed_script_rtn = 0; | | int killed_script_rtn = 0; |
object *owner=NULL, *old_skill; | | object *owner=NULL, *old_skill; |
int evtid; | | int evtid; |
| | |
#ifdef PLUGINS | | |
CFParm CFP; | | CFParm CFP; |
#endif | | |
if (op->stats.hp>=0) | | if (op->stats.hp>=0) |
return -1; | | return -1; |
| | |
| | |
#ifdef PLUGINS | | |
/* GROS: Handle for plugin death event */ | | /* GROS: Handle for plugin death event */ |
if(op->event_hook[EVENT_DEATH] != NULL) | | if(op->event_hook[EVENT_DEATH] != NULL) |
{ | | { |
| | |
CFP.Value[1] = (void *)(hitter); | | CFP.Value[1] = (void *)(hitter); |
CFP.Value[2] = (void *)(op); | | CFP.Value[2] = (void *)(op); |
GlobalEvent(&CFP); | | GlobalEvent(&CFP); |
#endif | | |
maxdam+=op->stats.hp+1; | | maxdam+=op->stats.hp+1; |
| | |
if(QUERY_FLAG(op,FLAG_BLOCKSVIEW)) | | if(QUERY_FLAG(op,FLAG_BLOCKSVIEW)) |