--- crossfire/server ---


Protocol:pserver User:anonymous
Machine:crossfire.cvs.sourceforge.net CVSROOT:/cvsroot/crossfire

Filename: disease.c
Revision 1.37mwedel 2006/06/05 01:28:56 +18 -2
Clean up some compiler warnings. Most of the changes are related to replaced
%lld with FMT64 defines so that the format will be correct, no matter if
the 64 bit type is a long, long long, or if this is windows. #if 0 out a
bunch of code that isn't used.
--
common/exp.c: Replaced lld with FMT64
common/holy.c: #if 0 out baptize_altar(). Add banner copyright at top of file.
common/info.c, common/item.c, common/loader.l, common/loader.c, common/map.c:
common/porting.c Replaced lld with FMT64
common/time.c: Replace a bunch of variables declared as longs to be uint32.
Update various sprintf appropriately.
include/global.h: Add FMT64 and FMT64U as appropriate for different systems.
Change max_time to be a uint32
include/sockproto.h, include/sproto.h: rebuilt
server/apply.c: #if 0 out monster_apply_special
server/c_range.c: Add != 0 in assignment if statement - same meaning, clearer
on intention and avoids compiler warning.
server/c_wiz.c: Update command_kick() to take const char. Update command_speed()
to operate properly based on max_time being a uint32. Update various lld
to FMT64. Clarify ambiguous if/if/else statement in command_insert_into()
server/commands.c: Add cast to command_kick for new function prototype. #if
0 out find_command(), parse_string(), parse_command()
server/disease.c: #if 0 out find_disease(), reduce_symptoms()
server/egoitem.c: #if 0 out create_artifact(). Add copyright at top of file.
server/gods.c: #if 0 out get_god()
server/hiscore.c: Replace lld with FMT64
server/login.c: #if 0 out create_savedir_if_needed()
server/resurrection.c: Replace lld with FMT64. #if 0 out dead_character() and
dead_player_exists()
server/server.c: Remove info_keys() - hasn't been used in a long time. #if 0
out process_active_maps()
server/skill_util.c: Replace lld with FMT64
server/spell_util.c: #if 0 out check_spell_effect()
server/weather.c: #if 0 out feather_map(). Fix what I suspect is an error
in worldmap_to_weathermap() to skip over starting slashes.
socket/image.c: Add a fair number of char * casts to suppress warnings.
socket/init.c: Change buflen in init_connection() to socklen_t to match
function prototype. Add some char * casts.
socket/loop.c: Add some char * casts.
--
MSW 2006-06-04
Show difference between Revision 1.36 and 1.37
Revision 1.36ryo_saeba 2006/05/05 04:26:35 +16 -8
First part of patch #1453869 courtesy Stefan Huehner (shuehner)
Show difference between Revision 1.35 and 1.36
Revision 1.35tchize 2006/04/06 16:18:35 +3 -3

finished common/arch.c unit test, fixed a few bugs, moved function around and renamed other
Show difference between Revision 1.34 and 1.35
Revision 1.34mwedel 2005/11/16 02:16:08 +7 -4
Commit for new blocking code. Not going to dictate all the changes -
but will outline the broad points. Note also that the
doc/Developers/objects is updated and goes into more details also.
- check for P_WALL no longer used - instead, need to use GET_MAP_MOVE_BLCOK
and check against movement type of objects.
- arch_blocked() changed to ob_blocked(), now takes object. Needed because
just looking at archetype move_ values is no longer sufficient.
- find_first_free_spot() changed to take object, since it just calls
arch_blocked()
- FLAG_FLYING removed, now in move type.
- walk_on/walk_off/fly_on/fly_off removed - now based on move_on and
move_off fields.
- Map space structure extended to hold the move_on/move_off, etc
values so that we can shortcut some processing by not having to
check every object on the space when something enters it if
move_on isn't set.
- archetypes recollected - boulders needed move_walk to properly trigger
buttons.
- Note that the new plugin code has to be fixed up for the new movement
code. Look for FIXME in plugins/cfpython/cfpython_object.c
MSW 2005-11-15
Show difference between Revision 1.33 and 1.34
Revision 1.33ryo_saeba 2005/10/09 02:34:16 +3 -3
Don't hardcode strings. Undead_name contains undead name.
Show difference between Revision 1.32 and 1.33
Revision 1.32akirschbaum 2005/10/07 14:38:49 +3 -3
Make damage done by area spells not depend on monster size.
include/sproto.h, server/attack.c: Add additional parameter "full_hit" to
hit_map() and hit_player(). If set, do full damage, if unset scale down by
monster size.
server/{apply.c, attack.c, disease.c, monster.c, player.c, rune.c,
spell_attack.c, spell_effect.c, spell_util.c, time.c}: Change callers to set
"full_hit" parameter according to the attack used.
Show difference between Revision 1.31 and 1.32
Revision 1.31ryo_saeba 2005/10/01 13:17:19 +3 -3
Didn't read doc, but needed a fix anyway
Show difference between Revision 1.30 and 1.31
Revision 1.30ryo_saeba 2005/10/01 13:08:35 +3 -3
Fix diseases with negative value
Show difference between Revision 1.29 and 1.30
Revision 1.29akirschbaum 2005/08/17 02:44:45 +3 -3
The following fix code that basically does "for(x = pos-5; x < pos+5; x++)".
This is not correct because it includes "pos-5" but not "pos+5".
common/los.c: Make lighted distance equal in all directions.
server/disease.c: Make infection distance equal in all directions.
server/monster.c: Make lighted distance equal in all directions.
Show difference between Revision 1.28 and 1.29
Revision 1.28akirschbaum 2004/08/20 15:02:10 +5 -5
server/disease.c: fix crash when casting diseases on tiled maps.
server/move.c: fix problem with multi-tile monsters and pass thru walls.
server/spell_effect.c: fix magic walls sometimes appearing in wrong place.
Andreas Kirschbaum 2004-08-20
Show difference between Revision 1.27 and 1.28
Revision 1.27mwedel 2003/09/13 00:02:09 +123 -120
Updated code for skill + spell code. skills and spells are now objects.
tuning these now means changing the archetypes. New spells can now
be added just by making a new archetype. Lots of code cleanup
also done.
MSW 2003-09-12
Show difference between Revision 1.26 and 1.27
Revision 1.26mwedel 2003/04/10 00:21:48 +2 -2
Add missing initializer - fixes some crashes.
MSW 2004-04-09
Show difference between Revision 1.25 and 1.26
Revision 1.25mwedel 2003/04/02 02:13:28 +138 -112
TODO: Various updates
aclocal.m4,configure: Update path to find python (fix again)
common/image.c: Minor update to a ocmment in the code.
common/los.c: Add missing P_OUT_OF_MAP checks that resulted in some incorrect
LOS calcuations.
include/funcpoint.h: Remove draw_func function pointer.
lib/Makefile.am, in: Remove bmaps.paths to from being installed or being part
of distribution - bmaps.paths is only needed when collecting the image
lib/*: Rebuilt
server/c_object.c: Patch by Bernd Edler to have the apply functions take into
acount if the item is equipped or not when looking for good matched items.
server/commands.c: Move printlos to normal commands. I don't think it reveals
any information that is in any way harmful. And since it dumps the
output to the players screen, no concern of it filling up log files.
Also, when doing LOS debugging, it is pointless to have it as a DM command
because LOS is ignored for DM's.
server/disease.c: Modify remove_symptoms to remove all symptoms the player
may have a disease. Modify infect_object() to not allow a creature to
have more than one instance of the same disease.
socket/info.c: remove draw() - instead, draw_client_map() can be used,
as that is most the only thing draw() did anyways.
socket/loop.c: Update draw() calls to draw_client_map()
socket/request.c: Remove special handling for darkness==4 cases (first
space that is in full darkness) - this is extra complications and causes
display problems. Update draw_client_map() to include the little bit
of logic that draw() had that this function did not have.
MSW 2003-04-01
Show difference between Revision 1.24 and 1.25
Revision 1.24garbled 2003/01/08 13:30:09 +3 -3
Make these compile again
Show difference between Revision 1.23 and 1.24
Revision 1.23mwedel 2003/01/08 02:39:20 +30 -19
Bulk of this commit is to improve code for tiled maps - replace
wall/blocks_magic/blocks_cleric, etc with get_map_flags which
also does map tiling translation as needed. This should fix a lot
of the bugs related to map tiling (there are sure to be more out
there - all the get_map_ob still need to be checked).
Other changes - many spells stopped progressing on spaces that
blocked view - that is now removed - didn't make a lot of sense.
Other fixes - some cleric spells (eg, word of recall) checked to
see if magic was prohibited, didn't check to see if cleric
was prohibited.
Clean up some bugs in the lighting code that would cause erroneous
results. Also, allow players to see immediately around them on
outdoor maps no matter how dark the map really is - behaviour
on indoor maps is the same.
Lots of code reformatted, and lots of obsoleted/dead code removed.
Add max range to dimension door.
Fix magic map - got broken when the layer stuff was redone - was
not showing proper colors. IT also works sensibly on tiled maps
now - rather than display based on the map, it gives the player a
50x50 area centered on where the player is.
Change fire_bow - move special player fire modes into own function -
makes code much cleaner.
Hopefully this fixes more bugs than it introduces.
common/los.c, common/map.c, common/object.c, crossedit/Edit.c,
include/libproto.h, include/sockproto.h, include/map.h,
include/spellist.h, include/sproto.h, random_maps/treasure.c,
random_maps/wall.c, server/attack.c, server/c_misc.c,
server/c_wiz.c, server/disease.c, server/main.c, server/monster.c,
server/pets.c, server/player.c, server/rune.c, server/shop.c,
server/skill_util.c, server/skills.c, server/spell_effect.c,
server/spell_util.c, server/time.c, socket/info.c: See note above
server/apply.c: Limit number of times weapon can be enchanted so
that it won't overflow item_power. Modify enchant armor
to enchant as normal armor is enchanted, also only allows one
item to be enchanted.
MSW 2002-01-07
Show difference between Revision 1.22 and 1.23
Revision 1.22mwedel 2002/09/14 22:15:17 +31 -34
server/disease.c: Change move_disease() somehwat - before, if you were
not susceptible to a disease, it would never run its course. Yet you
would still get stuck with the symptoms. there was a case on
metalforge where a character had a symptom with no disease, and
had immunity, yet was still getting stuck with the symptoms. Not sure
if this change will help prevent that in the future or not.
include/player.h: Change item_power in player structure to be 16 bits -
8 bit values were getting overflowed.
Makefile.in, configure: rebuilt
MSW 2002-09-14
Show difference between Revision 1.21 and 1.22
Revision 1.21mwedel 2002/08/03 00:04:14 +2 -2
common/item.c: Have describe monster show resistances of monsters - useful
for spoiler output, as well probe spell.
server/disease.c: Fix typo.
MSW 2002-08-02
Show difference between Revision 1.20 and 1.21
Revision 1.20mwedel 2002/08/02 00:09:39 +3 -2
include/global.h: add FREE_AND_CLEAR_STR macro, relocate DELETE_STRING
by the other macros.
server/c_misc.c: Fix string printout in applymode function.
server/disease.c: Update name_pl in diseases.
server/player.c: replace FREE_AND_CLEAR with FREE_AND_CLEAR_STR - was
freeing data that shouldn't be freed.
MSW 2002-08-01
Show difference between Revision 1.19 and 1.20
Revision 1.19mwedel 2002/07/08 23:27:06 +4 -4
server/disease.c: Fix propogation of diseases with negative damage (these
do a percent of the creatures damage). The new disease was getting
a damage rating of 1 in all cases because we were passing a negative
value to random_roll for the top end of the range.
MSW 2002-07-08
Show difference between Revision 1.18 and 1.19
Revision 1.18garbled 2001/09/26 16:34:08 +6 -4
Apply the big luck patch to all these files. This removes the special
cases for alchemy and prayer as well.

Discussed at length with dhb, av and gros. Has been tested on both the
mids crossfire server, and on my private server.

This code removes all current use of the luck stat for players, and replaces
it with a general luck modifier for all random rolls. The intent of this
code is to give a general positive (or negative) effect on a player due
to luck. This effect should be generally intangible to the player, yet
help him out over the course of a game.

garbled 2001-09-26
Show difference between Revision 1.17 and 1.18
Revision 1.17mwedel 2001/07/13 23:11:18 +2 -2
Map tiling checkin
server/Makefile.in: Remove encounter.c file. Use cproto instead of
cextract to create proto file.
server/alchemy.c,server/attack.c,server/c_object.c,server/c_wiz.c,
server/disease.c, server/login.c, server/main.c, server/monster.c,
server/move.c, server/pets.c, server/player.c, server/resurrection.c,
server/rune.c, server/shop.c,server/skill_util.c, server/skills.c,
server/spell_effect.c, server/spell_util.c, server/swap.c, server/time.c
modified to use modified insert_ob_in_map function,
use new macros to access map structure related data.
change calls to update_all_los, remove lighting related code.
server/apply.c: modified to use new insert_ob_in_map function. Update
calls to update_object. remove RANDOM_ENCOUNTER code.
for exits, modified to use the head for valid coordinates since the
other parts may not have valid values since they are not saved out to
disk anymore.
server/c_misc.c,server/hiscore.c: modified to use new map
structure/information.
server/commands.c: remove dumplights command.
server/encounter.c: removed - code no longer used
server/init.c: remove RANDOM_ENCOUNTERS code.
server/script.c: change Script_getMapObject to return NULL since there
is no longer a map object. Modify to use new insert_ob_in_map and
update_object functions.
MSW 2001-07-13
Show difference between Revision 1.16 and 1.17
Revision 1.16mwedel 2001/05/24 02:15:01 +2 -2
server/disease.c: replace disease->owner check with get_owner.
MSW 2001-05-24
Show difference between Revision 1.15 and 1.16
Revision 1.15cvs 2000/12/27 01:53:35 +18 -10
MSW 2000/12/26:
Checkin of Jan's new god intervention code. I haven't played around with
it much, but I haven't seen any really obvious problems.
common/living.c: remove learn_prayer_chance
common/treasure.c: Various changes to treasure generation - mostly to
deal with starting equipment and putting it in the inventory.
doc/crossfire.doc: Update docs on god intervention.
include/define.h: GT_... flags removed.
include/treasure.h: GT_... flags added. Addition flags added from
what was in define.h before.
lib/archetypes, lib/crossfire.png, lib/treasures: Updated with new
archetypes and treasures.
random_maps/standalone.c,server/rune.c,server/time.c: Calls to
create_treasure updated
server/apply.c: New functions for god intervention added, update calls
to create_treasure, other god related changes.
server/c_wiz.c: Calls to create_treasure updated, various functions to
allow DM's to learn/unlearn spells added.
server/commands.c: Various commands added to the wiz set of commands.
See commen for c_wiz.c
server/disease.c: Changes to reduce_symptoms
server/gods.c: Numerous updates for god intervention code.
server/player.c: Modifications for starting player equipment.
server/skill_util.c: Display the god the character worships when they
issue the skills command.
server/skills.c: Minor cosmetic change made to message when praying on altar.
server/spell_effect.c: Changes related to gods, cure spells, and
generation of treasures & items.
End of MSW 2000/12/26 checkin.
Show difference between Revision 1.14 and 1.15
Revision 1.14cvs 2000/12/16 18:39:16 +34 -30
MSW 2000/12/16:
server/player.c: If the player race archetype has a message, print that out.
This allows a descriptive message about what the different races will
get. The message is removed from the player once they decide on the
race.
common/living.c: Add some parens around some PR resistant checks - eliminates
warnings from gcc.
server/disease.c: have cure_disease remove all diseases a player is infected
with. The code suggested it was attempting to do so, and the
messages it printed out certainly suggested that the character
was disease free.
Show difference between Revision 1.13 and 1.14
Revision 1.13cvs 2000/12/03 18:40:05 +2 -2
Checking for partial resistance code. Various minor errors also fixed
(compiler warnings, unused variables, Makefile.in changes, etc).
PR code also includes support to send protections to the client.
Show difference between Revision 1.12 and 1.13
Revision 1.12peterm 2000/11/17 05:16:45 +4 -1
New spell added, Windstorm.
It pushes objects, mostly, and does a little damage.
define.h: NROFREALSPELLS++
spellist.h spells.h: "windstorm"
archetypes: new arch added for windstorm
disease.c: comment on new title parameter.
spell_effect.c, sproto.h spell*.c: implmenetation of windstorm.
Show difference between Revision 1.11 and 1.12
Revision 1.11cvs 2000/11/16 23:07:49 +11 -3
MSW: 2000/11/16:
socket/metaserver.c: Add #ifdef MSG_DONTWAIT into metaserver.c for systems
that lack that definition.
random_maps/style.c: alphasort was not properly de-referencing pointers
when doing name comparisons, and thus returned garbage results,
resulting in a crash when entering random maps. This only happens
for systems which lack scandir in normal libraries (like Solaris).
BSDs and linux have scandir built in, and did not have a problem.
server/disease.c: fix infect_object - server would crash if player did
not have praying skill and was infecting someone else.
end of changes, MSW 2000/11/16
Show difference between Revision 1.10 and 1.11
Revision 1.10peterm 2000/11/14 02:37:11 +135 -89
PeterM: Made some changes so that non-disease effects may be done without
being labelled as a disease. Also, fixed a bug in which we'd kill something
and then try to insert something in the killed thing's map.
Show difference between Revision 1.9 and 1.10
Revision 1.9peterm 2000/10/05 18:25:52 +15 -3
PeterM:
1) Diseases moderated in power by ~1/2 and randomized.
Now monsters can have a mild/moderate/serious/fatal case
of a particular disease.

2) cause disease spells modified to NOT go through objects
spells ordinarily couldn't go through.
Show difference between Revision 1.8 and 1.9
Revision 1.8cvs 2000/06/08 19:17:22 +46 -46
Various improvements from jhantin@derringer.net:

* fixed reversed strstr() calls

* added a 'force' argument to infect_object(): if set, skip disease wc
roll

* pulled disease susceptibility checking out into its own function

* diseases in an immune carrier last forever

* diseased needles use infect_object() with the force flag set

* cast_cause_disease() sets the force flag so it always catches on the
first try

* NDI_UNIQUE on "You infect %s with %s!" only if you infect a player
Show difference between Revision 1.7 and 1.8
Revision 1.7cvs 2000/06/06 02:04:10 +3 -3
Minor mod restricting race.
Show difference between Revision 1.6 and 1.7
Revision 1.6cvs 2000/06/04 17:26:08 +8 -4
Modified disease to allow self-limiting in generations.
If armour > 0, wc (contageousness) is reduced by armour every
time someone new is infected.
Show difference between Revision 1.5 and 1.6
Revision 1.5cvs 2000/06/04 16:18:31 +12 -1
Fix for experience to go into the appropriate category.
Show difference between Revision 1.4 and 1.5
Revision 1.4jec 2000/05/26 04:50:49 +2 -2
* apply() cleanup patch 26/5/2000
Show difference between Revision 1.3 and 1.4
Revision 1.3cvs 2000/04/13 23:48:19 +3 -3
Cosmetic fixes - updates to rcsid string to include right file name
as well as updates to mail address and/or additions to top banner.
Mark Wedel 4/13/2000
Show difference between Revision 1.2 and 1.3
Revision 1.2cvs 1999/07/13 01:03:04 +0 -0

Global commit for 0.95.4 - most files have no changes but just have
differing headers between my local RCS and the CVS versions and need to
get synced up.
Show difference between Revision 1.1 and 1.2
Revision 1.1uid200 1999/04/02 13:10:04 None
Initial revision
First version
Revision 1.1.1.1uid200 1999/04/02 13:10:04 +0 -0
First CVS revsion: crossfire-0.95.3
Show difference between Revision 1.1 and 1.1.1.1
Revision 1.15.2.1mwedel 2001/05/24 23:08:04 +2 -2
doc/metaserver, doc/Makefile.in: Add metaserver file which describes
working of metaserver and format of data fields.
socket/metaserver.c: Add reporting of inbytes, output bytes, and uptime in
seconds to notification of metaserver
server/spell_util.c: Fix typo in polymorph code (when enabled in config.h)
server/disease.c: replace disease->owner check with get_owner.
MSW 2001-05-24
Show difference between Revision 1.15 and 1.15.2.1


File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:32