--- crossfire/server ---


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

Filename: c_misc.c
Revision 1.81mwedel 2006/09/04 02:21:05 +1023 -743
Bulk of this change is updating some files to use draw_ext_info() - all
future code should use this, since there is no real reason not to and
it provides additional features. One notable change - reversed the
order of the new and old formats in draw_ext_info_format() - the
order was different than that of draw_ext_info(), which leads to confusion.
draw_ext_info_format() wasn't used in many places, so easier to change
that than all the draw_ext_info() calls. Only another 1200
new_draw_info calls left in the server.
--
doc/mediaTags: Fix some typos, clarify some behaviour (the way it works
now so that there will not be confusion in the future).
include/define.h: Remove MSG_ tags - moved to newclient.h
include/newclient.h: Synchronize with client version. Add MSG_ defines
include/newserver.h: Move some defines from here to newclient.h
server/apply.c: Reverse format parameters to draw_ext_info_format() calls.
server/c_misc.c: Rewrite to use draw_ext_info{_format} - this allows nice
formatting of tables, etc. Also general style cleanups, clarify some
messages. in help_topics(), don't do linewrap - let the client
handle it. remove bug_report() function - no longer used. Remove
explore_mode() - wasn't used. Move command_style_map_info() to
c_wiz.c since it is a wiz only command.
server/c_wiz.c: As per above, move command_style_map_info() to this file
since it is a wiz command.
server/player.c: Reverse format parameters to draw_ext_info_format() calls.
server/shop.c: Update to use draw_ext_info{_format} instead of new_draw_info()
socket/info.c: Reverse format parameters in draw_ext_info_format().
Update va_start() to use new last parameter. Remove call to
strip_media() if the client supports the tag - that should only be
used if the client does not support the tag.
socket/request.c: remove commented out MSG_TYPE values.
MSW 2006-09-03
Show difference between Revision 1.80 and 1.81
Revision 1.80ryo_saeba 2006/08/08 05:05:34 +77 -30
Feature request #821645 (change password command)
Show difference between Revision 1.79 and 1.80
Revision 1.79akirschbaum 2006/06/06 16:38:41 +13 -1
Add commands rules and news to display the rules/news files.
Show difference between Revision 1.78 and 1.79
Revision 1.78ryo_saeba 2006/05/20 07:36:48 +19 -13
Add a bot flag, to not count in metaserver information
Show difference between Revision 1.77 and 1.78
Revision 1.77ryo_saeba 2006/03/18 09:05:37 +36 -32
Massive cleaning of code. Shouldn't be any functional change.
Show difference between Revision 1.76 and 1.77
Revision 1.76akirschbaum 2006/02/10 17:59:27 +5 -5
Apply slightly modified patch #1428309 (code-cleanup: const, static) by
Stefan Huehner: add const/static to functions/variables. Remove some type
casts.
Show difference between Revision 1.75 and 1.76
Revision 1.75cavesomething 2006/02/02 20:34:20 +2 -2
fix bug #1413239 related to the who command
Show difference between Revision 1.74 and 1.75
Revision 1.74ryo_saeba 2005/12/13 16:17:18 +26 -25
Moved natural resistances display from statistics to resistances
Show difference between Revision 1.73 and 1.74
Revision 1.73akirschbaum 2005/12/07 12:25:55 +9 -1
Apply modified patch #1293774 (Kick banned hosts at once) by Thomas Equeter:
disconnect new connection for banned host right after connecting. Also add
support for user name in ban files.
Show difference between Revision 1.72 and 1.73
Revision 1.72akirschbaum 2005/12/05 17:34:04 +2 -2
Apply patch #1371956 (code cleanup patch) by Stefan Huehner: fix old-style
function declarations and prototypes to proper Ansi C syntax. This patch
allows the compiler to check function arguments and also removes some warnings
when compiling with -Wstrict-prototypes.
Show difference between Revision 1.71 and 1.72
Revision 1.71akirschbaum 2005/10/28 14:08:53 +2 -2
Fix compiler warnings. Most changes do not change the program (remove unused
variables, convert "if(x = y)" into "x = y; if(x)"); a few actually fix
(possible) problems (fix uninitialized variables, fix printf format
specifiers, fix mismatches between signed and unsigned variables, add missing
return and default statements).
Show difference between Revision 1.70 and 1.71
Revision 1.70ryo_saeba 2005/10/01 11:36:35 +2 -2
Clean some compilation warnings.
Show difference between Revision 1.69 and 1.70
Revision 1.69ryo_saeba 2005/09/25 13:36:02 +10 -10
Changed quest system, needs tweaks and fixes.
Show difference between Revision 1.68 and 1.69
Revision 1.68ryo_saeba 2005/09/25 04:47:23 +2 -2
Fix some compilation warnings.
Show difference between Revision 1.67 and 1.68
Revision 1.67akirschbaum 2005/09/09 16:09:40 +23 -1
Allow a DM to cast spells and prayers in no-magic/no-prayer areas. Add new
command "wizcast" to toggle this setting.
Show difference between Revision 1.66 and 1.67
Revision 1.66akirschbaum 2005/09/04 11:58:12 +4 -6
common/{anim.c, image.c, los.c, map.c, porting.c, treasure.c},
include/define.h, random_maps/treasure.c,
server/{apply.c, c_misc.c, c_object.c, c_wiz.c, commands.c, daemon.c,
hiscore.c, init.c, login.c, player.c, plugins.c, resurrection.c, weather.c},
socket/{init.c, item.c, loop.c, lowlevel.c}: Use LOG() for error messages and
debug output instead of stdout/stderr. Include filename in error messages.
server/resurrection.c: Fix error message in read_player().
Show difference between Revision 1.65 and 1.66
Revision 1.65ryo_saeba 2005/08/12 03:18:59 +5 -5
Use const char* instead of char* when possible
Show difference between Revision 1.64 and 1.65
Revision 1.64cavesomething 2005/08/11 11:44:30 +66 -3
Add showpets command, let killpets selectively kill pets
Show difference between Revision 1.63 and 1.64
Revision 1.63akirschbaum 2005/07/16 16:10:39 +2 -2
Fix spelling errors in string constants.
Show difference between Revision 1.62 and 1.63
Revision 1.62akirschbaum 2005/07/16 14:52:43 +4 -4
server/c_misc.c: Remove superfluous trailing '\0' from strings.
Show difference between Revision 1.61 and 1.62
Revision 1.61qal21 2005/07/16 14:03:01 +5 -3
server/{c_misc.c, monster.c, pets.c}, include/player.h: Add new "arena"
petmode which allows pets to attack players and other pets while in the
arena.
Alex Schultz 2005-07-16
Show difference between Revision 1.60 and 1.61
Revision 1.60ryo_saeba 2005/07/14 11:21:33 +81 -1
Quest handling
Show difference between Revision 1.59 and 1.60
Revision 1.59tchize 2005/05/29 12:35:54 +9 -3

add-on: title more lenghtly are now allowed and the part ' the ' in title is now optional.
This does not add a 'title prefix' command as suggest by mwedel and casper1 on tracker
reference: [ 1088383 ] title_prefix
http://sourceforge.net/tracker/index.php?func=detail&aid=1088383&group_id=13833&atid=313833
Show difference between Revision 1.58 and 1.59
Revision 1.58tchize 2005/05/07 06:51:20 +5 -2

Corrected silinesses in code. Now compiles when CFLAGS=-ansi -pedantic
Show difference between Revision 1.57 and 1.58
Revision 1.57mwedel 2005/04/16 23:25:54 +2 -2
Various minor bugfixes.
common/los.c: Patch to fix negative lighting. Use isqrt instead of sqrt,
so we only want integer values anyways.
include/libproto.h, include/sproto.h: Rebuilt as there were some improperly
matching prototypes.
random_maps/rogue_layout.c: Replace sqrt with isqrt calls.
server/c_misc.c: Make name_cmp() a static declaration so it won't be put
in the sproto.h file.
server/init.c: Remove /* within comment string.
server/monster.c: Change sqrt to isqrt
MSW 2005-04-16
Show difference between Revision 1.56 and 1.57
Revision 1.56cavesomething 2005/04/16 08:19:29 +38 -1
add whereabouts command
Show difference between Revision 1.55 and 1.56
Revision 1.55ryo_saeba 2005/04/14 14:15:42 +2 -3
Fix a few things, use const char* instead of char* when possible
Show difference between Revision 1.54 and 1.55
Revision 1.54cavesomething 2005/03/25 01:53:44 +2 -2
fix for bug #1170280
Show difference between Revision 1.53 and 1.54
Revision 1.53cavesomething 2005/03/23 15:35:07 +53 -43
allow who command to take regions as arguments, if a region is given as an argument then only the players in the region are shown. Partial region names can be used also. Calling who on its own shows everyone that was shown before.
Show difference between Revision 1.52 and 1.53
Revision 1.52ryo_saeba 2005/03/22 17:22:42 +15 -13
Fix broken win32 compilation. Remove sleep(1) in hide commandas that causes the whole server to sleep
Show difference between Revision 1.51 and 1.52
Revision 1.51majorwoo 2005/03/21 20:39:50 +14 -14
Updated who to sort case insensitive and prevent the occasional printing of garbage characters
Show difference between Revision 1.50 and 1.51
Revision 1.50majorwoo 2005/03/20 16:23:40 +47 -17
This is path #1165501 to sort the who command by character name. Also some formatting for the DM who that was broken in #1152538
Show difference between Revision 1.49 and 1.50
Revision 1.49majorwoo 2005/03/20 16:20:40 +104 -28
This is patch #1152538 to add a server configurable who command
Show difference between Revision 1.48 and 1.49
Revision 1.48ryo_saeba 2005/03/15 15:06:22 +27 -2
Apply patch #1145089 by cavesomething for region support
Show difference between Revision 1.47 and 1.48
Revision 1.47ryo_saeba 2005/03/13 09:48:17 +24 -8
Apply patch #1119762 (salathar): afk command
Show difference between Revision 1.46 and 1.47
Revision 1.46temitchell 2004/10/17 22:25:57 +3 -3
- peaceful state is no danger to others so does not need
to be in display unless player is hostile. (ok done for sure now)
Show difference between Revision 1.45 and 1.46
Revision 1.45temitchell 2004/10/17 22:14:19 +2 -2
- arg! add missing string place for hidden status.
Show difference between Revision 1.44 and 1.45
Revision 1.44temitchell 2004/10/17 22:07:06 +25 -20
- make who output even more readable - also clean up code formatting
Show difference between Revision 1.43 and 1.44
Revision 1.43temitchell 2004/10/17 21:20:00 +15 -12
- reformat output for who command so it is actually readable.
Show difference between Revision 1.42 and 1.43
Revision 1.42ryo_saeba 2004/10/10 10:01:26 +24 -2
Natural resistances display by statistics for dragon players
Show difference between Revision 1.41 and 1.42
Revision 1.41ryo_saeba 2004/08/15 12:03:08 +3 -1
Add item stack for DMs, to ease item manipulation
Show difference between Revision 1.40 and 1.41
Revision 1.40mwedel 2004/06/01 02:20:56 +2 -1
server/c_misc.c: Add sum_weight() call to fix_me command so that players
weight is properly recalculated.
server/skills.c: Fix up attempt_steal() so that it doesn't improperly
remove object from target when person doing the stealing can't pick
it up.
server/spell_attack.c: Set maxhp properly, so multipled fireballs, etc
can be going off at the same time.
server/spell_effect.c: Fix up cast_create_missile() so more esoteric
missiles can be created.
MSW 2004-05-31
Show difference between Revision 1.39 and 1.40
Revision 1.39ryo_saeba 2004/03/26 15:59:28 +6 -1
Win32 fixes
Show difference between Revision 1.38 and 1.39
Revision 1.38ryo_saeba 2004/03/12 13:04:14 +4 -3
Change join/leave messages color, make DMs more 'stealthy'
Show difference between Revision 1.37 and 1.38
Revision 1.37mwedel 2004/01/19 23:45:32 +4 -4
commit fix by Andreas Kirschbaum that fixes various typos.
MSW 2004-01-19
Show difference between Revision 1.36 and 1.37
Revision 1.36mwedel 2003/09/13 00:02:08 +2 -11
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.35 and 1.36
Revision 1.35crowbert 2003/09/11 20:37:56 +4 -3
add a search option to the maps command
Show difference between Revision 1.34 and 1.35
Revision 1.34temitchell 2003/08/26 19:00:47 +6 -6
Added friendly_fire to attack.c, called from hit_player.

Will put a cap on maxdam that is a percentage (1-100%)
of damage (min 1)based on SET_FRIENDLY_FIRE value (in settings)when
players attack other players in peaceful mode. Changed who, statistics
commands to show this setting better and added a help file for peaceful.

It would be nice to have a indicator (even a toggle button?)in the
client for this as well.
Show difference between Revision 1.33 and 1.34
Revision 1.33tchize 2003/06/30 14:59:20 +3 -3

sorry, little bug in weather system
Show difference between Revision 1.32 and 1.33
Revision 1.32mwedel 2003/03/08 18:44:12 +2 -2
Update a few printf/sprintf to use %lld for 64 bit exp values.
MSW 2003-03-08
Show difference between Revision 1.31 and 1.32
Revision 1.31mwedel 2003/03/07 23:35:32 +2 -2
Patch for 64 bit experience total, as well as flexible number of levels.
Basically, max level is now dynamic, set in exp_table file. Experience
is now a 64 bit value, so much higher totals now allowed. To
allow for flexible levels, add new function - did_make_save() which is used
for players/monsters to see if they make their saving throw - this is
necessary because the savethrow[] array may not be as large as max level -
did_make_save takes this into account.
NOTE: If your updating a server, you will need to copy over/set up a
new exp_table file that has max_levels defined and at least one of the
tables uncommented. There are no longer any compiled in defaults
--
configure, configure.ac: Add AC_CHECK_SIZEOF calls for long and long long
so we can know which one to use for 64 bit support (other checks
may need to be added)
common/exp.c: Remove levels table, replace it with a 64 bit pointer.
Change init_experience to allocate appropriately sized table, have it
read max_level value from exp_table file. Replace atoi calls with
atoll to get 64 bit value. Update dump_experience to properly
print 64 bit values.
common/info.c: Update dump routines that dump exp to properly print
64 bit values.
common/init.c: Add initializing for settings.max_level value.
common/item.c: Update sprintf's to handle 64 bit output of exp (speed)
value in objects.
common/living.c: change MAX_EXP define, update MAX_EXP_IN_OBJ define,
add MAX_SAVE_LEVEL which corresponds to how large the savethrow
table is. Change MAXLEVEL to settings.max_level. Change level_exp()
to return 64 bit value, other updates in functions to use 64 bit
values. Add did_make_save() function.
common/loader.l, common/loader.c: Update load/save routins of exp to
deal with 64 bit values.
common/map.c: Update calculate_difficulty to use 64 bit values when
storing exp - unlikely to make a difference, since unlikely any map
will get to a point where it has that much exp on it.
common/porting.c: Remove dead code from save_long(), add save_long_long()
to save 64 bit values.
include/autoconf.h.in: SIZEOF_LONG and SIZEOF_LONG_LONG values added.
include/global.h: Add code to typedef sint64/uint64 types based on what
type gives us those values. Add max_level to settings array.
include/libproto.h: rebuilt.
include/living.h: Replace exp field with 64 bit value.
include/player.h: Update party kill log exp tracking to have 64 bit
values.
lib/exp_table: Udpate comments about max_level, uncomment what
was the default table so new installs have working table.
Add 5 levels to all the tables.
random_maps/monster.c: Update place_monsters to use 64 bit when storing
exp total for map/per square.
server/apply.c: Replace MAXLEVEL with settings.max_level, add
did_make_save calls where appropriate
server/c_misc.c: have statistics command properly print 64 bit
exp value.
server/c_wiz.c: Have stats command properly display 64 bit value.
server/hiscore.c: Replace exp values with 64 bit values, update to
properly load/display them.
server/player.c: replace savethrow[] reference with did_make_save()
server/skill_util.c: Update skills command to properly show 64 bit exp values.
server/spell_effect.c: replace savethrow[] reference with did_make_save(),
allow players to cast directors right beneath themselves, but other
walls must be on empty space.
MSW 2003-03-07
Show difference between Revision 1.30 and 1.31
Revision 1.30mwedel 2003/02/10 00:52:11 +1 -7
doc/Developers/objects: Add nodes about shared strings in objects.
server/c_misc.c: Remove check for name length - check_name takes care
of that for us.
server/monster.c: store return value from get_map_flags - seen some
crashes traced back to this area, want to see what it returned.
Allow objects with no msg to still use scripts that listen.
server/player.c: Fix potentional issue of freeing/adding players name
when they enter play again - seen some crashes attributed to
odd names.
MSW 2003-02-08
Show difference between Revision 1.29 and 1.30
Revision 1.29garbled 2003/02/04 23:32:03 +4 -4
New bow code. bowmode bestarrow. When firing arrows, look at the first
target in line, and attempt to pick the best arrow to use against it.
Show difference between Revision 1.28 and 1.29
Revision 1.28mwedel 2003/01/08 02:39:19 +2 -2
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.27 and 1.28
Revision 1.27garbled 2002/12/25 00:45:46 +90 -1
New Arrow and Pet Code:
Add bowmode and petmode commands. Allowing the player to change the firing
style for bows to one of either threewide, or spreadshot.
Allow players to change the operating modes of his pet with petmode. Can
be either seek and destroy, defend, or normal historical behavior.
Change bows to impart speed to arrows based on damage and other magical
plusses. Damage decays over distance, to stop arrows from flying forever.
Very fast moving arrows will pierce multiple targets. An arrow moving at a
speed greater than 10.0 will go straight through a target, losing 1.0 of
speed in the process.
Change magic missile to use spell_find_dir instead of find_dir to stop it
from flying in a circle and hitting the caster, and to make it stop
flying into walls to hit creatures behind the walls.
Show difference between Revision 1.26 and 1.27
Revision 1.26garbled 2002/12/11 13:54:52 +4 -6
Fix an off by one error in the weather pointed out by Mark. Change the
who command so dm's can see what level everyone is.
Show difference between Revision 1.25 and 1.26
Revision 1.25garbled 2002/11/26 02:57:56 +2 -15
Nuke #ifdef MAP_RESET
Show difference between Revision 1.24 and 1.25
Revision 1.24garbled 2002/11/12 23:24:53 +20 -20
#ifdef SPELLPOINT_LEVEL_DEPEND -> settings.spellpoint_level_depend
#ifdef EXPLORE_MODE -> settings.explore_mode
While I was here.. make explore mode actually *work*. It didn't even
have an entry in the commands array.
Show difference between Revision 1.23 and 1.24
Revision 1.23garbled 2002/11/12 17:09:11 +6 -3
SET_TITLE and RESURRECTION are now settings.
Show difference between Revision 1.22 and 1.23
Revision 1.22garbled 2002/11/08 02:54:07 +83 -1
Add new command "weather". Displays the current weather conditions to the
player. TODO: make it dump the weathermap data for a wiz.
Add rain. Touch up snow a bit, and hunt down and kill a few minor bugs.
All that is left to do for basic visual weather is hail and fog, and then
messages to the player expressing conditional changes.
Rain and snow only occur at dynamiclevel >= 2.
Show difference between Revision 1.21 and 1.22
Revision 1.21mwedel 2002/09/28 02:19:40 +6 -4
Mostly bugfixes, but the addition of a wiz 'hide' command which makes the
wiz out of sight so to speak.
--
common/loader.l, common/loader.c: Fix bug where flag values were being saved
with actual value of the flag (eg, 32768, 16, etc) instead of 1/0 value -
Code effectively worked the same, just was a bit odd looking at save files.
include/player.h: Add hidden element to player structure.
include/sproto.h: Add command_hide(), update proto for players_on_map()
lib/Makefile.am, lib/Makefile.in: add wizhelp/hide file.
server/apply.c: Add error checking to converts so it doesn't crash if the
converter doesn't have a proper other_arch. Modify shopmats so that they
don't transport spell effects, like fireballs an burning hands.
server/attack.c: Modify code so players can drain other players exp.
server/c_misc.c: Modify various functions to not show info on hidden DM.
server/c_wiz.c: Add command_hide(), clean up command_invisible() a bit.
server/commands.c: Add hide command to dispatch table.
server/main.c: Add code to not update players on map for hidden dm.
server/player.c: Give hidden dm perpetual invisiblity.
server/skills.c: Only get exp if you actually stole an item - fixes abuse
whereby players who couldn't carry item could continually 'steal' it from
monster and just gain exp.
server/swap.c: modify players_on_map() to take addition arg to determine if
real players on map should be shown, or if we shouldn't count hidden dms.
socket/info.c: Modify code so that oldsockets don't get reports on high verbose
messages.
socket/metaserver.c: Modify metaserver update to not include hidden dms.
utils/Makefile.in: update datestmp.
MSW 2002-09-27
Show difference between Revision 1.20 and 1.21
Revision 1.20mwedel 2002/09/07 16:41:20 +8 -1
include/sproto.h: rebuilt
lib/help/killpets: New file
lib/Makefile.in: Add help/killpets file.
server/c_misc.c: Add command_kill_pets().
server/commands.c: add killpets command which kills your pets.
server/monster.c: Add some code in check_enemy so that the enemy
has to be a monster/generator/player to be considered valid -
I was seeing things like arrows ending up as target enemies.
MSW 2002-09-07
Show difference between Revision 1.19 and 1.20
Revision 1.19mwedel 2002/08/02 00:09:39 +2 -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.18 and 1.19
Revision 1.18mwedel 2002/07/14 23:57:13 +69 -10
-- Start body commit notes --
Major commit. This adds body locations which is used for equipping items.
Equipment has information which body part it gets equipped to, and monsters
have information on how which body locations they can have.

As part of this work, I also did a lot of code cleanup.

To use this, you must use up to date archetypes - the ones included
in this commit are fine - just make sure you install them. If
you don't, players will not be able to equip items.

common/arch.c: Initialize body_used to be same as body_info for
archetypes - this way when monsters are created, they can
start equipping items right away.
common/exp.c: update new_exp() - some flags it checked for before no longer
exist or have new names.
common/info.c: describe_item() now takes second parameter - update
dump_abilities to use new calling convention.
common/item.c: Add table that describes the body_info locations and
their names. Add functions that calculate item power for objects
that don't have it set. Update display functions to show
item_power in items. Update describe_monster() - use_horn/wand/rod
merged into just use_range. Modify describe_item() to take second
paramater - who the item is being described for. Show item_power
in describe_item.
common/living.c: Pull out MAXLEVEL from being defined in this file -
define in in define.h, since other files use it. Add NUM_STATS
define - replace hard coded values of having just 7 stats with it.
Update change_abil to not display that the player has a new
attacktype when equipping a bow that has it - fix_player() ignores
the attacktype of the bow, so it was incorrect information.
fix_player(): Initialize player ranges structure to null -
will get filled in by code in function, updated to deal with
updating the body_used data from body_info in the objects.
Replace instances of last_heal with gen_sp_armour. Rearrange
some code to make function more readable.
common/loader.c, common/loader.l: Remove the variable_const information - no
longer needed and confusing for new people when adding in new object
elements. Add set_body_info() - parses the string from the load file and
sets the appropriate array element. Add check_loaded_object() - does
sanity checking for an object after finished loading - replaces need for
long processing directive in the actual rules by having seperate function.
Remove unused flags from load directives (apply_once, no_pretext,
can_apply), add some new ones (item_power, gen_sp_armour), update others
to can_use_range. Replace flag_links with simple array that contains the
name for each corresponding flag. Update get_ob_diff to not use the V_
values and just include the actual string name - all recent changes have
done this, just updated for old stuff. Update get_ob_diff to save new
values that have been added.
common/object.c: clear_object: Modify to use memset to clear
the structure to zero - this is less error prone than listing
all the specific values, and probably faster. Also, makes it
easier to add new elements - no need to update object.c in most
cases.
common/player.c: Remove get_player_ob routine - this is now merged
in with get_player_ob in server/player.c. Remove generate_ext_title -
not used.
common/readable.c: Update to pass second argument to describe_item.
common/treasure.c: Update to calculate item_power of generated items.
Clean up a lot of code formatting. Update add_abilities
to use gen_sp_armour values, not last heal (note, it appears
the last_heal values weren't being used before). Update
calls to describe item to take second parameter.
doc/Developers/objects: Update will_apply notes, add note about
item_power, body location.
include/define.h: Comment out unused flags (flag_apply_once, flag_paralyzed,
flag_no_pretext, flag_ready_rod, flag_read_horn). Add flag_use_shield.
rename flag_use_wand to flag_use_range. rename flag_ready_wand to
flag_ready_range. Add flag_ready_scroll. Update ARMOUR_SPELLS access
macro. Add AP_PRINT flag to apply flags. Add CAN_APPLY_.. return types
for can_apply_object function.
include/includes.h: add strftime, mktime checks to this file.
include/libproto.h: rebuilt.
include/living.h: Add NUM_STATS define, update extern declarations
to use it for sizing.
include/loader.h: remove the V_.. info and xbm_.. externs that were not
used.
include/newserver.h: Remove ext_tile information.
include/object.h: Add Body_Locations structure, NUM_BODY_LOCATIONS define.
Add definitions for WILL_APPLY values. Clean up object structure -
formatting is now consistent, ordering of values groups values
together more logically. Update all types to use the int8/int16/int32
types. Several unused fields removed.
include/player.h: Update rangetype enum. Add unapplymode enum.
Clean up player structure - type updates, unused fields removed,
formatting fixed up.
include/spells.h: remove range_name extern. Update SpellTypeFrom
field to combine wand/rod/horn into spellMisc - none of the
spell casting code was differentiating these.
include/sproto.h: rebuilt.
lib/Makefile.in: Add new help files (applymode, bind, brace)
lib/archetypes: rebuilt for body_info, gen_sp_armour, item_power,
can_use_shield information.
lib/artifacts: updated for item_poer and gen_sp_armour changes.
lib/treasures: remove unused _force for player treasure.
plugin/plugin_python.c: Change FLAG_USE_WAND to FLAG_USE_RANGE.
server/apply.c: Move stftime, mktime to include/includes.h. Remove
draw_find() - one line function can just as easly be in the
code itself. Update calls to long_desc to pass second parameter.
move gravestone_text() to player.c file. Add direction parameter to
apply_scroll() - in this way monsters can use it properly.
Remove dead code. Update apply_special function. Add
unapply_special(), get_item_from_body_location(), unapply_for_ob(),
and can_apply_object() functions.
server/attack.c: Remove SET_FLAG(op, FLAG_PARALYZED) line - no code
was ever checking status of FLAG_PARALYZED.
server/c_misc.c: add command_body() which dumps body information for
player. Update who as idle element in player structure removed -
was not being used by anything. Add command_applymode() to
set players prefered unapply method. Remove calls to unlock_player()
in various functions - unlock_player() has not done anything
meaningful for a while.
server/c_object.c: Modify long_desc to take a second parameter
which is who is examing the object. this is needed so that we
can pass it down to some of the lower level functions.
Update calls to describe_item to pass this second parameter.
remove FLAG_NO_PRETEXT code - no archetyps were using it. When
examining objects, also tell player where to put them on.
server/c_range.c: Update legal_range() - we now store the object that
is responsible for a range in the player object, so code is
much simpler. Update change_spell() to not destroy golem
just by readying another spell - we now let players regain control
of golems after switching to another range. Update change_spell
to use item name of object for range description.
server/c_wiz.c: remove reference to count_left from player object -
field removed from structure.
server/commands.c: add new commands (applymode, body) to command dispatch
table.
server/login.c: Remove unlock_player() and lock_player() and calls to it -
current checking of names at login should be sufficient to
prevent duplicates. Remove dead code from check_name. Update
load/save code for unapply mode value. Add set_flag(op,
FLAG_USE_SHIELD) if player is allowed to use armor - needed since
flag_use_shield is really a class feature and so is not automatically
updated for old player files.
server/main.c: Remove references to count_left. memset marker object to
NULL - seems to increase stability on metalforge server.
server/monster.c: Many updates related to the body info - monsters follow some
rules as players. Add monster_should_cast_spell function - monsters will
use this for all spellcasting related actions (abilities, scrolls, wands,
etc). Update for merged rod/horn/wand ranges. Update bow use by monsters
- they don't actually need to equip it to fire - this way we don't need to
constantly swap the monsters weapons between the bow and melee item. Use
fire_bow from player.c for most of the work. Modify scroll usage -
monster will use it when player is near, not when it first picks it up.
Add FLAG_READY_SCROLL to denote the monster has a scroll to use. Also,
monster now casts it in appropriate direciton. Merge the
monster_use_wand/rod/horn into monster_use_range. Modify
check_good_weapon and check_good_armour to just look at the stats of the
two items without needing the monster to apply it first.
server/player.c: Print motd in green so it is more noticable. Update
get_player function to do work it did before as well as that of
get_player_ob. Have get_player take a parameter which is the object of
the player if he has one. Modify to use memset to clear the player
structure - more sure fire than explicitly listing values to initialize.
Remove calls to unlock_player. Modify fire_bow so that monsters can also
use the function. Add fire_misc_object() to fire_wand/rod/horn - removes
code from fire(). Add gravesetone_text() to this file.
server/shop.c: Update to pass second parameter to describe_item().
server/skill_util.c: Update check_skill_to_fire since there are fewer
rangetypes now. change range_scroll name to range_golem, as that is
a bit more accurate for what it actually does. Modify show_skills()
to show player his item power and total of items he has equipped.
server/skills.c: Add second paramater to long_desc, remove references to
count_left.
server/spell_effect.c: Add second paramater to long_desc, remove references to
count_left. Update range_scroll to range_golem
server/spell_util.c: remove references to count_left. Update messages
if player trying to cast where he can't with new range names.
socket/info.c: Update range information and how we display what it is -
we will use the object name of the range if available. Remove
reference last_known_spell, last_shoot, last_spell, last_value
player structure fields.
socket/init.c: Remove ext_title information.
socket/request.c: Add element for life_stealing in the resistance array.
Remove references to idle, count_left in player structure. remove
ext2 title information.
MSW 2002-07-14
-- End body commit notes --
Show difference between Revision 1.17 and 1.18
Revision 1.17mwedel 2002/06/07 02:00:44 +16 -17
Mostly bugfixes. I'm not sure if this will fix the disappearing arch problem-
none of the changes made in the original multiple name would seem to
cause it, so hard to say if any of these changes may fix it.
--
common/arch.c: Change get_archetype_by_name to be more efficient and
not leak memory. Modify code that frees all archetype data to free
the name_pl information. Make sure the clone.name_pl is set to
NULL. When singularites are created, set the name_pl for them.
common/loader.l, common/loader.c: Modify code that fixes up name_pl
to be more correct when it fixes up name_pl for old objects.
common/map.c: Modify load_map_header so that tile_paths will be normalized -
need for editor to be able to load maps that have a multipart object
that spans the maps.
crossedit/Edit.c: Modify some calls of out_of_map to OUT_OF_REAL_MAP, since
tiling code really isn't fully in place for the editor. Modify
EditPerformFill so that it actually works and doesn't crash the editor.
include/global.h: Move FREE_AND_COPY macro from loader.l to here so that
all source code files can use it.
lib/adm/map_info: Modify to actually be able to examine just a sub
portion of the map directories, and not all of them. Don't always
show the unused objects - information isn't very interesting if only
a portion is being examined. Modify the exit examining code to properly
deal with random maps (if there is a finalmap component, make sure
that does exist.) Loade the bmaps file and not the faces file to
find valid faces.
plugin/plugin_python.c: Add missing %s that described what script
was actually loaded.
random_maps/special.c, server/alchemy.c, server/c_misc.c, server/gods.c,
server/login.c, server/player.c, server/spell_effect.c: Set up proper
name_pl value for code that changes the name of objects.
server/apply.c: Use FREE_AND_COPY to set up names. Set up proper
name_pl values for cases that change name. In apply_lighter, call fix_player
if player is lighting an object in his inventory - necessary for the
players glow_radius to get updated so the change actually takes effect.
socket/request.c: Modify esrv_map_scroll so that it properly clears cells
that are moving out of view - failure to do this was resulting in the
map1a updating these spaces with empty faces. This was causing
fog of war wackiness with the client.
MSW 2002-06-06
Show difference between Revision 1.16 and 1.17
Revision 1.16mwedel 2002/05/18 19:30:23 +3 -1
Patch to prevent players with no experience from saving. This apparantly
should prevent some abuses. MSW 2002-05-18
Show difference between Revision 1.15 and 1.16
Revision 1.15avogl 2002/03/03 14:05:58 +2 -2
two fixes to my dragon-race code:

- fixed stringcompares wich caused crashed
with players that have race NULL.
- forgot to commit "server/init.c" before,
which resulted in function dragon_ability_gain()
not to get bound, thus missing dragon ability gains.
Show difference between Revision 1.14 and 1.15
Revision 1.14avogl 2002/03/01 15:33:11 +8 -2
As announced on cf-devel, this is the patch which
adds a new dragon-race to Crossfire.
Players of this dragon race can gain resistances
by eating the flesh of their defeated foes.

They can also specify in a certain resistance-type
and gain various abilities when increasing levels.
This "focus" can be switched by eating very special
As announced on cf-devel, this is the patch which
adds a new dragon-race to Crossfire.
Players of this dragon race can gain resistances
by eating the flesh of their defeated foes.

They can also specify in a certain resistance-type
and gain various abilities when increasing levels.
This "focus" can be switched by eating very special
flesh, which will be available for sale.
Dragon players gain special titles which cannot
be overwritten by manually set titles.

Also see the dragon race description during the
race selection process.
Note that the quetzal has been slightly modified
(picture and race) to prevent getting mixed up with
the new dragon race.

Please keep in mind that this is the first version
of this dragon-race-code. Do not expect it to be
perfectly balanced in all aspects.
Player's opinions will provide some good feedback
for further development I hope.

--AndreasV
Show difference between Revision 1.13 and 1.14
Revision 1.13garbled 2001/09/27 14:37:39 +7 -1
Add a new command category called communications commands. Place tell,
shout and say in here. Also create emotion functions. These functions
have no real effect on the game, but make communications between players
more colorful and fun. They are mostly fluff. Included with this patch
are two new convenience functions, new_info_map_except, and
new_info_map_except2, which allow the programmer to write to an entire
map, except for certain individuals.

Tested by myself, mids, and gros, with thanks to them for fixing
something I didn't catch.

garbled 2001-09-27
Show difference between Revision 1.12 and 1.13
Revision 1.12mwedel 2001/07/13 23:11:18 +16 -21
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.11 and 1.12
Revision 1.11mwedel 2001/06/04 01:41:02 +6 -6
Checkin of code that supports larger map sizes (configurable in
config.h).
common/los.c: update los code since it only handled 11x11 maps. Now
uses formulatic approach so any map size should be supported. This
does result in a few more spaces getting blocked around corners,
but it doesn't seem that bad - certainly not compared to the ability
to have larger viewable maps.
common/map.c, crossedit/CrEdit.c, crossedit/Edit.c, include/global.h,
include/map.h,random_maps/monster.c,random_maps/special.c,
random_maps/standalone.c, server/apply.c,server/c_misc.c,
server/spell_effect.c,socket/info.c:
change mapx,mapy to what they really point to,
as it prevented using those as variable/structure element names.
common/object.c: update_position - if faces for different layers are
duplicate, set the duplicates to be blank to increase client
update efficiency.
doc/Protocol: Add map1 command description, update setup command to
describe setting of mapsize.
include/config.h: add MAP_CLIENT_X/Y to set maximum map size we can
send to the client.
include/newserver.h: add mapx, mapy values to socket structure
include/player.h: Use MAP_CLIENT_X/Y for sizing arrays that hold
map related information in player structure.
server/player.c: As per player.h above, use appropriate sizing when
initializing player stucture.
server/shop.c: Update mapx,mapy like above, but re-do shop listings code as
it was doing a lot more work than necessarily (I think some changes
got put in for sorting, and the old object manipulation was never
removed when that got done)
socket/init.c: set default client map size to 11x11 in the socket.
socket/item.c: LookAt - change checks for position checking (such that
you can only look at things in bounds) use max viewable map size.
socket/request.c: Make setup commands a little more forgiving if there are
extra spaces. Add 'mapsize' command to setup command. Update
old map sending code to use socket map sizes (to support even
smaller than normal maps, or 13x13 or 15x15 maps). add draw_client_map1
command which implements the map1 protocol command.
MSW 2001-06-03
Show difference between Revision 1.10 and 1.11
Revision 1.10mwedel 2001/05/09 01:58:12 +26 -2
Various improvements to make finding memory leaks easier.
common/anim.c: Add free_all_anim function
common/arch.c: Modify free_all_arch to free more data
common/init.c: If running under MEMORY_DEBUG, don't pre-allocate objects.
common/map.c: Add free_all_maps functiion.
common/object.c: Modify object allocations if using MEMORY_DEBUG to only
malloc one object at a time, and not pre-allocate objects.
common/readable.c: Fix memory leak.
common/shstr.c: Include autoconf.h so it can pull in dmalloc.h file.
include/config.h: Remove notes of what was removed a long time ago.
Add MEMORY_DEBUG option.
include/libproto.h, include/sockproto.h, include/sproto.h: automatic rebuild
server/c_misc.c: Fix 'malloc info command so it reports right memory total
for maps. Add command_style_map_info which sums up memory used by
style maps.
server/commands.c: Add style_info wiz command which dumps memory usage
for style maps.
server/init.c: Have sighup handler call cleanup function.
server/main.c: Fix clean_tmp_files which could result in crash if one
of the maps in memory has 0 reset time. Modify cleanup function
to free more data.
server/player.c: op_on_battleground: Fix compile warning about unuused variable.
socket/init.c: Change name of free_all_ericserver to free_all_newserver,
have it free all face data.
MSW 2001-05-08
Show difference between Revision 1.9 and 1.10
Revision 1.9mwedel 2001/02/23 00:06:35 +7 -15
MSW 2001/02/22:
TODO: Add some items, remove some others, remove outline of future versions,
since it was out of date.
common/loader.l,loader.c: Declare msgbuf a static outside the lex_load function.
lex_load was otherwise clearing it each time it was called, which resulted
in empty messages for the random artifacts (since the call lex_load one
line at a time). Instead, we just zero this at start of load_object.
Original reason of this change was due to purify errors - as I look at the
code, it appears even before these changes that it was clearing the buffer
properly.
common/map.c: removing pending field from map objects.
common/re-cmp.c: Comment out some code which was resulting in too many
false compares.
include/config.h: increase default for MAX_OBJECTS. 6000 is a bit small
on current systems.
include/map.h: Remove pending field from map structure.
random_maps/treasure.c: Increase size of doorlist. Fixes crash, in that
if a random map could place 8 doors around the treasure, the list
was not terminated, so the problem would eventually try to read/dereference
random memory after the array.
server/c_misc.c: Remove pending field from maps, so remove functions
and other places that referred to it (like the maps command)
server/c_wiz.c: fix up wiz map reset command. Not really tested, but
old code had some definate problems just from visual inspection.
server/main.c: Further fix for unique exits - relative paths to unique maps
from non unique maps should now work.
server/monster.c: Various fixes - one is that should get more reliable distance
values for multipart monsters. Second, modify dist_att to calculate from
closest part of monster, and not the head of the monster.
server/pets.c: Remove code dealing with pending objects.
server/player.c: Don't remove invisible objects in players inventory when
playing with permadeath mode.
server/spell_util.c: If you try to cast denied spell, it no longer costs any
spellpoints.
socket/item.c: Fix bug where it was using 'item' protocol command instead of
'item1'
End of MSW 2001/02/22 checkin.
Show difference between Revision 1.8 and 1.9
Revision 1.8pjka 2001/01/16 16:19:33 +3 -2
passwd length atmost 16 chars
Show difference between Revision 1.7 and 1.8
Revision 1.7pjka 2001/01/12 06:32:49 +4 -2
You could crash server with an overly long name. Name can now be at max 31 chars long.
Show difference between Revision 1.6 and 1.7
Revision 1.6cvs 2000/12/18 01:38:25 +422 -3
MSW 2000/12/17: Various changes. Note that the scope of files in this checkin
make it appear that a lot was changed, but in fact it was mostly just
re-orginization - very little code has actually changed.
include/autoconf.h.in: Add HAVE_LIBDES to file.
include/config.h: Remove comments after defines for MAP_MIN/MAX timeouts.
This just removes some warnings during compile. comments are now
on lines by themselves.
include/player.h: remove shootstrength for player structure. It was unused.
server/Makefile.in: remove input.c file, add c_range.c file.
server/c_chat.c: remove command_last, add command_shout and command_tell
from input.c to this file. Also fix bug in command tell which
would let players crash server at will.
server/c_misc.c,server/c_object.c: Relocate many functions
from input.c into these files.
server/c_move.c, server/c_new.c: Add standard crossfire banner comment.
server/c_range.c: New file - contains range related commands,
including spell casting (relocated from input.c)
server/c_wiz.c: move command_invisible from input.c into this file.
server/commands.c: Remove unused commands (bell, last, strength)
server/input.c: removed file.
server/main.c: Change HAVE_DES_H to HAVE_LIBDES
server/player.c: When choosing a race, draw it facing south for best
presentation of image.
server/spell_util.c: Remove dead code (#if 0 shootstrength related
code)
socket/loop.c: remove unused variables.
NOTE: Due to the addition/removal of files, you will need to do
'config.status; make depend; make' from the top level directory for
everything to be compiled properly.
End of MSW 2000/12/17 checkin.
Show difference between Revision 1.5 and 1.6
Revision 1.5cvs 2000/12/04 01:19:56 +9 -23
MSW 2000/12/3:
Misc changes. Main one is adding PNG support to the editor.
TODO: Remove outdated things to do (like partial resistance code)
configure, configure.in, include/autoconf.h.in: Add check for libpng.
include/global.h: Remove displaymodes - moved to crossedit/Defines.h
crossedit/App.c, crossedit/App.h crossedit/CrEdit.c crossedit/CrFace.c
crossedit/CrList.c crossedit/CrUtil.c crossedit/Edit.c crossedit/crossedit.c
crossedit/xutil.c, crossedit/png.c (new file): Add support for png display
in crossedit.
crossedit/Makefile.in: Add png.c file.
server/c_misc.c: Change who command to only display real players, and not
players in process of connecting/unconnecting. Also, remove code to display
old sockets, since those are not supported anymore.
Show difference between Revision 1.4 and 1.5
Revision 1.4cvs 2000/12/03 18:40:05 +16 -1
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.3 and 1.4
Revision 1.3cvs 2000/04/22 02:16:41 +30 -1
Key usage change: Add new command 'usekeys' that specify how keys
are searched for. The three options are inventory, keyrings, and containers.
These options apply to both standard keys and special keys. If the player
has a key for the door but it is in a container that will not be used,
print a friendly message of the key name and container name. Files
affected:
help/usekeys: Added describing options
lib/Makefile.in: Addition of help/usekeys above.
include/player.h: Add new enumeration and entry into player structure
include/sproto.h: New function prototype
server/apply.c: change of Find_Key to new function with slightly
different options
server/c_misc.c: add function to support 'usekeys command.
server/commands.c: addition of usekeys command
server/player.c: rewrite & rename of find_key command, as well as changes
to move_player_attack
Mark Wedel 4/21/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


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