Protocol: | pserver | User: | anonymous |
Machine: | crossfire.cvs.sourceforge.net | CVSROOT: | /cvsroot/crossfire |
Filename: shop.c | |||
Revision 1.59 | qal21 | 2006/09/09 18:43:12 | +17 -1 |
Add is_in_shop() and coords_in_shop() based on addition of is_in_shop() in cf+ by elmex. | |||
Show difference between Revision 1.58 and 1.59 | |||
Revision 1.58 | lalo | 2006/09/06 16:58:00 | +2 -2 |
making sure shops don't give jade/amber. For real this time. | |||
Show difference between Revision 1.57 and 1.58 | |||
Revision 1.57 | mwedel | 2006/09/04 02:21:05 | +58 -30 |
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.56 and 1.57 | |||
Revision 1.56 | ryo_saeba | 2006/08/07 02:22:19 | +8 -5 |
Patch #1389033 (Large-value coins) courtesy Lalo Martins | |||
Show difference between Revision 1.55 and 1.56 | |||
Revision 1.55 | tchize | 2006/07/25 14:14:24 | +136 -132 |
improved indentation on some functions | |||
Show difference between Revision 1.54 and 1.55 | |||
Revision 1.54 | ryo_saeba | 2006/05/05 04:47:40 | +2 -2 |
Third and last part of patch #1453869 courtesy Stefan Huehner (shuehner) | |||
Show difference between Revision 1.53 and 1.54 | |||
Revision 1.53 | akirschbaum | 2006/03/07 15:28:38 | +10 -9 |
Fix possible exploit with shadow alchemy. Also improve the alchemy spell to yield more nuggets. | |||
Show difference between Revision 1.52 and 1.53 | |||
Revision 1.52 | akirschbaum | 2006/02/10 17:59:28 | +14 -12 |
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.51 and 1.52 | |||
Revision 1.51 | akirschbaum | 2006/02/04 09:46:24 | +5 -5 |
Add trailing \\n to LOG() messages. | |||
Show difference between Revision 1.50 and 1.51 | |||
Revision 1.50 | cavesomething | 2005/11/19 15:05:30 | +3 -3 |
increase the minimum value that shop_specialisation_ratio returns to 0.1 to stop very high shop prices | |||
Show difference between Revision 1.49 and 1.50 | |||
Revision 1.49 | cavesomething | 2005/11/09 09:37:29 | +2 -1 |
check all unpaid items on leaving shops, not stopping when we reach the bottom of a container | |||
Show difference between Revision 1.48 and 1.49 | |||
Revision 1.48 | akirschbaum | 2005/11/05 14:38:24 | +8 -5 |
server/shop.c: In value_limit() return the unmodified item price if not in a shop or not for a player. | |||
Show difference between Revision 1.47 and 1.48 | |||
Revision 1.47 | akirschbaum | 2005/10/28 14:08:53 | +5 -4 |
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.46 and 1.47 | |||
Revision 1.46 | cavesomething | 2005/10/21 14:03:24 | +57 -17 |
make shops check if a player can afford all items, before buying any of them | |||
Show difference between Revision 1.45 and 1.46 | |||
Revision 1.45 | ryo_saeba | 2005/10/06 16:25:43 | +2 -2 |
Declaration are before assignments. | |||
Show difference between Revision 1.44 and 1.45 | |||
Revision 1.44 | cavesomething | 2005/10/06 08:18:54 | +17 -6 |
fix value calculations for alchemy and pickup code | |||
Show difference between Revision 1.43 and 1.44 | |||
Revision 1.43 | qal21 | 2005/10/06 00:27:35 | +3 -3 |
Fix segfault upon alchemy spell after updating to the new shop code: Make sure who is non-null in query_cost for certain portions of logic. | |||
Show difference between Revision 1.42 and 1.43 | |||
Revision 1.42 | ryo_saeba | 2005/10/04 12:16:05 | +7 -6 |
Fix Windows compilation | |||
Show difference between Revision 1.41 and 1.42 | |||
Revision 1.41 | cavesomething | 2005/10/03 23:39:19 | +9 -1 |
fix segfault in shops code when passed broken objects. | |||
Show difference between Revision 1.40 and 1.41 | |||
Revision 1.40 | cavesomething | 2005/10/02 22:29:41 | +297 -23 |
add support for specialised shops | |||
Show difference between Revision 1.39 and 1.40 | |||
Revision 1.39 | ryo_saeba | 2005/08/12 08:46:34 | +2 -2 |
Fields changed from char* to const char*, cleanup. | |||
Show difference between Revision 1.38 and 1.39 | |||
Revision 1.38 | ryo_saeba | 2005/08/12 03:18:59 | +3 -3 |
Use const char* instead of char* when possible | |||
Show difference between Revision 1.37 and 1.38 | |||
Revision 1.37 | akirschbaum | 2005/07/14 04:18:55 | +6 -2 |
common/{button.c, treasure.c, utils.c}, server/{c_wiz.c, login.c, shop.c, skill_util.c, spell_effect.c}, socket/{image.c, item.c}: Fix printf like format specifiers. At least one of them fixes a means to crash the server. Andreas Kirschbaum 2005-07-14 | |||
Show difference between Revision 1.36 and 1.37 | |||
Revision 1.36 | akirschbaum | 2005/07/10 08:54:07 | +2 -1 |
server/{login.c, player.c}: Fix buffer overflow with pl->title. Based on patch by Scott Kullberg. crossedit/{Edit.c, Cnv/CnvPrompt.c}, server/{ban.c, hiscore.c, login.c, player.c, shop.c, win32.c}: Properly terminate destination string of strncpy with '\0'. | |||
Show difference between Revision 1.35 and 1.36 | |||
Revision 1.35 | mwedel | 2005/04/14 01:12:57 | +15 -16 |
server/shop.c: Pass in player object to pay_from_container() - code was trying to deref pouch->contr which was null. Only occurs when player has 2 different money objects of the same type, but 2 crashes observed on metalforge. MSW 2005-04-13 | |||
Show difference between Revision 1.34 and 1.35 | |||
Revision 1.34 | akirschbaum | 2005/03/06 14:38:54 | +6 -6 |
common/{map.c, readable.c, treasure.c}, crossedit/Attr.c, server/{apply.c, attack.c, c_wiz.c, init.c, monster.c, pets.c, shop.c, skill_util.c, skills.c, spell_attack.c, spell_effect.c, time.c}, socket/{info.c, request.c}: Add missing newline character to LOG() messages. | |||
Show difference between Revision 1.33 and 1.34 | |||
Revision 1.33 | akirschbaum | 2005/01/07 06:00:01 | +2 -2 |
include/sproto.h, plugin/plugin_python.c, server/plugins.c, server/shop.c: Use uint64 type for variables holding money. Use Python long integers to pass these variables to/from the Python plugin. | |||
Show difference between Revision 1.32 and 1.33 | |||
Revision 1.32 | akirschbaum | 2004/08/24 14:43:59 | +11 -7 |
include/define.h server/shop.c add new flags F_IDENTIFIED and F_NOT_CURSED to query_cost() to pretend the item to be identified/not cursed or damned. server/alchemy.c fix possible abuse of shadow alchemy: do not allow the generated items to be more valuable than the ingredients when using alternate recipes. | |||
Show difference between Revision 1.31 and 1.32 | |||
Revision 1.31 | akirschbaum | 2004/06/13 12:30:38 | +15 -11 |
common/object.c include/define.h include/player.h include/sproto.h server/attack.c server/c_object.c server/player.c server/shop.c socket/item.c socket/loop.c socket/request.c: Remove explicit calls to esrv_update_item(UPD_WEIGHT, pl, pl) for player objects. Instead send the new weight whenever it changes. | |||
Show difference between Revision 1.30 and 1.31 | |||
Revision 1.30 | mwedel | 2004/05/06 02:04:23 | +3 -4 |
Fix problem with shop not making change - wrong type of variable used. MSW 2004-05-05 | |||
Show difference between Revision 1.29 and 1.30 | |||
Revision 1.29 | ryo_saeba | 2004/05/03 16:38:48 | +3 -3 |
Win32 fixes | |||
Show difference between Revision 1.28 and 1.29 | |||
Revision 1.28 | mwedel | 2004/04/25 02:17:40 | +185 -165 |
Change most shop buy/sell functions to use 64 bit values. Problem arises where player would sell valuable item, and if they wanted to buy them back, it would overflow a 32 bit value, so they could buy them back for free. Note quite as odd when you consider the buy/sell price for really valuable items to be very different. include/global.h: Add UINT32_MAX and other max type defines for our typedef values so that we have standard setting of what the cap is. server/apply.c: Change get_payment call to take second argument. server/plugins.c: Add note about bug in handling of query_cost in this function. server/shop.c: query_cost() now returns 64 bit. Many other functions updated to also take/return 64 bit cost values. Have cost_string nicely deal with values that are beyond affordability. Rename get_payment2() to get_payment(), and remove the later, which was just a simple wrapper function that called get_payment2. server/spell_effect.c: Update alchemy code. Remove some suspect use of static values. MSW 2004-04-24 | |||
Show difference between Revision 1.27 and 1.28 | |||
Revision 1.27 | akirschbaum | 2004/04/16 11:28:22 | +2 -2 |
server/shop.c: Decrease adjustment limit for expensive items to 10000 to get a continuous adjustment function. That is you will get much less when selling items with a value between 800pp and 2000pp. Andreas Kirschbaum 2004-04-16 | |||
Show difference between Revision 1.26 and 1.27 | |||
Revision 1.26 | mwedel | 2004/02/16 21:38:59 | +146 -112 |
include/define.h,server/shop.c: Apply patch by Bernd Edler that gives bargaining experience based on the amount of money a character saves. Higher the bargaining skill, the more money they can save. MSW 2004-02-16 | |||
Show difference between Revision 1.25 and 1.26 | |||
Revision 1.25 | mwedel | 2003/10/26 01:56:57 | +2 -2 |
common/glue.c, common/object.c, common/player.c, include/funcpoint.h, server/init.c, server/monster.c, server/shop.c, server/skill_util.c: add find_skill_by_number() function - this replaces find_skill. Locate new function in skill_util.c, which is more a proper place than common/player.c - this change necessitated adding glue function pointers so the other common files can call it. server/spell_effect.c: Fix cast_heal() so if the spell is not one that heals hit points, don't process the code that checks for that and sets a false success value. socket/metaserver.c: Clean up formatting - no code changes. MSW 2003-10-25 | |||
Show difference between Revision 1.24 and 1.25 | |||
Revision 1.24 | mwedel | 2003/09/13 00:02:12 | +9 -12 |
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.23 and 1.24 | |||
Revision 1.23 | tchize | 2003/09/03 08:42:19 | +4 -1 |
Allow renaming items for users. Thanks to Nicolas Weeger (Ryo) | |||
Show difference between Revision 1.22 and 1.23 | |||
Revision 1.22 | garbled | 2003/02/09 01:30:50 | +1 -126 |
Remove the supplydb code. It has served it's purpose, and if we decide we want to investigate that again.. thats what cvs -r is for. | |||
Show difference between Revision 1.21 and 1.22 | |||
Revision 1.21 | garbled | 2003/01/28 17:43:46 | +3 -1 |
Apparently nrof==0 == 1. I did not know that. | |||
Show difference between Revision 1.20 and 1.21 | |||
Revision 1.20 | garbled | 2003/01/26 00:00:29 | +122 -1 |
Experimental code to attempt a supply and demand based economy for shops. This code lays the framework for a supply and demand based pricing scheme, and tracks all purchases and sales by players. It calculates what the price for the item should be, based on the data it has collected. However.. the code to make it actually chaneg the prices in the game has not been added. At this stage, the code only tracks the prices in a database, var/supplydb. It is my intention to collect this data from running servers to see what effect such a change would make. It is quite possible that this scheme will be backed out, and a different one used based on the data collected. The data should give us a reasonable picture of what is sold and purchased in the game, to better judge future economic changes. There should be no gameplay changes from this commit. | |||
Show difference between Revision 1.19 and 1.20 | |||
Revision 1.19 | mwedel | 2003/01/17 00:23:55 | +23 -9 |
More bug fixes: common/item.c: Add missing braces - was resulting in some items getting display like 'gauntlets of strength (Str+1)(Str+1). include/map.h: Add MAGIC_MAP definitions to the file. server/shop.c: Put back in code that uses magic_mapping_mark to determine what items to display in inventory. Update for new one magic mapping code stores information away. server/spell_util.c: Add missing P_OUT_OF_FLAG check, which resulted in crashes. socket/info.c: Move MAGIC_MAP definations to map.h. Add check for P_OUT_OF_MAP. Remove code that stops on P_NO_MAGIC - with that it wouldn't search the shops. MSW 2003-01-16 | |||
Show difference between Revision 1.18 and 1.19 | |||
Revision 1.18 | garbled | 2003/01/09 14:22:11 | +9 -16 |
Mark's magic mapping fix broke shop inventories. Fix. | |||
Show difference between Revision 1.17 and 1.18 | |||
Revision 1.17 | mwedel | 2003/01/08 02:39:20 | +3 -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.16 and 1.17 | |||
Revision 1.16 | mwedel | 2002/12/03 01:40:18 | +22 -7 |
TODO: Move more items from my mailbox to the TODO list. common/living.c: Init item_power in player to zero in fix_player() - bogus results were getting generated as it just kept getting incremented. common/porting.c: fix remove_directory so it works properly - checking for . and .. entries too late, calling unlink instead of rmdir. include/sproto.h: rebuilt lib/animations, lib/archetypes, lib/bmaps, lib/bmaps.paths, lib/crossfire.0, lib/crossfire.1, lib/faces: Rebuilt - new archs added, catch is_thrown addition to thrown rock/boulder archs. server/c_move.c, server/c_range.c: Add another parameter to do_skill() - part, which is closest part of creature to target object - current only used for the throw code. Update calls to this function to add additional parameter. server/c_object.c: Remove the NDI_UNIQUE from the 'item is too heavy to pick up' so that it won't flood the client with them if players goes onto space with lots of objects. server/main.c: Minor cleanup to fix compiler warning about ambigous if/else. server/monster.c: Pass closest part of monster when having it use a skill so that it doesn't throw rocks into itself. Update calls to do_skill as described above. server/player.c: Cal delete_player() when player quits - this properly cleans up any per player unique maps they have. Also, check for any such maps currently in memory, and delete those so that unique maps don't get 'gifted' to the next character of the same name. Update calls to do_skill as described above. server/shop.c: Combine items of the same name together in the output of the shop listings. Include the number of items, remove special casing of some objects so that query_base_name is used for all item types. server/skill_util.c: Modify do_skill() to take additional param as described above. Also, have do_skill return 1 on success, 0 on failur to use skill, and not return exp - otherwise, monster code has no idea if skill was successfully used, as throw doesn't grant exp, and this caused monsters to move into the object they just threw. Update calls to do_skill as described above. server/skills.c: Clean up skill_throw function to return meaningfull value. Also, pass along extra part of closest monster part to target. Modify do_throw to return value, use closest part of body as origin point for thwon object. server/spell_effect.c: Use isqrt function instead of definining ISQRT that used float version. Cleans up compile warning - most likely not seen before as spell was #ifdef SPELL_ENCUMBERANCE out. server/time.c: Put sanity checking for players speed_left in move_player_mover() - got some reports of infinite negative speed on metalforge, and this is the only place in the code where I could see that happening given the description of the events. utils/arch2xml.py, utils/cfarches.xsl: New script (and template) by Todd Mitchell. Script can convert archs to xml, and the template is usuable with mozilla to look at the output. MSW 2002-12-02 | |||
Show difference between Revision 1.15 and 1.16 | |||
Revision 1.15 | garbled | 2002/11/12 22:57:32 | +3 -11 |
#ifdef REAL_WIZ -> settings.real_wiz #ifdef RECYCLE_TMP_MAPS -> settings.recycle_tmp_maps Even found a cute bug while fixing up real_wiz. | |||
Show difference between Revision 1.14 and 1.15 | |||
Revision 1.14 | mwedel | 2002/07/14 23:57:13 | +5 -6 |
-- 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.13 and 1.14 | |||
Revision 1.13 | gros | 2001/10/21 04:07:12 | +42 -15 |
Some plugins improvements and bugfixes - Chachkoff Y. 10/21/01 | |||
Show difference between Revision 1.12 and 1.13 | |||
Revision 1.12 | mwedel | 2001/07/13 23:11:18 | +7 -7 |
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.11 | mwedel | 2001/06/07 01:08:23 | +10 -7 |
server/shop.c: Fix bug that resulted in items in shop being paid, as well as not generating proper listing. MSW 2001-06-06. | |||
Show difference between Revision 1.10 and 1.11 | |||
Revision 1.10 | mwedel | 2001/06/04 01:41:02 | +48 -49 |
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.9 and 1.10 | |||
Revision 1.9 | mwedel | 2001/05/09 01:58:12 | +3 -1 |
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.8 and 1.9 | |||
Revision 1.8 | mwedel | 2001/05/08 18:10:26 | +2 -1 |
Fix memory leak. MSW 2001-05-08 | |||
Show difference between Revision 1.7 and 1.8 | |||
Revision 1.7 | peterm | 2000/10/05 13:42:42 | +2 -2 |
Fix for crashing bug discovered by avogl. Put in a check preventing a division by zero. | |||
Show difference between Revision 1.6 and 1.7 | |||
Revision 1.6 | cvs | 2000/08/07 00:16:34 | +5 -5 |
The following change basically does the following: When the server sends an item name to the client, this item name is now two pieces - the first piece of the name is its singular form, the second piece is the plural name. This now makes items in the inventory appear more proper in terms of pluralization and just normal English. I did notice that the server does not know how to properly make 'torch' plural - it turns it into torchs. A matching check in for the client has also been done. include/newserver.h: Update VERSION_SC to 1024 common/item.c: Change query_base_name to take a second option on whether we should generate a plural version of the name or not. socket/item.c: Modify functions to use second argument on the query_base_name function. Update item commands to send two part names (singular & plural). Modify esrv_send_look to use item1 protocol command instead of item command. server/c_object.c: Update item_matched_string to use second option to query_base_name. Modify function to check against both singular and plural versions of name. server/shop.c: Modify shop_listing command usage in query_basename to use second option. It will also generate the singular name, but that is only used on sorting, so I don't think it will generally cause any problems. include/libproto.h: rebuilt because query_base_name has an addition opt. Mark Wedel 8/13/2000 | |||
Show difference between Revision 1.5 and 1.6 | |||
Revision 1.5 | jec | 2000/06/08 11:08:41 | +2 -2 |
common/button.c: do_mood_floor(): Bugfixes: Only players can have pets. Call add_friendly_object() for friendly monsters. server/spell_effect.c and server/spell_util.c: Several functions: Only add a pet if there really is a pet's owner, and it's a player. server/spell_effect.c: cast_charm() and cast_charm_undead(): Bugfixes: Only players can cast these spells. This fixes server crash if a monster casted a charm spell, and the charmed pet was killed. Call add_friendly_object for friendly monsters. common/friend.c: remove_friendly_object(): Use llevError for error messages. common/living.c: fix_player(); server/gods.c: tailor_god_spell(); server/spell_effect.c: summon_avatar() and animate_weapon(): Bugfix: Set a string to NULL after calling free_string(). This fixes a nasty bug that caused the string's reference count drop below 0, which resulted in corruption of malloc()'s internal data structures (and possibly server crashes). server/time.c: move_creator(): Bugfix: Call free_string() to free old values of op->name and op->title before overwriting them with new values. common/object.c: insert_ob_in_map_simple() and insert_ob_in_map(): Check that we don't insert freed objects. server/attack.c: hit_player_attacktype() and hit_player(): Bugfix: Check that find_god() really found a god, and that 'god->slaying' is not NULL. Fixes crash if a monster casted turn undead and actually hit something. server/attack.c: hit_player(): Check that a pet's owner is a player. Prevents server crashes if a monster has a pet monster due to a bug somewhere. Use llevError for error message. server/time.c: move_arrow(): Use llevDebug level for "Arrow had no map" message. server/c_object.c, server/spell_effect.c, server/spell_util.c: Bugfixes: Added some missing checks for destroyed objects. Use was_destroyed() or return value of insert_ob_in_map() to check for destroyed objects, not FLAG_FREED or FLAG_REMOVED. Don't use op->count of destroyed objects. server/shop.c: get_payment2(): Type of tag is 'tag_t', not 'long'. server/spell_effect.c: animate_bomb(): Fix environment checks. server/spell_util.c: fire_bolt(): Bugfix: Set level of bolt. server/spell_util.c: explosion(): Bugfix: Set FLAG_NO_APPLY before moving the exploding object to the top. server/spell_util.c: put_a_monster(): First create the monster completely, then just insert its head. server/time.c: generate_monster(): Bugfix: Don't free generators that are used up in this function. process_object() already does this. This fixes steambolt (which is a generator but must not used up here - generate_monster() wasn't looking at FLAG_IS_USED_UP) and all generators which should really be used up (because process_object() didn't expect generate_monster() to destroy the object). | |||
Show difference between Revision 1.4 and 1.5 | |||
Revision 1.4 | damn | 1999/09/17 14:11:24 | +121 -64 |
- payment will come from open pouches if you don't have enough in your top-level inventory - money for sold items will go into open pouches until they're full, then overflow into top-level inventory --DAMN | |||
Show difference between Revision 1.3 and 1.4 | |||
Revision 1.3 | cvs | 1999/07/30 00:01:38 | +15 -3 |
Small mod to cause unidentified stuff, which is to be sold, to sell for no more than 3x the cost of identification. | |||
Show difference between Revision 1.2 and 1.3 | |||
Revision 1.2 | cvs | 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.1 | uid200 | 1999/04/02 13:10:04 | None |
Initial revision | |||
First version | |||
Revision 1.1.1.1 | uid200 | 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 |