… | |
… | |
342 | |
342 | |
343 | /* Unfortunately, set_owner does the wrong thing to the skills pointers |
343 | /* Unfortunately, set_owner does the wrong thing to the skills pointers |
344 | * resulting in exp going into the owners *current* chosen skill. |
344 | * resulting in exp going into the owners *current* chosen skill. |
345 | */ |
345 | */ |
346 | |
346 | |
347 | if (get_owner (disease)) |
347 | if (disease->owner) |
348 | { |
348 | { |
349 | set_owner (new_disease, disease->owner); |
349 | new_disease->set_owner (disease->owner); |
350 | |
350 | |
351 | /* Only need to update skill if different */ |
351 | /* Only need to update skill if different */ |
352 | if (new_disease->skill != disease->skill) |
352 | if (new_disease->skill != disease->skill) |
353 | new_disease->skill = disease->skill; |
353 | new_disease->skill = disease->skill; |
354 | } |
354 | } |
… | |
… | |
356 | { /* for diseases which are passed by hitting, set owner and praying skill */ |
356 | { /* for diseases which are passed by hitting, set owner and praying skill */ |
357 | if (disease->env && disease->env->type == PLAYER) |
357 | if (disease->env && disease->env->type == PLAYER) |
358 | { |
358 | { |
359 | object *player = disease->env; |
359 | object *player = disease->env; |
360 | |
360 | |
361 | set_owner (new_disease, player); |
361 | new_disease->set_owner (player); |
362 | |
362 | |
363 | /* the skill pointer for these diseases should already be set up - |
363 | /* the skill pointer for these diseases should already be set up - |
364 | * hardcoding in 'praying' is not the right approach. |
364 | * hardcoding in 'praying' is not the right approach. |
365 | */ |
365 | */ |
366 | } |
366 | } |
… | |
… | |
484 | new_symptom->stats.hp = disease->stats.hp; |
484 | new_symptom->stats.hp = disease->stats.hp; |
485 | new_symptom->msg = disease->msg; |
485 | new_symptom->msg = disease->msg; |
486 | new_symptom->attacktype = disease->attacktype; |
486 | new_symptom->attacktype = disease->attacktype; |
487 | new_symptom->other_arch = disease->other_arch; |
487 | new_symptom->other_arch = disease->other_arch; |
488 | |
488 | |
489 | set_owner (new_symptom, disease->owner); |
489 | new_symptom->set_owner (disease->owner); |
490 | |
490 | |
491 | if (new_symptom->skill != disease->skill) |
491 | if (new_symptom->skill != disease->skill) |
492 | new_symptom->skill = disease->skill; |
492 | new_symptom->skill = disease->skill; |
493 | |
493 | |
494 | new_symptom->move_block = 0; |
494 | new_symptom->move_block = 0; |