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

Comparing deliantra/server/server/disease.C (file contents):
Revision 1.64 by root, Fri Apr 9 02:45:17 2010 UTC vs.
Revision 1.65 by root, Sun Apr 11 00:34:06 2010 UTC

233 233
234/* check if victim is susceptible to disease. */ 234/* check if victim is susceptible to disease. */
235static int 235static int
236is_susceptible_to_disease (object *victim, object *disease) 236is_susceptible_to_disease (object *victim, object *disease)
237{ 237{
238 if (!QUERY_FLAG (victim, FLAG_ALIVE)) 238 if (!victim->flag [FLAG_ALIVE])
239 return 0; 239 return 0;
240 240
241 if (victim->flag [FLAG_WIZ]) 241 if (victim->flag [FLAG_WIZ])
242 return 0; 242 return 0;
243 243
244 if (disease->race.contains ("*") && !QUERY_FLAG (victim, FLAG_UNDEAD)) 244 if (disease->race.contains ("*") && !victim->flag [FLAG_UNDEAD])
245 return 1; 245 return 1;
246 246
247 if ((disease->race == shstr_undead) && QUERY_FLAG (victim, FLAG_UNDEAD)) 247 if ((disease->race == shstr_undead) && victim->flag [FLAG_UNDEAD])
248 return 1; 248 return 1;
249 249
250 if ((victim->race && disease->race.contains (victim->race)) || disease->race.contains (victim->name)) 250 if ((victim->race && disease->race.contains (victim->race)) || disease->race.contains (victim->name))
251 return 1; 251 return 1;
252 252
370 symptom->msg = disease->msg; 370 symptom->msg = disease->msg;
371 symptom->attacktype = disease->attacktype; 371 symptom->attacktype = disease->attacktype;
372 symptom->other_arch = disease->other_arch; 372 symptom->other_arch = disease->other_arch;
373 } 373 }
374 374
375 SET_FLAG (symptom, FLAG_APPLIED); 375 symptom->set_flag (FLAG_APPLIED);
376 victim->update_stats (); 376 victim->update_stats ();
377 377
378 return 1; 378 return 1;
379} 379}
380 380
435{ 435{
436 object *tmp; 436 object *tmp;
437 object *new_disease; 437 object *new_disease;
438 438
439 /* don't infect inanimate objects */ 439 /* don't infect inanimate objects */
440 if (!QUERY_FLAG (victim, FLAG_MONSTER) && !(victim->type == PLAYER)) 440 if (!victim->flag [FLAG_MONSTER] && !(victim->type == PLAYER))
441 return 0; 441 return 0;
442 442
443 /* check and see if victim can catch disease: diseases 443 /* check and see if victim can catch disease: diseases
444 * are specific 444 * are specific
445 */ 445 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines