Revision: 6136
http://daimonin.svn.sourceforge.net/daimonin/?rev=6136&view=rev
Author: franklinb
Date: 2011-01-22 02:36:35 +0000 (Sat, 22 Jan 2011)
Log Message:
-----------
Commit the first interim version, 0.10.5-a, to Main.
Modified Paths:
--------------
main/server/lib/archetypes
main/server/lib/bmaps
main/server/lib/daimonin.0
main/server/make/_outdated/VisualC7/daimonin_server.vcproj
main/server/make/linux/CodeBlocks/daimonin_server.cbp
main/server/make/win32/CodeBlocks/daimonin_server.cbp
main/server/make/win32/VisualC/daimonin_server.vcproj
main/server/src/common/arch.c
main/server/src/common/exp.c
main/server/src/common/food.c
main/server/src/common/info.c
main/server/src/common/living.c
main/server/src/common/loader.l
main/server/src/common/logger.c
main/server/src/common/map.c
main/server/src/common/object.c
main/server/src/common/porting.c
main/server/src/common/readable.c
main/server/src/common/request.c
main/server/src/common/view_map.c
main/server/src/common/win32.c
main/server/src/include/Makefile.in
main/server/src/include/arch.h
main/server/src/include/debug.h
main/server/src/include/global.h
main/server/src/include/libproto.h
main/server/src/include/logger.h
main/server/src/include/map.h
main/server/src/include/player.h
main/server/src/include/plugin.h
main/server/src/include/protocol.h
main/server/src/include/sproto.h
main/server/src/plugin_lua/daimonin_game.c
main/server/src/plugin_lua/daimonin_object.c
main/server/src/plugin_lua/include/daimonin_game.h
main/server/src/plugin_lua/include/daimonin_object.h
main/server/src/server/Makefile.in
main/server/src/server/apply.c
main/server/src/server/attack.c
main/server/src/server/ban.c
main/server/src/server/c_misc.c
main/server/src/server/c_party.c
main/server/src/server/c_wiz.c
main/server/src/server/gods.c
main/server/src/server/init.c
main/server/src/server/ipcompare.c
main/server/src/server/main.c
main/server/src/server/monster_behaviours.c
main/server/src/server/monster_memory.c
main/server/src/server/move.c
main/server/src/server/plugins.c
main/server/src/server/spawn_point.c
main/server/src/server/time.c
main/server/src/socket/commands.c
main/server/src/socket/connect.c
main/server/src/socket/init.c
main/server/src/socket/loop.c
main/server/src/socket/lowlevel.c
main/server/src/socket/read.c
Added Paths:
-----------
main/server/src/include/exp.h
Removed Paths:
-------------
main/server/src/server/swap.c
Property Changed:
----------------
main/server/
Property changes on: main/server
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/server:5775-5854,5858-5874,5876-6010,6012-6020,6107
+ /trunk/server:5775-5854,5858-5874,5876-6010,6012-6020,6022-6135
Modified: main/server/lib/archetypes
===================================================================
--- main/server/lib/archetypes 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/lib/archetypes 2011-01-22 02:36:35 UTC (rev 6136)
@@ -6397,7 +6397,7 @@
no_pick 1
end
Object aggro_history
-editor_folder intern/intern
+editor_folder intern
type 127
layer 0
no_save 1
@@ -6406,7 +6406,7 @@
no_drop 1
end
Object base_info
-editor_folder intern/intern
+editor_folder intern
type 101
layer 0
sys_object 1
@@ -6414,7 +6414,7 @@
no_drop 1
end
Object dmg_info
-editor_folder intern/intern
+editor_folder intern
type 128
layer 0
no_save 1
@@ -6423,12 +6423,12 @@
no_drop 1
end
Object empty_archetype
-editor_folder intern/intern
+editor_folder intern
type 79
sys_object 1
end
Object floor_g
-editor_folder intern/intern
+editor_folder intern
no_teleport 1
layer 1
terrain_type 1
@@ -6436,14 +6436,14 @@
no_pick 1
end
Object fmask_g
-editor_folder intern/intern
+editor_folder intern
no_teleport 1
layer 2
type 28
no_pick 1
end
Object tabernacle_avatar_info
-editor_folder intern/gods
+editor_folder intern
type 8
layer 0
sys_object 1
@@ -6455,7 +6455,7 @@
msg
You feel a bond with the powers of the Tabernacle.
endmsg
-editor_folder intern/gods
+editor_folder intern
type 8
layer 0
sys_object 1
@@ -6463,7 +6463,7 @@
face power.101
end
Object tabernacle_holy_servant_info
-editor_folder intern/gods
+editor_folder intern
type 8
layer 0
sys_object 1
@@ -6472,7 +6472,7 @@
face power.101
end
Object god_cure_blindness
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name heal spell
@@ -6480,7 +6480,7 @@
face power.101
end
Object god_cure_confusion
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name heal spell
@@ -6488,7 +6488,7 @@
face power.101
end
Object god_cure_disease
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name heal spell
@@ -6496,7 +6496,7 @@
face power.101
end
Object god_cure_poison
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name heal spell
@@ -6504,7 +6504,7 @@
face power.101
end
Object god_grace_limit_high
-editor_folder intern/gods
+editor_folder intern
name grace limit
face power.101
sys_object 1
@@ -6512,7 +6512,7 @@
grace 600
end
Object god_grace_limit_insane
-editor_folder intern/gods
+editor_folder intern
name grace limit
face power.101
sys_object 1
@@ -6520,7 +6520,7 @@
grace 1000
end
Object god_grace_limit_low
-editor_folder intern/gods
+editor_folder intern
name grace limit
face power.101
sys_object 1
@@ -6528,7 +6528,7 @@
grace 100
end
Object god_grace_limit_medium
-editor_folder intern/gods
+editor_folder intern
name grace limit
face power.101
sys_object 1
@@ -6536,42 +6536,42 @@
grace 300
end
Object god_remove_curse
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name remove curse
face power.101
end
Object god_remove_damnation
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name remove damnation
face power.101
end
Object god_remove_depletion
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name heal depletion
face power.101
end
Object god_restore_grace
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name restore grace
face power.101
end
Object god_restore_hitpoints
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name restore hitpoints
face power.101
end
Object god_restore_spellpoints_high
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name restore spellpoints
@@ -6579,7 +6579,7 @@
face power.101
end
Object god_restore_spellpoints_low
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name restore spellpoints
@@ -6587,7 +6587,7 @@
face power.101
end
Object god_restore_spellpoints_medium
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name restore spellpoints
@@ -6595,7 +6595,7 @@
face power.101
end
Object god_restore_spellpoints_very_high
-editor_folder intern/gods
+editor_folder intern
type 8
sys_object 1
name restore spellpoints
@@ -6603,7 +6603,7 @@
face power.101
end
Object gravestone
-editor_folder intern/intern
+editor_folder intern
layer 3
face gravestone.101
type 38
@@ -6624,7 +6624,7 @@
terrain_flag 1
end
Object close_gift
-editor_folder intern/items
+editor_folder intern
name rewrap the gift
face gift_open.111
layer 3
@@ -6633,7 +6633,7 @@
no_pick 1
end
Object close_stocking
-editor_folder intern/items
+editor_folder intern
name close stocking
face stocking.111
layer 3
@@ -6642,7 +6642,7 @@
no_pick 1
end
Object close_stocking_bow
-editor_folder intern/items
+editor_folder intern
name close stocking
face stocking_bow.111
layer 3
@@ -6651,7 +6651,7 @@
no_pick 1
end
Object close_bag
-editor_folder intern/items
+editor_folder intern
layer 3
name close the bag
face close_bag.101
@@ -6661,7 +6661,7 @@
identified 1
end
Object cauldron_open
-editor_folder intern/items
+editor_folder intern
name close the cauldron
layer 3
face cauldron_open.101
@@ -6670,7 +6670,7 @@
no_drop 1
end
Object close_chest1_111
-editor_folder intern/items
+editor_folder intern
name open chest
face chest_mm_open.111
animation close_chest1_111
@@ -6685,7 +6685,7 @@
identified 1
end
Object close_chest_m1_1
-editor_folder intern/items
+editor_folder intern
name open chest
face chest_lm_open.111
animation close_chest_m1_1
@@ -6700,7 +6700,7 @@
identified 1
end
Object close_chest_w1_1
-editor_folder intern/items
+editor_folder intern
name open chest
face chest_lw_open.111
animation close_chest_w1_1
@@ -6715,7 +6715,7 @@
identified 1
end
Object close_chest_4.111
-editor_folder intern/items
+editor_folder intern
name open chest
face chest_mw_open.111
animation close_chest_4.111
@@ -6730,7 +6730,7 @@
identified 1
end
Object close_chest_sm_1
-editor_folder intern/items
+editor_folder intern
name open chest
face chest_sm_open.111
animation close_chest_sm_1
@@ -6745,7 +6745,7 @@
identified 1
end
Object close_chest_sw_1
-editor_folder intern/items
+editor_folder intern
name open chest
face chest_sw_open.111
animation close_chest_sw_1
@@ -6760,7 +6760,7 @@
identified 1
end
Object close_chest7_111
-editor_folder intern/items
+editor_folder intern
name open chest
face chest_mm2_open.111
animation close_chest7_111
@@ -6775,7 +6775,7 @@
identified 1
end
Object open_christmas_r_sack
-editor_folder intern/items
+editor_folder intern
name close the rucksack
face openedchristmasrsack.101
type 121
@@ -6785,7 +6785,7 @@
identified 1
end
Object close_dbox
-editor_folder intern/items
+editor_folder intern
name close the deposit box
face close_dbox.101
layer 3
@@ -6795,7 +6795,7 @@
identified 1
end
Object open_gift_bow
-editor_folder intern/items
+editor_folder intern
name unwrapped gift
face gift_bow_open.111
layer 3
@@ -6804,7 +6804,7 @@
no_pick 1
end
Object close_key_ring
-editor_folder intern/items
+editor_folder intern
name close the key ring
layer 3
face close_keys.101
@@ -6814,7 +6814,7 @@
identified 1
end
Object close_luggage
-editor_folder intern/items
+editor_folder intern
name close the luggage
layer 3
face close_lugg.101
@@ -6824,7 +6824,7 @@
identified 1
end
Object close_mail
-editor_folder intern/items
+editor_folder intern
name close the mailbox
face closemail.101
layer 3
@@ -6834,7 +6834,7 @@
identified 1
end
Object close_pouch
-editor_folder intern/items
+editor_folder intern
name close the pouch
face close_pouch.101
type 121
@@ -6844,7 +6844,7 @@
identified 1
end
Object close_quiver_b
-editor_folder intern/items
+editor_folder intern
name close the quiver
face close_quiv_b.101
type 121
@@ -6854,7 +6854,7 @@
identified 1
end
Object close_quiver_s
-editor_folder intern/items
+editor_folder intern
name close the quiver
face close_quiv_s.101
type 121
@@ -6864,7 +6864,7 @@
identified 1
end
Object close_quiver
-editor_folder intern/items
+editor_folder intern
name close the quiver
face close_quiv.101
type 121
@@ -6874,7 +6874,7 @@
identified 1
end
Object close_rsack
-editor_folder intern/items
+editor_folder intern
name close the rucksack
face close_rsack.101
type 121
@@ -6884,7 +6884,7 @@
identified 1
end
Object close_sack
-editor_folder intern/items
+editor_folder intern
name close the sack
face close_sack.101
type 121
@@ -6894,7 +6894,7 @@
identified 1
end
Object saddle_close
-editor_folder intern/items
+editor_folder intern
name close the saddle
face saddle_close.101
type 121
@@ -6904,7 +6904,7 @@
identified 1
end
Object xmas_present_green_open
-editor_folder intern/items
+editor_folder intern
name close the gift
face xmas_present_green_open.101
layer 3
@@ -6913,7 +6913,7 @@
no_pick 1
end
Object xmas_present_red_open
-editor_folder intern/items
+editor_folder intern
name close the gift
face xmas_present_red_open.101
layer 3
@@ -6922,7 +6922,7 @@
no_pick 1
end
Object xmas_present_white_open
-editor_folder intern/items
+editor_folder intern
name close the gift
face xmas_present_white_open.101
layer 3
@@ -6931,7 +6931,7 @@
no_pick 1
end
Object xmas_present_yellow_open
-editor_folder intern/items
+editor_folder intern
name close the gift
face xmas_present_yellow_open.101
layer 3
@@ -6940,47 +6940,57 @@
no_pick 1
end
Object lamp_post_unlit
-editor_folder intern/items
+editor_folder intern
type 74
layer 5
sub_type 1
animation lamp_post_unlit
end
Object lamp_wall_1_unlit
-editor_folder intern/items
+editor_folder intern
type 74
layer 5
sub_type 1
animation lamp_wall_1_unlit
end
Object lantern2_magic_unlit
-editor_folder intern/items
+editor_folder intern
type 74
layer 5
sub_type 1
animation lantern2_magic_unlit
end
Object lantern_magic_unlit
-editor_folder intern/items
+editor_folder intern
type 74
layer 5
sub_type 1
animation lantern_magic_unlit
end
Object torch_skull_wall_1_unlit
-editor_folder intern/items
+editor_folder intern
type 74
layer 5
sub_type 1
animation torch_skull_wall_1_unlit
end
Object torch_wall_1_unlit
-editor_folder intern/items
+editor_folder intern
type 74
layer 5
sub_type 1
animation torch_wall_1_unlit
end
+Object loot_container
+editor_folder intern
+type 79
+sys_object 1
+layer 0
+name monster
+title (loot)
+identified 1
+no_save 1
+end
Object map
x 16
y 16
@@ -6995,7 +7005,7 @@
weight 7200
end
Object alignment_force
-editor_folder intern/player
+editor_folder intern
name ALIGNMENT_FORCE
layer 0
item_quality 100
@@ -7012,7 +7022,7 @@
speed 0
end
Object guild_force
-editor_folder intern/player
+editor_folder intern
name GUILD_FORCE
item_quality 100
item_condition 100
@@ -7035,7 +7045,7 @@
speed 0
end
Object player_force
-editor_folder intern/player
+editor_folder intern
sys_object 1
applied 1
item_quality 100
@@ -7051,7 +7061,7 @@
speed 0
end
Object player_info
-editor_folder intern/player
+editor_folder intern
sys_object 1
applied 0
no_drop 1
@@ -7066,7 +7076,7 @@
face info.101
end
Object rank_force
-editor_folder intern/player
+editor_folder intern
name RANK_FORCE
sys_object 1
applied 1
@@ -7083,7 +7093,7 @@
speed 0
end
Object age_force
-editor_folder intern/player
+editor_folder intern
name age force
layer 0
sys_object 1
@@ -7100,7 +7110,7 @@
speed 0
end
Object corpse_pl
-editor_folder intern/player
+editor_folder intern
name player corpse
layer 3
face corpse_pl.101
@@ -7115,7 +7125,7 @@
invulnerable 1
end
Object dwarf_female
-editor_folder intern/player
+editor_folder intern
race dwarf
randomitems player_dwarf_female
layer 6
@@ -7152,7 +7162,7 @@
food 750
end
Object dwarf_male
-editor_folder intern/player
+editor_folder intern
race dwarf
face dwarf.151
randomitems player_dwarf_male
@@ -7189,7 +7199,7 @@
food 750
end
Object elf_female
-editor_folder intern/player
+editor_folder intern
race elf
face elf_female.151
randomitems player_elf_female
@@ -7226,7 +7236,7 @@
food 750
end
Object elf_male
-editor_folder intern/player
+editor_folder intern
race elf
face elf_male.151
randomitems player_elf_male
@@ -7263,7 +7273,7 @@
food 750
end
Object half_elf_female
-editor_folder intern/player
+editor_folder intern
race half-elf
randomitems player_half_elf_female
layer 6
@@ -7300,7 +7310,7 @@
food 750
end
Object half_elf_male
-editor_folder intern/player
+editor_folder intern
race half-elf
face half_elf_male.151
randomitems player_half_elf_male
@@ -7337,7 +7347,7 @@
food 750
end
Object human_female
-editor_folder intern/player
+editor_folder intern
race human
randomitems player_human_female
layer 6
@@ -7374,7 +7384,7 @@
food 750
end
Object human_male
-editor_folder intern/player
+editor_folder intern
race human
face human_male.151
randomitems player_human_male
@@ -7411,7 +7421,7 @@
food 750
end
Object quest_container
-editor_folder intern/quest
+editor_folder intern
type 120
layer 0
sys_object 1
@@ -7426,7 +7436,7 @@
nrof 1
end
Object quest_info
-editor_folder intern/quest
+editor_folder intern
type 136
layer 0
sys_object 1
@@ -7438,7 +7448,7 @@
no_drop 1
end
Object quest_update
-editor_folder intern/quest
+editor_folder intern
type 146
layer 0
sys_object 1
@@ -7450,7 +7460,7 @@
no_drop 1
end
Object skill_alchemy
-editor_folder intern/skills
+editor_folder intern
name alchemy
type 43
face skill.101
@@ -7470,7 +7480,7 @@
exp 0
end
Object skill_bargaining
-editor_folder intern/skills
+editor_folder intern
name bargaining
type 43
face skill.101
@@ -7489,7 +7499,7 @@
sp 9
end
Object skill_bowyer
-editor_folder intern/skills
+editor_folder intern
name bowyer lore
type 43
face skill.101
@@ -7508,7 +7518,7 @@
exp 0
end
Object skill_clawing
-editor_folder intern/skills
+editor_folder intern
name clawing
type 43
sub_type 0
@@ -7530,7 +7540,7 @@
sp 31
end
Object skill_disarm_trap
-editor_folder intern/skills
+editor_folder intern
name disarm traps
type 43
sub_type 1
@@ -7549,7 +7559,7 @@
exp 0
end
Object experience_agility
-editor_folder intern/skills
+editor_folder intern
name agility
type 44
sub_type 0
@@ -7567,7 +7577,7 @@
dex 1
end
Object experience_charisma
-editor_folder intern/skills
+editor_folder intern
name personality
type 44
sub_type 1
@@ -7585,7 +7595,7 @@
cha 1
end
Object experience_mental
-editor_folder intern/skills
+editor_folder intern
name mental
type 44
item_quality 100
@@ -7603,7 +7613,7 @@
int 1
end
Object experience_misc
-editor_folder intern/skills
+editor_folder intern
name misc
type 44
item_quality 100
@@ -7620,7 +7630,7 @@
exp 0
end
Object experience_physical
-editor_folder intern/skills
+editor_folder intern
name physique
type 44
sub_type 3
@@ -7639,7 +7649,7 @@
str 1
end
Object experience_power
-editor_folder intern/skills
+editor_folder intern
name magic
type 44
sub_type 4
@@ -7657,7 +7667,7 @@
pow 1
end
Object experience_wis
-editor_folder intern/skills
+editor_folder intern
name wisdom
type 44
sub_type 5
@@ -7675,7 +7685,7 @@
wis 1
end
Object skill_find_traps
-editor_folder intern/skills
+editor_folder intern
name find traps
type 43
item_quality 100
@@ -7694,7 +7704,7 @@
exp 0
end
Object skill_flame_touch
-editor_folder intern/skills
+editor_folder intern
name flame touch
type 43
sub_type 0
@@ -7716,7 +7726,7 @@
exp 0
end
Object skill_hide
-editor_folder intern/skills
+editor_folder intern
name hide in shadows
type 43
sub_type 1
@@ -7735,7 +7745,7 @@
exp 0
end
Object skill_identify
-editor_folder intern/skills
+editor_folder intern
name identify items
type 43
sub_type 1
@@ -7755,7 +7765,7 @@
exp 0
end
Object skill_inscription
-editor_folder intern/skills
+editor_folder intern
name inscription
type 43
sub_type 2
@@ -7775,7 +7785,7 @@
exp 0
end
Object skill_jeweler
-editor_folder intern/skills
+editor_folder intern
name jeweler lore
type 43
face skill.101
@@ -7794,7 +7804,7 @@
exp 0
end
Object skill_jumping
-editor_folder intern/skills
+editor_folder intern
name jumping
type 43
sub_type 1
@@ -7814,7 +7824,7 @@
sp 10
end
Object skill_karate
-editor_folder intern/skills
+editor_folder intern
name karate
weapon_speed 3.0
attack_impact 100
@@ -7839,7 +7849,7 @@
exp 0
end
Object skill_levitate
-editor_folder intern/skills
+editor_folder intern
name levitation
type 43
face skill.101
@@ -7860,7 +7870,7 @@
exp 0
end
Object skill_literacy
-editor_folder intern/skills
+editor_folder intern
name common literacy
type 43
sub_type 2
@@ -7879,7 +7889,7 @@
exp 0
end
Object skill_lockpick
-editor_folder intern/skills
+editor_folder intern
name pick locks
type 43
face skill.101
@@ -7898,7 +7908,7 @@
exp 0
end
Object skill_thaumaturgy
-editor_folder intern/skills
+editor_folder intern
name magic lore
type 43
sub_type 2
@@ -7917,7 +7927,7 @@
exp 0
end
Object skill_meditation
-editor_folder intern/skills
+editor_folder intern
name meditation
type 43
sub_type 1
@@ -7936,7 +7946,7 @@
exp 0
end
Object skill_climbing
-editor_folder intern/skills
+editor_folder intern
name mountaineer
type 43
sub_type 2
@@ -7955,7 +7965,7 @@
exp 0
end
Object skill_oratory
-editor_folder intern/skills
+editor_folder intern
name oratory
type 43
sub_type 1
@@ -7975,7 +7985,7 @@
exp 0
end
Object skill_praying
-editor_folder intern/skills
+editor_folder intern
name divine prayers
type 43
sub_type 2
@@ -7995,7 +8005,7 @@
exp 0
end
Object skill_punching
-editor_folder intern/skills
+editor_folder intern
name punching
weapon_speed 4.0
face skill.101
@@ -8019,7 +8029,7 @@
exp 0
end
Object skill_bow_archery
-editor_folder intern/skills
+editor_folder intern
name bow archery
type 43
face skill.101
@@ -8042,7 +8052,7 @@
exp 0
end
Object skill_sling_archery
-editor_folder intern/skills
+editor_folder intern
name sling archery
type 43
face skill.101
@@ -8065,7 +8075,7 @@
exp 0
end
Object skill_xbow_archery
-editor_folder intern/skills
+editor_folder intern
name crossbow archery
type 43
sub_type 0
@@ -8088,7 +8098,7 @@
exp 0
end
Object skill_remove_trap
-editor_folder intern/skills
+editor_folder intern
name remove traps
type 43
sub_type 1
@@ -8107,7 +8117,7 @@
exp 0
end
Object skill_sense_curse
-editor_folder intern/skills
+editor_folder intern
name sense curse
type 43
sub_type 1
@@ -8127,7 +8137,7 @@
exp 0
end
Object skill_sense_magic
-editor_folder intern/skills
+editor_folder intern
name sense magic
type 43
sub_type 1
@@ -8147,7 +8157,7 @@
exp 0
end
Object skill_set_trap
-editor_folder intern/skills
+editor_folder intern
name set traps
type 43
sub_type 1
@@ -8167,7 +8177,7 @@
exp 0
end
Object skill_singing
-editor_folder intern/skills
+editor_folder intern
name singing
type 43
sub_type 1
@@ -8187,7 +8197,7 @@
exp 0
end
Object skill_smithery
-editor_folder intern/skills
+editor_folder intern
name smithery lore
type 43
sub_type 2
@@ -8207,7 +8217,7 @@
exp 0
end
Object skill_spellcasting
-editor_folder intern/skills
+editor_folder intern
name wizardry spells
type 43
sub_type 0
@@ -8227,7 +8237,7 @@
exp 0
end
Object skill_stealing
-editor_folder intern/skills
+editor_folder intern
name stealing
type 43
face skill.101
@@ -8247,7 +8257,7 @@
exp 0
end
Object skill_throwing
-editor_folder intern/skills
+editor_folder intern
name throwing
type 43
last_grace 0
@@ -8269,7 +8279,7 @@
exp 0
end
Object skill_use_magic_item
-editor_folder intern/skills
+editor_folder intern
name magic devices
type 43
sub_type 0
@@ -8289,7 +8299,7 @@
exp 0
end
Object skill_2h_mastery
-editor_folder intern/skills
+editor_folder intern
name two-hand mastery
type 43
sub_type 2
@@ -8308,7 +8318,7 @@
exp 0
end
Object skill_pole_mastery
-editor_folder intern/skills
+editor_folder intern
name polearm mastery
type 43
sub_type 2
@@ -8327,7 +8337,7 @@
exp 0
end
Object skill_cleave_weapon
-editor_folder intern/skills
+editor_folder intern
name cleave weapons
type 43
sub_type 0
@@ -8347,7 +8357,7 @@
exp 0
end
Object skill_impact_weapon
-editor_folder intern/skills
+editor_folder intern
name impact weapons
type 43
sub_type 0
@@ -8367,7 +8377,7 @@
exp 0
end
Object skill_pierce_weapon
-editor_folder intern/skills
+editor_folder intern
name pierce weapons
type 43
sub_type 0
@@ -8387,7 +8397,7 @@
exp 0
end
Object skill_slash_weapon
-editor_folder intern/skills
+editor_folder intern
name slash weapons
type 43
sub_type 0
@@ -8407,7 +8417,7 @@
exp 0
end
Object skill_woodsman
-editor_folder intern/skills
+editor_folder intern
name ranger lore
type 43
sub_type 2
@@ -8426,7 +8436,7 @@
exp 0
end
Object spawn_info
-editor_folder intern/intern
+editor_folder intern
type 84
layer 0
identified 1
@@ -8435,21 +8445,21 @@
no_drop 1
end
Object jack_unlit
-editor_folder intern/themed
+editor_folder intern
type 74
layer 5
sub_type 1
animation jack_unlit
end
Object cane_pole_unlit
-editor_folder intern/themed
+editor_folder intern
type 74
layer 5
sub_type 1
animation cane_pole_unlit
end
Object wealth
-editor_folder intern/intern
+editor_folder intern
value 4
face wealth.101
sys_object 1
@@ -13619,8 +13629,8 @@
face bread01.101
last_eat 10
can_stack 1
-hp 20
-sp 3
+hp 2
+sp 30
grace 2
item_quality 0
nrof 1
@@ -13638,8 +13648,8 @@
can_stack 1
face bread02.101
last_eat 10
-hp 20
-sp 3
+hp 2
+sp 30
grace 2
item_quality 0
nrof 1
@@ -13656,8 +13666,8 @@
name chocolate cake
face cake_chocolate.101
last_eat 10
-hp 10
-sp 8
+hp 12
+sp 18
can_stack 1
grace 6
item_quality 0
@@ -13675,8 +13685,8 @@
name christmas tree cookie
face cookie_tree.101
last_eat 10
-hp 15
-sp 5
+hp 10
+sp 15
can_stack 1
grace 5
item_quality 0
@@ -13695,7 +13705,7 @@
face cakepiece.101
last_eat 10
hp 15
-sp 5
+sp 25
can_stack 1
grace 5
item_quality 0
@@ -13713,8 +13723,8 @@
name cake
face cake2.101
last_eat 10
-hp 15
-sp 6
+hp 5
+sp 16
can_stack 1
grace 4
item_quality 0
@@ -13732,8 +13742,8 @@
name icecake
face icecake.101
last_eat 10
-hp 15
-sp 4
+hp 5
+sp 14
can_stack 1
grace 6
item_quality 0
@@ -13751,8 +13761,8 @@
name cookie
face cookie01.101
last_eat 10
-hp 20
-sp 3
+hp 2
+sp 13
can_stack 1
grace 2
item_quality 0
@@ -14013,9 +14023,9 @@
face beer.101
last_eat 10
can_stack 1
-hp 20
+hp 2
sp 3
-grace 2
+grace 20
nrof 1
layer 3
type 6
@@ -14029,10 +14039,10 @@
name booze
face booze.101
last_eat 10
-hp 20
+hp 10
can_stack 1
sp 3
-grace 10
+grace 20
item_quality 0
nrof 1
layer 3
@@ -14050,8 +14060,8 @@
last_eat 12
hp 20
can_stack 1
-sp 8
-grace 10
+sp 18
+grace 40
item_quality 0
nrof 1
layer 3
@@ -14067,8 +14077,8 @@
name coffee
face coffee.101
last_eat 10
-hp 20
-sp 3
+hp 2
+sp 13
grace 2
nrof 1
can_stack 1
@@ -14085,8 +14095,8 @@
name cup of coffee
face cup_coffee.101
last_eat 10
-hp 20
-sp 3
+hp 2
+sp 13
can_stack 1
grace 2
nrof 1
@@ -14116,8 +14126,8 @@
name cup of tea
face cup_tea.101
last_eat 10
-hp 20
-sp 3
+hp 2
+sp 30
grace 2
nrof 1
can_stack 1
@@ -14134,9 +14144,9 @@
name water
face water.101
last_eat 10
-hp 20
-sp 3
-grace 2
+hp 10
+sp 10
+grace 10
can_stack 1
item_quality 0
layer 3
@@ -14152,10 +14162,10 @@
name teabag
face teabag.101
last_eat 10
-hp 20
+hp 2
can_stack 1
sp 3
-grace 2
+grace 10
nrof 1
layer 3
type 6
@@ -14170,10 +14180,10 @@
name water
face water2.101
last_eat 10
-hp 20
+hp 2
sp 3
can_stack 1
-grace 2
+grace 20
nrof 1
layer 3
type 6
@@ -14189,8 +14199,8 @@
face whitewine.101
last_eat 12
hp 2
-sp 10
-grace 10
+sp 1
+grace 15
nrof 1
can_stack 1
layer 3
@@ -14207,8 +14217,8 @@
face redwine.101
last_eat 12
hp 2
-sp 10
-grace 10
+sp 1
+grace 15
nrof 1
can_stack 1
layer 3
@@ -14225,8 +14235,8 @@
face champagne.101
last_eat 12
hp 2
-sp 10
-grace 10
+sp 1
+grace 18
nrof 1
can_stack 1
layer 3
@@ -14786,9 +14796,9 @@
name ration
face food.101
last_eat 10
-hp 20
-sp 3
-grace 2
+hp 15
+sp 15
+grace 15
can_stack 1
item_quality 0
nrof 1
@@ -17097,8 +17107,8 @@
Object quaterstaff
editor_folder items/weapon
layer 3
-name quaterstaff
-face quaterstaff.101
+name quarterstaff
+face quarterstaff.101
weapon_speed 4.25
attack_impact 100
dam 191
@@ -22269,6 +22279,7 @@
editor_folder misc/misc
type 79
layer 3
+name unknown object
end
Object blob_acid
editor_folder mobs/amoeboid
@@ -42474,8 +42485,8 @@
layer 0
no_pick 1
walk_on 1
-attack_poison 100
-dam 4
+attack_poison 70
+dam 2
cha 20
end
Object rune_acid
Modified: main/server/lib/bmaps
===================================================================
--- main/server/lib/bmaps 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/lib/bmaps 2011-01-22 02:36:35 UTC (rev 6136)
@@ -6590,7 +6590,7 @@
06589 pumpkin_04.101
06590 pumpkin_05.101
06591 pumpkin_06.101
-06592 quaterstaff.101
+06592 quarterstaff.101
06593 queen.131
06594 queen.132
06595 queen.151
Modified: main/server/lib/daimonin.0
===================================================================
(Binary files differ)
Modified: main/server/make/_outdated/VisualC7/daimonin_server.vcproj
===================================================================
--- main/server/make/_outdated/VisualC7/daimonin_server.vcproj 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/make/_outdated/VisualC7/daimonin_server.vcproj 2011-01-22 02:36:35 UTC (rev 6136)
@@ -681,21 +681,6 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\..\..\src\server\swap.c">
- <FileConfiguration
- Name="ReleaseLog|Win32">
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile=".\ReleaseLog\server/"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile=".\Debug\server/"/>
- </FileConfiguration>
- </File>
- <File
RelativePath="..\..\..\src\server\time.c">
<FileConfiguration
Name="ReleaseLog|Win32">
@@ -1068,6 +1053,9 @@
RelativePath="..\..\..\src\include\define.h">
</File>
<File
+ RelativePath="..\..\..\src\include\exp.h">
+ </File>
+ <File
RelativePath="..\..\..\src\include\face.h">
</File>
<File
Modified: main/server/make/linux/CodeBlocks/daimonin_server.cbp
===================================================================
--- main/server/make/linux/CodeBlocks/daimonin_server.cbp 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/make/linux/CodeBlocks/daimonin_server.cbp 2011-01-22 02:36:35 UTC (rev 6136)
@@ -212,6 +212,7 @@
<Unit filename="../../../src/include/config.h" />
<Unit filename="../../../src/include/debug.h" />
<Unit filename="../../../src/include/define.h" />
+ <Unit filename="../../../src/include/exp.h" />
<Unit filename="../../../src/include/face.h" />
<Unit filename="../../../src/include/global.h" />
<Unit filename="../../../src/include/gmaster.h" />
@@ -391,9 +392,6 @@
<Unit filename="../../../src/server/swamp.c">
<Option compilerVar="CC" />
</Unit>
- <Unit filename="../../../src/server/swap.c">
- <Option compilerVar="CC" />
- </Unit>
<Unit filename="../../../src/server/time.c">
<Option compilerVar="CC" />
</Unit>
Modified: main/server/make/win32/CodeBlocks/daimonin_server.cbp
===================================================================
--- main/server/make/win32/CodeBlocks/daimonin_server.cbp 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/make/win32/CodeBlocks/daimonin_server.cbp 2011-01-22 02:36:35 UTC (rev 6136)
@@ -189,6 +189,7 @@
<Unit filename="..\..\..\src\include\config.h" />
<Unit filename="..\..\..\src\include\debug.h" />
<Unit filename="..\..\..\src\include\define.h" />
+ <Unit filename="..\..\..\src\include\exp.h" />
<Unit filename="..\..\..\src\include\face.h" />
<Unit filename="..\..\..\src\include\global.h" />
<Unit filename="..\..\..\src\include\gmaster.h" />
@@ -366,9 +367,6 @@
<Unit filename="..\..\..\src\server\swamp.c">
<Option compilerVar="CC" />
</Unit>
- <Unit filename="..\..\..\src\server\swap.c">
- <Option compilerVar="CC" />
- </Unit>
<Unit filename="..\..\..\src\server\time.c">
<Option compilerVar="CC" />
</Unit>
Modified: main/server/make/win32/VisualC/daimonin_server.vcproj
===================================================================
--- main/server/make/win32/VisualC/daimonin_server.vcproj 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/make/win32/VisualC/daimonin_server.vcproj 2011-01-22 02:36:35 UTC (rev 6136)
@@ -990,26 +990,6 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\..\..\src\server\swap.c"
- >
- <FileConfiguration
- Name="ReleaseLog|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile=".\ReleaseLog\server/"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile=".\Debug\server/"
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\..\..\src\server\time.c"
>
<FileConfiguration
@@ -1322,6 +1302,10 @@
>
</File>
<File
+ RelativePath="..\..\..\src\include\exp.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\include\face.h"
>
</File>
Modified: main/server/src/common/arch.c
===================================================================
--- main/server/src/common/arch.c 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/src/common/arch.c 2011-01-22 02:36:35 UTC (rev 6136)
@@ -257,6 +257,7 @@
SET_GLOBAL_ARCHETYPE(blindness);
SET_GLOBAL_ARCHETYPE(paralyze);
SET_GLOBAL_ARCHETYPE(corpse_default);
+ SET_GLOBAL_ARCHETYPE(loot_container);
}
#undef SET_GLOBAL_ARCHETYPE
Modified: main/server/src/common/exp.c
===================================================================
--- main/server/src/common/exp.c 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/src/common/exp.c 2011-01-22 02:36:35 UTC (rev 6136)
@@ -29,24 +29,40 @@
*/
#include <global.h>
-#include <stdio.h>
-
-float lev_exp[MAXLEVEL + 18] =
+/* LevExp[n]is the exp modifier when a player, ie, kills a mob of level n. */
+static float LevExp[MAXMOBLEVEL + 1] =
{
- 0.0f, 1.0f, 1.11f, 1.75f, 3.2f, 5.5f, 10.0f, 20.0f, 35.25f, 66.1f, 137.0f, 231.58f, 240.00f, 247.62f, 254.55f,
- 260.87f, 266.67f, 272.00f, 276.92f, 281.48f, 285.71f, 289.66f, 293.33f, 296.77f, 300.00f, 303.03f, 305.88f, 308.57f,
- 311.11f, 313.51f, 315.79f, 317.95f, 320.00f, 321.95f, 323.81f, 325.58f, 327.27f, 328.89f, 330.43f, 331.91f, 333.33f,
- 334.69f, 336.00f, 337.25f, 338.46f, 339.62f, 340.74f, 341.82f, 342.86f, 343.86f, 344.83f, 345.76f, 346.67f, 347.54f,
- 348.39f, 349.21f, 350.00f, 350.77f, 351.52f, 352.24f, 352.94f, 353.62f, 354.29f, 354.93f, 355.56f, 356.16f, 356.76f,
- 357.33f, 357.89f, 358.44f, 358.97f, 359.49f, 360.00f, 360.49f, 360.98f, 361.45f, 361.90f, 362.35f, 362.79f, 363.22f,
- 363.64f, 364.04f, 364.44f, 364.84f, 365.22f, 365.59f, 365.96f, 366.32f, 366.67f, 367.01f, 367.35f, 367.68f, 368.00f,
- 368.32f, 368.63f, 368.93f, 369.23f, 369.52f, 369.81f, 370.09f, 370.37f, 370.64f, 370.91f, 371.17f, 371.43f, 371.68f,
- 371.93f, 372.17f, 372.41f, 372.65f, 372.88f, 373.10f, 373.31f, 373.51f, 373.70f,
-373.88f, 374.05f, 374.21f, 374.36f, 374.50f, 374.63f, 374.75f, 374.86f, 374.96f,
-375.05f, 375.13f, 375.20f, 375.26f
+ 0.00f,
+ 1.00f, 1.11f, 1.75f, 3.20f, 5.50f, // 1-5
+ 10.00f, 20.00f, 35.25f, 66.10f, 137.00f, // 6-10
+ 231.58f, 240.00f, 247.62f, 254.55f, 260.87f, // 11-15
+ 266.67f, 272.00f, 276.92f, 281.48f, 285.71f, // 16-20
+ 289.66f, 293.33f, 296.77f, 300.00f, 303.03f, // 21-25
+ 305.88f, 308.57f, 311.11f, 313.51f, 315.79f, // 26-30
+ 317.95f, 320.00f, 321.95f, 323.81f, 325.58f, // 31-35
+ 327.27f, 328.89f, 330.43f, 331.91f, 333.33f, // 36-40
+ 334.69f, 336.00f, 337.25f, 338.46f, 339.62f, // 41-45
+ 340.74f, 341.82f, 342.86f, 343.86f, 344.83f, // 46-50
+ 345.76f, 346.67f, 347.54f, 348.39f, 349.21f, // 51-55
+ 350.00f, 350.77f, 351.52f, 352.24f, 352.94f, // 56-60
+ 353.62f, 354.29f, 354.93f, 355.56f, 356.16f, // 61-65
+ 356.76f, 357.33f, 357.89f, 358.44f, 358.97f, // 66-70
+ 359.49f, 360.00f, 360.49f, 360.98f, 361.45f, // 71-75
+ 361.90f, 362.35f, 362.79f, 363.22f, 363.64f, // 76-80
+ 364.04f, 364.44f, 364.84f, 365.22f, 365.59f, // 81-85
+ 365.96f, 366.32f, 366.67f, 367.01f, 367.35f, // 86-90
+ 367.68f, 368.00f, 368.32f, 368.63f, 368.93f, // 91-95
+ 369.23f, 369.52f, 369.81f, 370.09f, 370.37f, // 96-100
+ 370.64f, 370.91f, 371.17f, 371.43f, 371.68f, // 101-105
+ 371.93f, 372.17f, 372.41f, 372.65f, 372.88f, // 106-110
+ 373.10f, 373.31f, 373.51f, 373.70f, 373.88f, // 111-115
+ 374.05f, 374.21f, 374.36f, 374.50f, 374.63f, // 116-120
+ 374.75f, 374.86f, 374.96f, 375.05f, 375.13f, // 121-125
+ 375.20f, 375.26f, // 126-127
};
+/* new_levels[n] is the exp threshold for a player to be level n. */
/* around level 11 you need 38+(2*(your_level-11)) yellow
* mobs with a base exp of 125 to level up.
* Every level >11 needs 100.000 exp more as the one before but
@@ -56,160 +72,180 @@
* even here we have around 500.000.000 max exp - thats a pretty big
* number.
*/
-sint32 new_levels[MAXLEVEL + 19] =
+sint32 new_levels[MAXLEVEL + 2] =
{
- 0, 0, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000, /* 9 */
- 256000, 512000, 1024000, 2300000, 3700000, 5200000, 6800000, 8900000, 10600000, 12500000, /* 19 */
- 14500000, 16600000, 18800000, 21100000, 23400000, 27000000, 29600000, 32300000, 35100000, 38000000, /* 29 */
- 41000000, 44400000, 47900000, 51500000, 55200000, 59000000, 62900000, 66900000, 71000000, 74900000, /* 39 */
- 79000000, 83100000, 87300000, 91600000, 96000000, 100500000, 105100000, 109800000, 114600000, 119500000, /* 49 */
- 124500000, 129600000, 134800000, 140100000, 145500000, 151000000, 156600000, 162300000, 168100000, 174000000,
- /*59 */
- 180000000, 186600000, 192800000, 199100000, 205500000, 212000000, 218600000, 225300000, 232100000, 239000000,
- /* 69 */
- 246000000, 253100000, 260300000, 267600000, 275000000, 282500000, 290100000, 297800000, 305600000, 313500000,
- /* 79 */
- 321500000, 329600000, 337800000, 346100000, 354500000, 363000000, 371600000, 380300000, 389100000, 398000000,
- /* 89 */
- 407000000, 416600000, 425800000, 435100000, 444500000, 454000000, 463600000, 473300000, 483100000, 493000000,
- /* 99 */
- 503000000, 513600000, 523800000, 534100000, 544500000, 555000000, 565600000, 576300000, 587100000, 598000000,
- /* 109 */
- 610000000, 700000000, 800000000, 900000000, 1000000000, 1100000000, 1200000000,
-1300000000, 1400000000, 1500000000, 1600000000, 1700000000, 1800000000, 1900000000,
-2000000000, 2100000000, 2200000000, 2300000000 /* 111 is only a dummy */
+ 0,
+ 0, 1000, 2000, 4000, 8000, // 1-5
+ 160000, 32000, 64000, 128000, 256000, // 6-10
+ 512000, 1024000, 2300000, 3700000, 5200000, // 11-15
+ 6800000, 8900000, 10600000, 12500000, 14500000, // 16-20
+ 16600000, 18800000, 21100000, 23400000, 27000000, // 21-25
+ 29600000, 32300000, 35100000, 38000000, 41000000, // 26-30
+ 44400000, 47900000, 51500000, 55200000, 59000000, // 31-35
+ 62900000, 66900000, 71000000, 74900000, 79000000, // 36-40
+ 83100000, 87300000, 91600000, 96000000, 100500000, // 41-45
+ 105100000, 109800000, 114600000, 119500000, 124500000, // 46-50
+ 129600000, 134800000, 140100000, 145500000, 151000000, // 51-55
+ 156600000, 162300000, 168100000, 174000000, 180000000, // 56-60
+ 186600000, 192800000, 199100000, 205500000, 212000000, // 61-65
+ 218600000, 225300000, 232100000, 239000000, 246000000, // 66-70
+ 253100000, 260300000, 267600000, 275000000, 282500000, // 71-75
+ 290100000, 297800000, 305600000, 313500000, 321500000, // 76-80
+ 329600000, 337800000, 346100000, 354500000, 363000000, // 81-85
+ 371600000, 380300000, 389100000, 398000000, 407000000, // 86-90
+ 416600000, 425800000, 435100000, 444500000, 454000000, // 91-95
+ 463600000, 473300000, 483100000, 493000000, 503000000, // 96-100
+ 513600000, 523800000, 534100000, 544500000, 555000000, // 101-105
+ 565600000, 576300000, 587100000, 598000000, 610000000, // 106-110
+#if 0
+/* Only players gain exp and levels so we don't care about the values below.
+ * As the sint32 max is 2147,483,647, we have a ceiling if we go too high
+ * anyway, hence the precise values foor 126-127. */
+ 700000000, 800000000, 900000000, 1000000000, 1100000000, // 111-115
+ 1200000000, 1300000000, 1400000000, 1500000000, 1600000000, // 116-120
+ 1700000000, 1800000000, 1900000000, 2000000000, 2100000000, // 121-125
+ 2123442323, 2147483647 // 126-127
+#else
+ 700000000, // 111 (dummy)
+#endif
};
-_level_color level_color[201] =
+#define MAX_EXPERIENCE new_levels[MAXLEVEL]
+
+/* level_color[n].foo if the level threshold at which a target is colour foo to
+ * a player of level n (where foo is green, blue, yellow, orange, red, or
+ * purple). */
+_level_color level_color[MAXMOBLEVEL + 1] =
{
- { - 2, -1, 0, 1, 2, 3}, /* lvl 0 */
- { - 1, 0, 1, 2, 3, 4}, /* lvl 1 */
- { 0, 1, 2, 3, 4, 5}, /* lvl 2 */
- { 1, 2, 3, 4, 5, 6}, /* lvl 3 */
- { 2, 3, 4, 5, 6, 7}, /* lvl 4 */
- { 3, 4, 5, 6, 7, 8}, /* lvl 5 */
- { 4, 5, 6, 7, 8, 9}, /* lvl 6 */
- { 5, 6, 7, 8, 9, 10}, /* lvl 7 */
- { 6, 7, 8, 9, 10, 11}, /* lvl 8 */
- { 7, 8, 9, 10, 11, 12}, /* lvl 9 */
- { 7, 9, 10, 11, 12, 14}, /* lvl 10 */
- { 8, 9, 11, 12, 13, 15}, /* lvl 11 */
- { 9, 10, 12, 13, 14, 16}, /* lvl 12 */
- { 9, 11, 13, 14, 15, 17}, /* lvl 13 */
- { 10, 11, 14, 15, 16, 18}, /* lvl 14 */
- { 11, 12, 15, 16, 17, 19}, /* lvl 15 */
- { 11, 13, 16, 17, 18, 20}, /* lvl 16 */
- { 12, 14, 17, 18, 19, 21}, /* lvl 17 */
- { 13, 15, 18, 19, 20, 22}, /* lvl 18 */
- { 14, 16, 19, 20, 21, 23}, /* lvl 19 */
- { 14, 17, 20, 21, 22, 24}, /* lvl 20 */
- { 15, 17, 21, 22, 24, 26}, /* lvl 21 */
- { 16, 18, 22, 23, 25, 27}, /* lvl 22 */
- { 16, 19, 23, 24, 26, 28}, /* lvl 23 */
- { 17, 19, 24, 25, 27, 30}, /* lvl 24 */
- { 18, 20, 25, 26, 28, 31}, /* lvl 25 */
- { 19, 21, 26, 27, 29, 32}, /* lvl 26 */
- { 19, 22, 27, 28, 30, 33}, /* lvl 27 */
- { 20, 23, 28, 29, 31, 35}, /* lvl 28 */
- { 21, 24, 29, 30, 32, 36}, /* lvl 29 */
- { 22, 25, 30, 31, 33, 37}, /* lvl 30 */
- { 22, 25, 31, 32, 34, 38}, /* lvl 31 */
- { 23, 26, 32, 33, 35, 39}, /* lvl 32 */
- { 24, 27, 32, 35, 37, 41}, /* lvl 33 */
- { 25, 28, 33, 36, 38, 42}, /* lvl 34 */
- { 25, 28, 34, 37, 39, 43}, /* lvl 35 */
- { 26, 29, 35, 38, 40, 44}, /* lvl 36 */
- { 27, 30, 36, 39, 41, 45}, /* lvl 37 */
- { 28, 31, 37, 40, 42, 46}, /* lvl 38 */
- { 28, 32, 38, 41, 44, 48}, /* lvl 39 */
- { 29, 33, 39, 42, 45, 49}, /* lvl 40 */
- { 30, 34, 40, 43, 46, 50}, /* lvl 41 */
- { 30, 34, 41, 44, 47, 52}, /* lvl 42 */
- { 31, 35, 42, 45, 48, 53}, /* lvl 43 */
- { 32, 36, 43, 46, 49, 54}, /* lvl 44 */
- { 33, 37, 44, 47, 50, 55}, /* lvl 45 */
- { 33, 37, 45, 48, 51, 57}, /* lvl 46 */
- { 34, 38, 46, 49, 52, 58}, /* lvl 47 */
- { 35, 39, 47, 50, 53, 59}, /* lvl 48 */
- { 36, 40, 48, 51, 54, 60}, /* lvl 49 */
- { 36, 41, 49, 52, 55, 61}, /* lvl 50 */
- { 37, 42, 50, 53, 56, 62}, /* lvl 51 */
- { 38, 43, 51, 54, 57, 63}, /* lvl 52 */
- { 38, 43, 52, 55, 58, 65}, /* lvl 53 */
- { 39, 44, 53, 56, 59, 66}, /* lvl 54 */
- { 40, 45, 54, 57, 60, 67}, /* lvl 55 */
- { 41, 46, 55, 58, 61, 68}, /* lvl 56 */
- { 41, 47, 56, 59, 63, 70}, /* lvl 57 */
- { 42, 48, 57, 60, 64, 71}, /* lvl 58 */
- { 43, 49, 58, 61, 65, 72}, /* lvl 59 */
- { 44, 50, 59, 62, 66, 73}, /* lvl 60 */
- { 44, 50, 60, 63, 67, 75}, /* lvl 61 */
- { 45, 51, 61, 64, 68, 76}, /* lvl 62 */
- { 46, 52, 62, 65, 69, 77}, /* lvl 63 */
- { 47, 53, 63, 66, 70, 78}, /* lvl 64 */
- { 47, 53, 64, 67, 71, 79}, /* lvl 65 */
- { 48, 54, 64, 69, 73, 81}, /* lvl 66 */
- { 49, 55, 65, 70, 74, 82}, /* lvl 67 */
- { 50, 56, 66, 71, 75, 83}, /* lvl 68 */
- { 50, 56, 67, 72, 76, 84}, /* lvl 69 */
- { 51, 57, 68, 73, 77, 85}, /* lvl 70 */
- { 52, 58, 69, 74, 78, 86}, /* lvl 71 */
- { 53, 59, 70, 75, 79, 87}, /* lvl 72 */
- { 53, 60, 71, 76, 80, 89}, /* lvl 73 */
- { 54, 61, 72, 77, 81, 90}, /* lvl 74 */
- { 55, 62, 73, 78, 82, 91}, /* lvl 75 */
- { 56, 63, 74, 79, 83, 92}, /* lvl 76 */
- { 56, 63, 75, 80, 85, 94}, /* lvl 77 */
- { 57, 64, 76, 81, 86, 95}, /* lvl 78 */
- { 58, 65, 77, 82, 87, 96}, /* lvl 79 */
- { 59, 66, 78, 83, 88, 97}, /* lvl 80 */
- { 59, 67, 79, 84, 89, 99}, /* lvl 81 */
- { 60, 68, 80, 85, 90, 100}, /* lvl 82 */
- { 61, 69, 81, 86, 91, 101}, /* lvl 83 */
- { 62, 70, 82, 87, 92, 102}, /* lvl 84 */
- { 62, 70, 83, 88, 93, 103}, /* lvl 85 */
- { 63, 71, 84, 89, 94, 104}, /* lvl 86 */
- { 64, 72, 85, 90, 95, 105}, /* lvl 87 */
- { 65, 73, 86, 91, 96, 106}, /* lvl 88 */
- { 65, 73, 87, 92, 97, 108}, /* lvl 89 */
- { 66, 74, 88, 93, 98, 109}, /* lvl 90 */
- { 67, 75, 89, 94, 99, 110}, /* lvl 91 */
- { 68, 76, 90, 95, 100, 111}, /* lvl 92 */
- { 69, 77, 91, 96, 101, 112}, /* lvl 93 */
- { 69, 78, 92, 97, 103, 114}, /* lvl 94 */
- { 70, 79, 93, 98, 104, 115}, /* lvl 95 */
- { 71, 80, 94, 99, 105, 116}, /* lvl 96 */
- { 72, 81, 95, 100, 106, 117}, /* lvl 97 */
- { 72, 81, 96, 101, 107, 119}, /* lvl 98 */
- { 73, 82, 96, 103, 109, 120}, /* lvl 99 */
- { 74, 83, 97, 104, 110, 121}, /* lvl 100 */
- { 75, 84, 98, 105, 111, 122}, /* lvl 101 */
- { 75, 84, 99, 106, 112, 124}, /* lvl 102 */
- { 76, 85, 100, 107, 113, 125}, /* lvl 103 */
- { 77, 86, 101, 108, 114, 126}, /* lvl 104 */
- { 78, 87, 102, 109, 115, 127}, /* lvl 105 */
- { 79, 88, 103, 110, 116, 128}, /* lvl 106 */
- { 79, 89, 104, 111, 117, 129}, /* lvl 107 */
- { 80, 90, 105, 112, 118, 130}, /* lvl 108 */
- { 81, 91, 106, 113, 119, 131}, /* lvl 109 */
- { 82, 92, 107, 114, 120, 132}, /* lvl 110 */
- { 82, 92, 108, 115, 121, 134}, /* lvl 111 */
- { 83, 93, 109, 116, 122, 135}, /* lvl 112 */
- { 84, 94, 110, 117, 123, 136}, /* lvl 113 */
- { 85, 95, 111, 118, 124, 137}, /* lvl 114 */
- { 86, 96, 112, 119, 125, 138}, /* lvl 115 */
- { 86, 96, 113, 120, 126, 140}, /* lvl 116 */
- { 87, 97, 114, 121, 127, 141}, /* lvl 117 */
- { 88, 98, 115, 122, 128, 142}, /* lvl 118 */
- { 89, 99, 116, 123, 129, 143}, /* lvl 119 */
- { 90, 100, 117, 124, 130, 144}, /* lvl 120 */
- { 90, 101, 118, 125, 132, 146}, /* lvl 121 */
- { 91, 102, 119, 126, 133, 147}, /* lvl 122 */
- { 92, 103, 120, 127, 134, 148}, /* lvl 123 */
- { 93, 104, 121, 128, 135, 149}, /* lvl 124 */
- { 94, 105, 122, 129, 136, 150}, /* lvl 125 */
- { 94, 105, 123, 130, 137, 151}, /* lvl 126 */
- { 95, 106, 124, 131, 138, 152}, /* lvl 127 */
+ { -2, -1, 0, 1, 2, 3}, // 0
+ { -1, 0, 1, 2, 3, 4}, // 1
+ { 0, 1, 2, 3, 4, 5}, // 2
+ { 1, 2, 3, 4, 5, 6}, // 3
+ { 2, 3, 4, 5, 6, 7}, // 4
+ { 3, 4, 5, 6, 7, 8}, // 5
+ { 4, 5, 6, 7, 8, 9}, // 6
+ { 5, 6, 7, 8, 9, 10}, // 7
+ { 6, 7, 8, 9, 10, 11}, // 8
+ { 7, 8, 9, 10, 11, 12}, // 9
+ { 7, 9, 10, 11, 12, 14}, // 10
+ { 8, 9, 11, 12, 13, 15}, // 11
+ { 9, 10, 12, 13, 14, 16}, // 12
+ { 9, 11, 13, 14, 15, 17}, // 13
+ { 10, 11, 14, 15, 16, 18}, // 14
+ { 11, 12, 15, 16, 17, 19}, // 15
+ { 11, 13, 16, 17, 18, 20}, // 16
+ { 12, 14, 17, 18, 19, 21}, // 17
+ { 13, 15, 18, 19, 20, 22}, // 18
+ { 14, 16, 19, 20, 21, 23}, // 19
+ { 14, 17, 20, 21, 22, 24}, // 20
+ { 15, 17, 21, 22, 24, 26}, // 21
+ { 16, 18, 22, 23, 25, 27}, // 22
+ { 16, 19, 23, 24, 26, 28}, // 23
+ { 17, 19, 24, 25, 27, 30}, // 24
+ { 18, 20, 25, 26, 28, 31}, // 25
+ { 19, 21, 26, 27, 29, 32}, // 26
+ { 19, 22, 27, 28, 30, 33}, // 27
+ { 20, 23, 28, 29, 31, 35}, // 28
+ { 21, 24, 29, 30, 32, 36}, // 29
+ { 22, 25, 30, 31, 33, 37}, // 30
+ { 22, 25, 31, 32, 34, 38}, // 31
+ { 23, 26, 32, 33, 35, 39}, // 32
+ { 24, 27, 32, 35, 37, 41}, // 33
+ { 25, 28, 33, 36, 38, 42}, // 34
+ { 25, 28, 34, 37, 39, 43}, // 35
+ { 26, 29, 35, 38, 40, 44}, // 36
+ { 27, 30, 36, 39, 41, 45}, // 37
+ { 28, 31, 37, 40, 42, 46}, // 38
+ { 28, 32, 38, 41, 44, 48}, // 39
+ { 29, 33, 39, 42, 45, 49}, // 40
+ { 30, 34, 40, 43, 46, 50}, // 41
+ { 30, 34, 41, 44, 47, 52}, // 42
+ { 31, 35, 42, 45, 48, 53}, // 43
+ { 32, 36, 43, 46, 49, 54}, // 44
+ { 33, 37, 44, 47, 50, 55}, // 45
+ { 33, 37, 45, 48, 51, 57}, // 46
+ { 34, 38, 46, 49, 52, 58}, // 47
+ { 35, 39, 47, 50, 53, 59}, // 48
+ { 36, 40, 48, 51, 54, 60}, // 49
+ { 36, 41, 49, 52, 55, 61}, // 50
+ { 37, 42, 50, 53, 56, 62}, // 51
+ { 38, 43, 51, 54, 57, 63}, // 52
+ { 38, 43, 52, 55, 58, 65}, // 53
+ { 39, 44, 53, 56, 59, 66}, // 54
+ { 40, 45, 54, 57, 60, 67}, // 55
+ { 41, 46, 55, 58, 61, 68}, // 56
+ { 41, 47, 56, 59, 63, 70}, // 57
+ { 42, 48, 57, 60, 64, 71}, // 58
+ { 43, 49, 58, 61, 65, 72}, // 59
+ { 44, 50, 59, 62, 66, 73}, // 60
+ { 44, 50, 60, 63, 67, 75}, // 61
+ { 45, 51, 61, 64, 68, 76}, // 62
+ { 46, 52, 62, 65, 69, 77}, // 63
+ { 47, 53, 63, 66, 70, 78}, // 64
+ { 47, 53, 64, 67, 71, 79}, // 65
+ { 48, 54, 64, 69, 73, 81}, // 66
+ { 49, 55, 65, 70, 74, 82}, // 67
+ { 50, 56, 66, 71, 75, 83}, // 68
+ { 50, 56, 67, 72, 76, 84}, // 69
+ { 51, 57, 68, 73, 77, 85}, // 70
+ { 52, 58, 69, 74, 78, 86}, // 71
+ { 53, 59, 70, 75, 79, 87}, // 72
+ { 53, 60, 71, 76, 80, 89}, // 73
+ { 54, 61, 72, 77, 81, 90}, // 74
+ { 55, 62, 73, 78, 82, 91}, // 75
+ { 56, 63, 74, 79, 83, 92}, // 76
+ { 56, 63, 75, 80, 85, 94}, // 77
+ { 57, 64, 76, 81, 86, 95}, // 78
+ { 58, 65, 77, 82, 87, 96}, // 79
+ { 59, 66, 78, 83, 88, 97}, // 80
+ { 59, 67, 79, 84, 89, 99}, // 81
+ { 60, 68, 80, 85, 90, 100}, // 82
+ { 61, 69, 81, 86, 91, 101}, // 83
+ { 62, 70, 82, 87, 92, 102}, // 84
+ { 62, 70, 83, 88, 93, 103}, // 85
+ { 63, 71, 84, 89, 94, 104}, // 86
+ { 64, 72, 85, 90, 95, 105}, // 87
+ { 65, 73, 86, 91, 96, 106}, // 88
+ { 65, 73, 87, 92, 97, 108}, // 89
+ { 66, 74, 88, 93, 98, 109}, // 90
+ { 67, 75, 89, 94, 99, 110}, // 91
+ { 68, 76, 90, 95, 100, 111}, // 92
+ { 69, 77, 91, 96, 101, 112}, // 93
+ { 69, 78, 92, 97, 103, 114}, // 94
+ { 70, 79, 93, 98, 104, 115}, // 95
+ { 71, 80, 94, 99, 105, 116}, // 96
+ { 72, 81, 95, 100, 106, 117}, // 97
+ { 72, 81, 96, 101, 107, 119}, // 98
+ { 73, 82, 96, 103, 109, 120}, // 99
+ { 74, 83, 97, 104, 110, 121}, // 100
+ { 75, 84, 98, 105, 111, 122}, // 101
+ { 75, 84, 99, 106, 112, 124}, // 102
+ { 76, 85, 100, 107, 113, 125}, // 103
+ { 77, 86, 101, 108, 114, 126}, // 104
+ { 78, 87, 102, 109, 115, 127}, // 105
+ { 79, 88, 103, 110, 116, 128}, // 106
+ { 79, 89, 104, 111, 117, 129}, // 107
+ { 80, 90, 105, 112, 118, 130}, // 108
+ { 81, 91, 106, 113, 119, 131}, // 109
+ { 82, 92, 107, 114, 120, 132}, // 110
+ { 82, 92, 108, 115, 121, 134}, // 111
+ { 83, 93, 109, 116, 122, 135}, // 112
+ { 84, 94, 110, 117, 123, 136}, // 113
+ { 85, 95, 111, 118, 124, 137}, // 114
+ { 86, 96, 112, 119, 125, 138}, // 115
+ { 86, 96, 113, 120, 126, 140}, // 116
+ { 87, 97, 114, 121, 127, 141}, // 117
+ { 88, 98, 115, 122, 128, 142}, // 118
+ { 89, 99, 116, 123, 129, 143}, // 119
+ { 90, 100, 117, 124, 130, 144}, // 120
+ { 90, 101, 118, 125, 132, 146}, // 121
+ { 91, 102, 119, 126, 133, 147}, // 122
+ { 92, 103, 120, 127, 134, 148}, // 123
+ { 93, 104, 121, 128, 135, 149}, // 124
+ { 94, 105, 122, 129, 136, 150}, // 125
+ { 94, 105, 123, 130, 137, 151}, // 126
+ { 95, 106, 124, 131, 138, 152}, // 127
+#if 0
{ 96, 107, 125, 132, 139, 153}, /* lvl 128 */
{ 97, 108, 126, 133, 140, 154}, /* lvl 129 */
{ 97, 109, 127, 134, 141, 156}, /* lvl 130 */
@@ -283,15 +319,9 @@
{ 154, 169, 192, 205, 214, 233}, /* lvl 198 */
{ 155, 170, 193, 206, 215, 234}, /* lvl 199 */
{ 156, 171, 194, 207, 216, 235} /* lvl 200 */
+#endif
};
-/*
- Since this is nowhere defined ...
- Both come in handy at least in function add_exp()
-*/
-#define MAX_EXPERIENCE new_levels[MAXLEVEL + 1]
-
-
/* init_new_exp_system() - called in init(). This function will reconfigure
* the properties of skills array and experience categories, and links
* each skill to the appropriate experience category
@@ -823,7 +853,7 @@
/* we get first a global level difference mulitplicator */
exp_mul = calc_level_difference(who_lvl, op_lvl);
- op_exp = (int) (((float) op_exp * lev_exp[op_lvl] * mod)* exp_mul * 1.1f);
+ op_exp = (int) (((float) op_exp * LevExp[op_lvl] * mod)* exp_mul * 1.1f);
if(real != NULL)
{
if(*real > 0)
Modified: main/server/src/common/food.c
===================================================================
--- main/server/src/common/food.c 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/src/common/food.c 2011-01-22 02:36:35 UTC (rev 6136)
@@ -267,12 +267,11 @@
}
if (food->speed_left)
force->speed = food->speed_left;
+ force = check_obj_stat_buffs(force, who);
+ SET_FLAG(force, FLAG_APPLIED);
+ force = insert_ob_in_ob(force, who);
- force = check_obj_stat_buffs(force, who);
-
- SET_FLAG(force, FLAG_APPLIED);
- force = insert_ob_in_ob(force, who);
- if(who->type == PLAYER)
+ if (who->type == PLAYER)
change_abil(who, force); /* Mostly to display any messages */
else
FIX_PLAYER(who ,"create food force (bug? can't be fix_player. fix_monster?"); /* huch? should be fix_monster, right? */
Modified: main/server/src/common/info.c
===================================================================
--- main/server/src/common/info.c 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/src/common/info.c 2011-01-22 02:36:35 UTC (rev 6136)
@@ -510,13 +510,13 @@
if (!(pl->state & (ST_DEAD | ST_ZOMBIE)) &&
pl->socket.status != Ns_Dead)
{
- NewSocket *ns = &pl->socket;
- const size_t len = strlen(buf) + 3;
+ NewSocket *ns = &pl->socket;
+ const int len = strlen(buf);
/* Turn off any internal flags. */
flags &= ~NDI_ALL;
- SOCKBUF_REQUEST_BUFFER(ns, len);
+ SOCKBUF_REQUEST_BUFFER(ns, len + 3);
SockBuf_AddShort(ACTIVE_SOCKBUF(ns), (flags & NDI_FLAG_MASK));
SockBuf_AddString(ACTIVE_SOCKBUF(ns), buf, len);
SOCKBUF_REQUEST_FINISH(ns, BINARY_CMD_DRAWINFO2, SOCKBUF_DYNAMIC);
Modified: main/server/src/common/living.c
===================================================================
--- main/server/src/common/living.c 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/src/common/living.c 2011-01-22 02:36:35 UTC (rev 6136)
@@ -56,6 +56,26 @@
{"ogre ", RN_GIANT} /* count as giant */
};
+/* A mob's default base AC/WC depends on its level. This used to be two tables
+ * but as all values were identical I merged them. */
+static int MobACWC[MAXMOBLEVEL + 1] =
+{
+ 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, // 1-10
+ 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, // 11-20
+ 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, // 21-30
+ 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, // 31-40
+ 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, // 41-50
+ 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, // 51-60
+ 35, 36, 36, 37, 37, 38, 38, 39, 39, 40, // 61-70
+ 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, // 71-80
+ 45, 46, 46, 47, 47, 48, 48, 49, 49, 50, // 81-90
+ 50, 51, 51, 52, 52, 53, 53, 54, 54, 55, // 91-100
+ 55, 56, 56, 57, 57, 58, 58, 59, 60, 60, // 101-110
+ 61, 61, 62, 62, 63, 63, 64, 64, 65, 66, // 111-120
+ 67, 67, 68, 68, 69, 70, 70 // 121-127
+};
+
/* when we carry more as this of our weight_limit, we get encumbered. */
#define ENCUMBRANCE_LIMIT 0.35f
@@ -598,31 +618,37 @@
}
}
}
- if ((tmp->stats.hp || tmp->stats.maxhp) && op->type == PLAYER)
+
+ if (op->type == PLAYER &&
+ tmp->type != TYPE_FOOD_FORCE)
{
- success = 1;
- if (applied * tmp->stats.hp > 0 || applied * tmp->stats.maxhp > 0)
- new_draw_info(NDI_UNIQUE | NDI_WHITE, 0, op, "You feel much more healthy!");
- else
- new_draw_info(NDI_UNIQUE | NDI_GREY, 0, op, "You feel much less healthy!");
+ if ((tmp->stats.hp || tmp->stats.maxhp))
+ {
+ success = 1;
+ if (applied * tmp->stats.hp > 0 || applied * tmp->stats.maxhp > 0)
+ new_draw_info(NDI_UNIQUE | NDI_WHITE, 0, op, "You feel much more healthy!");
+ else
+ new_draw_info(NDI_UNIQUE | NDI_GREY, 0, op, "You feel much less healthy!");
+ }
+
+ if ((tmp->stats.sp || tmp->stats.maxsp) && tmp->type != SKILL)
+ {
+ success = 1;
+ if (applied * tmp->stats.sp > 0 || applied * tmp->stats.maxsp > 0)
+ new_draw_info(NDI_UNIQUE | NDI_WHITE, 0, op, "You feel one with the powers of magic!");
+ else
+ new_draw_info(NDI_UNIQUE | NDI_GREY, 0, op, "You suddenly feel very mundane.");
+ }
+
+ if ((tmp->stats.grace || tmp->stats.maxgrace))
+ {
+ success = 1;
+ if (applied * tmp->stats.grace > 0 || applied * tmp->stats.maxgrace)
+ new_draw_info(NDI_UNIQUE | NDI_WHITE, 0, op, "You feel closer to your deity!");
+ else
+ new_draw_info(NDI_UNIQUE | NDI_GREY, 0, op, "You suddenly feel less holy.");
+ }
}
- if ((tmp->stats.sp || tmp->stats.maxsp) && op->type == PLAYER && tmp->type != SKILL)
- {
- success = 1;
- if (applied * tmp->stats.sp > 0 || applied * tmp->stats.maxsp > 0)
- new_draw_info(NDI_UNIQUE | NDI_WHITE, 0, op, "You feel one with the powers of magic!");
- else
- new_draw_info(NDI_UNIQUE | NDI_GREY, 0, op, "You suddenly feel very mundane.");
- }
- /* for the future when artifacts set this -b.t. */
- if ((tmp->stats.grace || tmp->stats.maxgrace) && op->type == PLAYER)
- {
- success = 1;
- if (applied * tmp->stats.grace > 0 || applied * tmp->stats.maxgrace)
- new_draw_info(NDI_UNIQUE | NDI_WHITE, 0, op, "You feel closer to your deity!");
- else
- new_draw_info(NDI_UNIQUE | NDI_GREY, 0, op, "You suddenly feel less holy.");
- }
/* Messages for changed resistance */
for (i = 0; i < NROFATTACKS; i++)
@@ -1014,6 +1040,8 @@
CLEAR_FLAG(op, FLAG_REFL_MISSILE);
CLEAR_FLAG(op, FLAG_REFL_SPELL);
+ CLEAR_FLAG(op, FLAG_EATING);
+
if (QUERY_FLAG(op, FLAG_IS_INVISIBLE))
inv_flag = 1;
if (QUERY_FLAG(op, FLAG_SEE_INVISIBLE))
@@ -1336,7 +1364,13 @@
pl->gen_grace += tmp->stats.grace;
pl->gen_hp += tmp->stats.hp;
temp_fumble += tmp->last_heal; /* spell fumble chance */
- pl->spell_fumble = temp_fumble + pl->encumbrance - op->stats.Int;
+
+ /* I moved a line from here down. Things here ONLY apply when the pl
+ is actually wearing armour, which means that natural stat boni
+ are only applied when they have something on. Other issues may
+ come up with this fact.
+ */
+
thac0 += tmp->stats.thac0;
thacm += tmp->stats.thacm;
@@ -1382,6 +1416,10 @@
/* i am not 100% sure this is safe for *all* objects - i have used for that
* reason not default here.
*/
+ case TYPE_FOOD_FORCE:
+ SET_FLAG(op, FLAG_EATING);
+ goto fix_player_jump_resi;
+
case TYPE_AGE_FORCE:
pl->age_force = tmp; /* store our age force */
pl->age = tmp->stats.hp;
@@ -1392,6 +1430,7 @@
SET_FLAG(op, FLAG_IS_AGED);
else
CLEAR_FLAG(op, FLAG_IS_AGED);
+ goto fix_player_jump_resi;
case FORCE:
if(tmp->sub_type1 == ST1_FORCE_SNARE)
@@ -1883,6 +1922,10 @@
if (op->stats.grace > op->stats.maxgrace)
op->stats.grace = op->stats.maxgrace;
+ /* Calculate the spell fumble here because it is affected by int.
+ read the above by temp_fumble to learn more.
+ */
+ pl->spell_fumble = temp_fumble + pl->encumbrance - op->stats.Int;
/* wc and ac are level independent in the thac system - but Dex effects both now */
f = get_player_stat_bonus(op->stats.Dex);
@@ -2114,20 +2157,7 @@
int wc_mali=0, ac_mali=0, snare_penalty=0, slow_penalty=0;
object *base, *tmp, *spawn_info=NULL, *bow=NULL, *wc_tmp;
float tmp_add;
- int mob_wc[MAXLEVEL + 18] =
- { 1,2,3,4,5,6,7,8,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,
- 18,19,19,20,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,30,
- 30,31,31,32,32,33,33,34,34,35,35,36,36,37,37,38,38,39,39,40,40,41,41,42,42,
- 43,43,44,44,45,45,46,46,47,47,48,48,49,49,50,50,51,51,52,52,53,53,54,54,55,
- 55,56,56,57,57,58,58,59,60,60,61,61,62,62,63,63,64,64,65,66,67,67,68,68,69,
- 70,70};
- int mob_ac[MAXLEVEL + 18] =
- { 1,2,3,4,5,6,7,8,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,
- 18,19,19,20,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,30,
- 30,31,31,32,32,33,33,34,34,35,35,36,36,37,37,38,38,39,39,40,40,41,41,42,42,
- 43,43,44,44,45,45,46,46,47,47,48,48,49,49,50,50,51,51,52,52,53,53,54,54,55,
- 55,56,56,57,57,58,58,59,60,6061,61,62,62,63,63,64,64,65,66,67,67,68,68,69,
- 70,70};
+
if (op->head) /* don't adjust tails or player - only single objects or heads */
return;
@@ -2261,14 +2291,14 @@
op->stats.wc = base->stats.wc + (op->level / 10) - wc_mali;
wc_tmp = &op->arch->clone;
if(op->stats.wc == (wc_tmp->stats.wc + ((int)op->level / 10)))
- op->stats.wc = mob_wc[op->level];
+ op->stats.wc = MobACWC[op->level];
if(op->level < 10)
{
op->stats.thac0 += (abs(op->level - 10));
op->stats.thacm += (10 - op->level);
}
if(op->stats.ac == (wc_tmp->stats.ac + ((int)op->level / 10)))
- op->stats.ac = mob_ac[op->level];
+ op->stats.ac = MobACWC[op->level];
op->stats.dam = base->stats.dam;
Modified: main/server/src/common/loader.l
===================================================================
--- main/server/src/common/loader.l 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/src/common/loader.l 2011-01-22 02:36:35 UTC (rev 6136)
@@ -224,7 +224,7 @@
* also we adjust here auto_apply.
* This was moved from fix_auto_apply.
* This here only handles inventory items, the "base"
- * items are handled in load_objects() .
+ * items are handled in map.c/LoadObjects() .
*/
if(QUERY_FLAG(tmp,FLAG_AUTO_APPLY)) /* remember: auto_apply will remove FLAG_AUTO_APPLY */
auto_apply(tmp);
@@ -533,7 +533,6 @@
^attack_nether{S} SET_ATTACK(op, ATNR_NETHER, IVAL);
^attack_sonic{S} SET_ATTACK(op, ATNR_SONIC, IVAL);
^attack_psionic{S} SET_ATTACK(op, ATNR_PSIONIC, IVAL);
-
^attack_light{S} SET_ATTACK(op, ATNR_LIGHT, IVAL);
^attack_channelling{S} SET_ATTACK(op, ATNR_CHANNELLING, IVAL);
^attack_aether{S} SET_ATTACK(op, ATNR_AETHER, IVAL);
@@ -568,73 +567,13 @@
^resist_nether{S} SET_RESIST(op, ATNR_NETHER, IVAL);
^resist_sonic{S} SET_RESIST(op, ATNR_SONIC, IVAL);
^resist_psionic{S} SET_RESIST(op, ATNR_PSIONIC, IVAL);
-
+^resist_light{S} SET_RESIST(op, ATNR_LIGHT, IVAL);
^resist_channelling{S} SET_RESIST(op, ATNR_CHANNELLING, IVAL);
^resist_aether{S} SET_RESIST(op, ATNR_AETHER, IVAL);
-^resist_light{S} SET_RESIST(op, ATNR_LIGHT, IVAL);
^resist_shadow{S} SET_RESIST(op, ATNR_SHADOW, IVAL);
^resist_snare{S} SET_RESIST(op, ATNR_SNARE, IVAL);
^resist_corruption{S} SET_RESIST(op, ATNR_CORRUPTION, IVAL);
-
- /* outdate beta 3 attack/protection/resists WE HOTMAP THEM TO NEW ONES HERE - remove this for 1.0 */
-^protect_impact{S} SET_RESIST(op, ATNR_IMPACT, IVAL);
-^protect_slash{S} SET_RESIST(op, ATNR_SLASH, IVAL);
-^protect_cleave{S} SET_RESIST(op, ATNR_CLEAVE, IVAL);
-^protect_pierce{S} SET_RESIST(op, ATNR_PIERCE, IVAL);
-^protect_fire{S} SET_RESIST(op, ATNR_FIRE, IVAL);
-^protect_cold{S} SET_RESIST(op, ATNR_COLD, IVAL);
-^protect_electricity{S} SET_RESIST(op, ATNR_ELECTRICITY, IVAL);
-^protect_poison{S} SET_RESIST(op, ATNR_POISON, IVAL);
-^protect_acid{S} SET_RESIST(op, ATNR_ACID, IVAL);
-^protect_sonic{S} SET_RESIST(op, ATNR_SONIC, IVAL);
-^protect_psionic{S} SET_RESIST(op, ATNR_PSIONIC, IVAL);
-^protect_force{S} SET_RESIST(op, ATNR_CHANNELLING, IVAL);
-^protect_death{S} SET_RESIST(op, ATNR_DEATH, IVAL);
-^protect_light{S} SET_RESIST(op, ATNR_LIGHT, IVAL);
-^protect_shadow{S} SET_RESIST(op, ATNR_SHADOW, IVAL);
-^protect_aether{S} SET_RESIST(op, ATNR_AETHER, IVAL);
-^protect_nether{S} SET_RESIST(op, ATNR_NETHER, IVAL);
-^protect_chaos{S} SET_RESIST(op, ATNR_CHAOS, IVAL);
-^protect_lifesteal{S} SET_RESIST(op, ATNR_LIFESTEAL, IVAL);
-^protect_weaponmagic{S} SET_RESIST(op, ATNR_WEAPONMAGIC, IVAL);
-^protect_godpower{S} SET_RESIST(op, ATNR_GODPOWER, IVAL);
-
-^protect_magic{S} SET_RESIST(op, ATNR_SONIC, IVAL); /* old: PROTECT_MAGIC */
-^protect_mind{S} SET_RESIST(op, ATNR_LIGHT, IVAL); /* old: PROTECT_MIND */
-^protect_body{S} SET_RESIST(op, ATNR_SHADOW, IVAL); /* old: PROTECT_BODY */
-^protect_spiritual{S} SET_RESIST(op, ATNR_LIFESTEAL, IVAL); /* old: PROTECT_SPIRITUAL */
-^protect_corruption{S} SET_RESIST(op, ATNR_AETHER, IVAL);/* old: PROTECT_CORRUPTION */
-^resist_force{S} SET_RESIST(op, ATNR_CHANNELLING, IVAL);
-^resist_time{S} SET_RESIST(op, ATNR_SHADOW, IVAL);
-^resist_demonic{S} SET_RESIST(op, ATNR_AETHER, IVAL);
-^resist_blind{S} SET_RESIST(op, ATNR_LIGHT, IVAL);
-^resist_purity{S} SET_RESIST(op, ATNR_CORRUPTION, IVAL);
-^resist_ghosthit{S} SET_RESIST(op, ATNR_SNARE, IVAL);
-^attack_blind{S} SET_ATTACK(op, ATNR_LIGHT, IVAL);
-^attack_force{S} SET_ATTACK(op, ATNR_CHANNELLING, IVAL);
-^attack_demonic{S} SET_ATTACK(op, ATNR_AETHER, IVAL);
-^attack_purity{S} SET_ATTACK(op, ATNR_CORRUPTION, IVAL);
-^attack_time{S} SET_ATTACK(op, ATNR_SHADOW, IVAL);
-^attack_ghosthit{S} SET_ATTACK(op, ATNR_SNARE, IVAL);
-^resist_life_steal{S} SET_RESIST(op, ATNR_LIFESTEAL, IVAL);
-^attack_life_steal{S} SET_ATTACK(op, ATNR_LIFESTEAL, IVAL);
-^resist_counterspell{S} SET_RESIST(op, ATNR_COUNTERMAGIC, IVAL);
-^attack_counterspell{S} SET_ATTACK(op, ATNR_COUNTERMAGIC, IVAL);
-^protect_weapon_magic{S} SET_RESIST(op, ATNR_WEAPONMAGIC, IVAL);
-^is_vul_elemental{S} {};
-^is_vul_magic{S} {};
-^is_vul_physical{S} {};
-^is_vul_sphere{S} {};
-^is_indestructible{S} {};
-^unique{S} {};
-^attacktype{S} {};
-^wc_range{S} {};
-^has_ready_skill{S} {};
- /* end outdate */
-
-^attack_movement{S} LOG(llevMapbug, "MAPBUG: loader(): deprecated attack_movement setting. op=%s\n", STRING_OBJ_NAME(op));
-^move_state{S} LOG(llevMapbug, "MAPBUG: loader(): deprecated move_state setting. op=%s\n", STRING_OBJ_NAME(op));
^confused{S} SET_OR_CLEAR_FLAG(op, FLAG_CONFUSED, IVAL);
^paralyzed{S} SET_OR_CLEAR_FLAG(op, FLAG_PARALYZED, IVAL);
^feared{S} SET_OR_CLEAR_FLAG(op, FLAG_FEARED, IVAL);
Modified: main/server/src/common/logger.c
===================================================================
--- main/server/src/common/logger.c 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/src/common/logger.c 2011-01-22 02:36:35 UTC (rev 6136)
@@ -26,6 +26,12 @@
static char log_buf[256*1024];
+/* The following is a workaround for FS#61 - sockbuf bug. */
+#ifdef DAI_DEVELOPMENT_CONTENT
+char mapbug_buf[HUGE_BUF] = "";
+size_t mapbug_len = 0;
+#endif
+
/* minimum timestamp interval = 10 minutes */
#define TIMESTAMP_INTERVAL 600
static struct timeval last_timestamp = {0, 0};
@@ -71,8 +77,29 @@
/* Mapbugs are broadcasted on the test server */
if (logLevel == llevMapbug)
{
+/* The following is a workaround for FS#61 - sockbuf bug. */
+#if 0
new_draw_info(NDI_PLAYER | NDI_UNIQUE | NDI_ALL | NDI_RED, 5, NULL,
"%s", log_buf);
+#else
+ if (mapbug_len < sizeof(mapbug_buf))
+ {
+ size_t log_len = strlen(log_buf);
+
+ if (mapbug_len + log_len < sizeof(mapbug_buf))
+ {
+ sprintf(mapbug_buf + mapbug_len, "%s", log_buf);
+ mapbug_len += log_len;
+ }
+ else
+ {
+ sprintf(mapbug_buf + MIN(mapbug_len,
+ sizeof(mapbug_buf) - 7),
+ "[MORE]");
+ mapbug_len = sizeof(mapbug_buf);
+ }
+ }
+#endif
}
#endif
}
Modified: main/server/src/common/map.c
===================================================================
--- main/server/src/common/map.c 2011-01-22 02:01:26 UTC (rev 6135)
+++ main/server/src/common/map.c 2011-01-22 02:36:35 UTC (rev 6136)
@@ -24,98 +24,111 @@
*/
#include <global.h>
-#ifndef WIN32 /* ---win32 exclude header */
-#include <unistd.h>
-#endif /* win32 */
-/* Default values for a few non-zero attributes. */
-#define MAP_DEFAULT_WIDTH 24
-#define MAP_DEFAULT_HEIGHT 24
-#define MAP_DEFAULT_RESET_TIME MIN(MAP_MAXRESET, 7200)
-#define MAP_DEFAULT_SWAP_TIME MAX(MAP_MINTIMEOUT, 300)
-#define MAP_DEFAULT_DIFFICULTY 1
-#define MAP_DEFAULT_DARKNESS 0
-
int global_darkness_table[MAX_DARKNESS + 1] =
{
- 0, 20, 40, 80, 160, 320, 640, 1280
+ 0,
+ 20,
+ 40,
+ 80,
+ 160,
+ 320,
+ 640,
+ 1280
};
-/* to get the reverse direction for all 8 tiled map index */
-int map_tiled_reverse[TILED_MAPS] =
+/* To get the reverse direction for all 8 tiled map index */
+static int MapTiledReverse[TILED_MAPS] =
{
- 2, 3, 0, 1, 6, 7, 4, 5
+ 2,
+ 3,
+ 0,
+ 1,
+ 6,
+ 7,
+ 4,
+ 5
};
-/* Tag counter for the memory/weakref system. Uniquely identifies this instance of the map
- * in memory. Not the same as the map_tag/global_map_tag. */
-static tag_t global_map_id;
+static char *ShowMapFlags(mapstruct *m);
+static mapstruct *GetLinkedMap(void);
+static void AllocateMap(mapstruct *m);
+static mapstruct *LoadTemporaryMap(mapstruct *m);
+static mapstruct *LoadMap(const char *filename, const char *src_name,
+ int flags, shstr *reference);
+static int LoadMapHeader(FILE *fp, mapstruct *m, int flags);
+static void FreeMap(mapstruct *m);
+static void LoadObjects(mapstruct *m, FILE *fp, int mapflags);
+static void UpdateMapTiles(mapstruct *m);
+static void SaveObjects(mapstruct *m, FILE *fp, int flag);
+static void FreeAllObjects(mapstruct *m);
+#ifdef RECYCLE_TMP_MAPS
+static void WriteMapLog(void);
+#endif
+static long Seconds(void);
+static void SetResetTime(mapstruct *m);
-/*
- * Returns the mapstruct which has a name matching the given argument.
- * return NULL if no match is found. This version _requires_ a shared string as input.
- */
-mapstruct *has_been_loaded_sh(const char *name)
+/* Returns the mapstruct which has a name matching the given argument oe NULL
+ * if no match is found. */
+mapstruct *has_been_loaded_sh(shstr *path)
{
- mapstruct *map;
+ mapstruct *map;
- if (!name || !*name)
+ if (!path ||
+ !*path)
+ {
return NULL;
+ }
- /* this IS a bug starting without '/' or '.' - this can lead in double loaded maps!
- * We don't fix it here anymore - this MUST be done by the calling functions or our
- * inheritanced map system is already broken somewhere before this call.
- */
- if (*name != '/' && *name != '.')
+ /* This IS a bug starting without '/' or '.' - this can lead in double
+ * loaded maps! We don't fix it here anymore - this MUST be done by the
+ * calling functions or our inheritanced map system is already broken
+ * somewhere before this call. */
+ if (*path != '/' &&
+ *path != '.')
{
- LOG(llevDebug, "DEBUG: has_been_loaded_sh: filename without start '/' or '.' (%s)\n", name);
+ LOG(llevBug, "BUG:: %s/has_been_loaded_sh(): filename without start '/' or '.' (%s)\n",
+ __FILE__, path);
+
return NULL;
}
for (map = first_map; map; map = map->next)
{
- /*LOG(llevNoLog,"check map: >%s< find: >%s<\n", name, map->path);*/
- if (name == map->path)
+ if (path == map->path)
+ {
break;
+ }
}
- return (map);
+ return map;
}
-/*
- * This makes a path absolute outside the world of Crossfire.
- * In other words, it prepends LIBDIR/MAPDIR/ to the given path
- * and returns the pointer to a static array containing the result.
- * it really should be called create_mapname
- */
-char * create_mapdir_pathname(const char *name)
+/* This prepends LIBDIR/MAPDIR/ to the given path and returns the pointer to a
+ * static array containing the result. */
+char *create_mapdir_pathname(const char *name)
{
static char buf[MAXPATHLEN];
/* double "//" would be a problem for comparing path strings */
if (*name == '/')
+ {
sprintf(buf, "%s%s", settings.mapdir, name);
+ }
else
+ {
sprintf(buf, "%s/%s", settings.mapdir, name);
- return (buf);
+ }
+
+ return buf;
}
-/*
- * This function checks if a file with the given path exists.
- * -1 is returned if it fails, otherwise the mode of the file
- * is returned.
- * It tries out all the compression suffixes listed in the uncomp[] array.
+/* This function checks if a file with the given path exists. -1 is returned if
+ * it fails, otherwise the mode of the file is returned. It tries out all the
+ * compression suffixes listed in the uncomp[] array.
*
* If prepend_dir is set, then we call create_mapdir_pathname (which prepends
- * libdir & mapdir). Otherwise, we assume the name given is fully
- * complete.
- * Only the editor actually cares about the writablity of this -
- * the rest of the code only cares that the file is readable.
- * when the editor goes away, the call to stat should probably be
- * replaced by an access instead (similar to the windows one, but
- * that seems to be missing the prepend_dir processing
- */
-
+ * libdir & mapdir). Otherwise, we assume the name given is fully complete. */
int check_path(const char *name, int prepend_dir)
{
if (prepend_dir)
@@ -126,40 +139,53 @@
name = buf;
}
- return(access(name, 0));
+ return access(name, 0);
}
-/** Make path absolute and remove ".." and "." entries.
- * path will become a normalized (absolute) version of the path in dst, with all
- * relative path references (".." and "." - parent directory and same directory)
- * resolved (path will not contain any ".." or "." elements, even if dst did).
- * If dst was not already absolute, the directory part of src will be used
- * as the base path and dst will be added to it.
- * @param[in] src already normalized file name for finding absolute path
- * @param[in] dst path to normalize. Should be either an absolute path or a path
- * relative to src. It must be a true "source" map path, and not a path into the
- * "./instance" or "./players" directory.
+/* Make path absolute and remove ".." and "." entries.
+ *
+ * path will become a normalized (absolute) version of the path in dst, with
+ * all relative path references (".." and "." - parent directory and same
+ * directory) resolved (path will not contain any ".." or "." elements, even
+ * if dst did).
+ *
+ * If dst was not already absolute, the directory part of src will be used as
+ * the base path and dst will be added to it.
+ *
+ * src is the already normalized file name for finding absolute path.
+ *
+ * dst is the path to normalize. Should be either an absolute path or a path
+ * relative to src. It must be a true "source" map path, and not a path into
+ * the "./instance" or "./players" directory.
+ *
* If dst is NULL, src is used for dst too.
- * @param[out] destination buffer for normalized path. Should be at least MAXPATHLEN big.
- * @return pointer to path
- */
+ *
+ * path is a destination buffer for normalized path. Should be at least
+ * MAXPATHLEN big.
+ *
+ * Returns pointer to path. */
char *normalize_path(const char *src, const char *dst, char *path)
{
- char *p;
+ char *p;
/* char *q; */
- char buf[MAXPATHLEN*2];
+ char buf[MAXPATHLEN * 2];
/*LOG(llevDebug,"path before normalization >%s< >%s<\n", src, dst?dst:"<no dst>");*/
- if(!dst)
- dst = src;
- if(!src)
+ if (!src)
{
- LOG(llevDebug,"BUG: normalize_path(): Called with src path = NULL! (dst:%s)\n", STRING_SAFE(dst));
+ LOG(llevBug, "BUG:: %s/normalize_path(): Called with src path = NULL! (dst:%s)\n",
+ __FILE__, STRING_SAFE(dst));
path[0] = '\0';
+
return path;
}
+ if (!dst)
+ {
+ dst = src;
+ }
+
/* First, make the dst path absolute */
if (*dst == '/')
{
@@ -174,21 +200,31 @@
/* (Only works with default directory paths) */
/* Actually, a settings.localdir that doesn't start with "." will probalbly
* break instanced and unique maps... */
- if(strncmp(dst, LOCALDIR "/" INSTANCEDIR, LSTRLEN(LOCALDIR "/" INSTANCEDIR)) == 0
- || strncmp(dst, LOCALDIR "/" PLAYERDIR, LSTRLEN(LOCALDIR "/" PLAYERDIR)) == 0)
+ if (!strncmp(dst, LOCALDIR "/" INSTANCEDIR,
+ LSTRLEN(LOCALDIR "/" INSTANCEDIR)) ||
+ !strncmp(dst, LOCALDIR "/" PLAYERDIR,
+ LSTRLEN(LOCALDIR "/" PLAYERDIR)))
{
- LOG(llevDebug,"BUG: normalize_path(): Called with unique/instance dst: %s\n", dst);
+ LOG(llevBug, "BUG:: %s/normalize_path(): Called with unique/instance dst: %s!\n",
+ __FILE__, dst);
strcpy(path, dst);
+
return path;
}
}
/* Combine directory part of src with dst to create absolute path */
strcpy(buf, src);
+
if ((p = strrchr(buf, '/')))
+ {
p[1] = '\0';
+ }
else
+ {
strcpy(buf, "/");
+ }
+
strcat(buf, dst);
}
@@ -198,32 +234,44 @@
/* Disabled to see if anything breaks. Gecko 2007-02-03 */
#if 0
q = p = buf;
+
while ((q = strstr(q, "//")))
+ {
p = ++q;
+ }
#else
p = buf;
- if(strstr(p, "//"))
- LOG(llevBug, "BUG: map path with unhandled '//' element: %s\n", buf);
+
+ if (strstr(p, "//"))
+ {
+ LOG(llevBug, "BUG:: %s/normalize_path(): Unhandled '//' element: %s!\n",
+ __FILE__, buf);
+ }
#endif
*path = '\0';
- p = strtok(p, "/");
- while (p)
+
+ for (p = strtok(p, "/"); p; p = strtok(NULL, "/"))
{
- if(strcmp(p, ".") == 0)
+ if (!strcmp(p, "."))
{
/* Just ignore "./" path elements */
}
- else if(strcmp(p, "..") == 0)
+ else if (!strcmp(p, ".."))
{
/* Remove last inserted path element from 'path' */
char *separator = strrchr(path, '/');
+
if (separator)
+ {
*separator = '\0';
+ }
else
{
- LOG(llevBug, "BUG: Illegal path (too many \"..\" entries): %s\n", dst);
+ LOG(llevBug, "BUG:: %s/normalize_path(): Illegal path (too many \"..\" entries): %s!\n",
+ __FILE__, dst);
*path = '\0';
+
return path; /* Don't continue normalization */
}
}
@@ -232,32 +280,32 @@
strcat(path, "/");
strcat(path, p);
}
- p = strtok(NULL, "/");
}
+
/*LOG(llevDebug,"path after normalization >%s<\n", path);*/
- return (path);
+ return path;
}
-/* same as above but here we know that src & dst was normalized before - so
- * we can just merge them without checking for ".." again.
- */
+/* Same as above but here we know that src & dst was normalized before - so we
+ * can just merge them without checking for ".." again. */
char *normalize_path_direct(const char *src, const char *dst, char *path)
{
/*LOG(llevDebug,"path before normalization >%s< >%s<\n", src, dst?dst:"<no dst>");*/
- if(!src)
+ if (!src)
{
- LOG(llevBug,"normalize_path_direct(): Called with src path = NULL! (dst:%s)\n", STRING_SAFE(dst));
+ LOG(llevBug, "BUG:: %s/normalize_path_direct(): Called with src path = NULL! (dst:%s)\n",
+ __FILE__, STRING_SAFE(dst));
path[0] = '\0';
- return path;
}
+ else
+ {
+ if (!dst)
+ {
+ dst = src;
+ }
- if(!dst)
- dst = src;
-
- if(dst)
- {
/* First, make the dst path absolute */
if (*dst == '/')
{
@@ -266,62 +314,27 @@
}
else
{
- char *p;
+ char *p;
/* Combine directory part of src with dst to create absolute path */
strcpy(path, src);
+
if ((p = strrchr(path, '/')))
+ {
p[1] = '\0';
+ }
else
+ {
strcpy(path, "/");
+ }
+
strcat(path, dst);
}
}
+
return path;
}
-static char *show_map_flags(mapstruct *m)
-{
- static char buf[12];
-
- buf[0] = '\0';
-
- if (MAP_FIXED_RESETTIME(m))
- sprintf(strchr(buf, '\0'), "%c", 'R');
-
- if (MAP_NOSAVE(m))
- sprintf(strchr(buf, '\0'), "%c", '$');
-
- if (MAP_NOMAGIC(m))
- sprintf(strchr(buf, '\0'), "%c", '\\');
-
- if (MAP_NOPRIEST(m))
- sprintf(strchr(buf, '\0'), "%c", '/');
-
- if (MAP_NOHARM(m))
- sprintf(strchr(buf, '\0'), "%c", 'X');
-
- if (MAP_NOSUMMON(m))
- sprintf(strchr(buf, '\0'), "%c", '#');
-
- if (MAP_FIXEDLOGIN(m))
- sprintf(strchr(buf, '\0'), "%c", 'L');
-
- if (MAP_PERMDEATH(m))
- sprintf(strchr(buf, '\0'), "%c", '_');
-
- if (MAP_ULTRADEATH(m))
- sprintf(strchr(buf, '\0'), "%c", '-');
-
- if (MAP_ULTIMATEDEATH(m))
- sprintf(strchr(buf, '\0'), "%c", '=');
-
- if (MAP_PVP(m))
- sprintf(strchr(buf, '\0'), "%c", '!');
-
- return buf;
-}
-
/* Dumps the header info of m to the server log and, if pl is non-NULL, prints
* this info to the client as well.
*
@@ -341,10 +354,8 @@
* TODO: Finish listing layout. */
void dump_map(mapstruct *m, player *pl, int list, char *ref)
{
- object *ob;
+ object *ob = (pl) ? pl->ob : NULL;
- ob = (pl) ? pl->ob : NULL;
-
if (list <= 0)
{
NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Name~: %s",
@@ -356,11 +367,15 @@
if (ob &&
ob->map == m)
+ {
NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Position~: %d, %d",
ob->x, ob->y);
+ }
- NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Path~: %s", m->path);
- NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Orig Path~: %s", m->orig_path);
+ NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Path~: %s",
+ STRING_MAP_PATH(m));
+ NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Orig Path~: %s",
+ STRING_MAP_ORIG_PATH(m));
if (!pl ||
(pl->gmaster_mode & (GMASTER_MODE_MW | GMASTER_MODE_MM | GMASTER_MODE_SA)))
@@ -378,11 +393,13 @@
MAP_DIFFICULTY(m));
if (m->tileset_id)
+ {
NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Tileset ID/X/Y~: %d/%d/%d",
m->tileset_id, m->tileset_x, m->tileset_y);
+ }
NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Flags~: %s",
- show_map_flags(m));
+ ShowMapFlags(m));
NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Players~: %d",
players_on_map(m));
}
@@ -393,14 +410,24 @@
char buf[MEDIUM_BUF];
if (!ref)
+ {
sprintf(buf, "~Map %d~: ", list);
+ }
else
+ {
sprintf(buf, "~%s Map~: ", ref);
+ }
- if ((len = strlen(m->path)) >= 16)
- sprintf(strchr(buf, '\0'), "...%s", m->path + (len - 1 - 12));
+ if (m->path &&
+ (len = strlen(m->path)) >= 16)
+ {
+ sprintf(strchr(buf, '\0'), "...%s",
+ STRING_MAP_PATH(m) + (len - 1 - 12));
+ }
else
- sprintf(strchr(buf, '\0'), "%s", m->path);
+ {
+ sprintf(strchr(buf, '\0'), "%s", STRING_MAP_PATH(m));
+ }
sprintf(strchr(buf, '\0'), ": %s",
((MAP_MULTI(m)) ? "M" :
@@ -409,7 +436,7 @@
sprintf(strchr(buf, '\0'), ", %d", MAP_DIFFICULTY(m));
sprintf(strchr(buf, '\0'), ", %d/%d/%d",
m->tileset_id, m->tileset_x, m->tileset_y);
- sprintf(strchr(buf, '\0'), ", %s", show_map_flags(m));
+ sprintf(strchr(buf, '\0'), ", %s", ShowMapFlags(m));
sprintf(strchr(buf, '\0'), ", @%d", players_on_map(m));
NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "%s", buf);
}
@@ -462,16 +489,78 @@
#endif
}
+static char *ShowMapFlags(mapstruct *m)
+{
+ static char buf[12];
+
+ buf[0] = '\0';
+
+ if (MAP_FIXED_RESETTIME(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", 'R');
+ }
+
+ if (MAP_NOSAVE(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", '$');
+ }
+
+ if (MAP_NOMAGIC(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", '\\');
+ }
+
+ if (MAP_NOPRIEST(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", '/');
+ }
+
+ if (MAP_NOHARM(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", 'X');
+ }
+
+ if (MAP_NOSUMMON(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", '#');
+ }
+
+ if (MAP_FIXEDLOGIN(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", 'L');
+ }
+
+ if (MAP_PERMDEATH(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", '_');
+ }
+
+ if (MAP_ULTRADEATH(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", '-');
+ }
+
+ if (MAP_ULTIMATEDEATH(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", '=');
+ }
+
+ if (MAP_PVP(m))
+ {
+ sprintf(strchr(buf, '\0'), "%c", '!');
+ }
+
+ return buf;
+}
+
/* Dumps the msp info of m, x, y to the server log and, if pl is non-NULL,
* prints this info to the client as well. */
void dump_msp(mapstruct *m, int x, int y, player *pl)
{
- object *ob;
+ object *ob = (pl) ? pl->ob : NULL;
char buf[MEDIUM_BUF];
int flags;
- ob = (pl) ? pl->ob : NULL;
-
/* Dump the light value. */
NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Light value~: %d (plus map light value of %d)",
GET_MAP_LIGHT_VALUE(m, x, y), MAP_LIGHT_VALUE(m));
@@ -481,70 +570,114 @@
flags = GET_MAP_FLAGS(m, x, y);
if ((flags & P_IS_PLAYER))
+ {
sprintf(strchr(buf, '\0'), "%c", '@');
+ }
if ((flags & P_OUT_OF_MAP))
+ {
sprintf(strchr(buf, '\0'), "%c", '#');
+ }
if ((flags & P_PLAYER_ONLY))
+ {
sprintf(strchr(buf, '\0'), "%c", 'O');
+ }
if ((flags & P_IS_PVP))
+ {
sprintf(strchr(buf, '\0'), "%c", '!');
+ }
if ((flags & P_IS_ALIVE))
+ {
sprintf(strchr(buf, '\0'), "%c", '*');
+ }
if ((flags & P_IS_PLAYER_PET))
+ {
sprintf(strchr(buf, '\0'), "%c", 'd');
+ }
if ((flags & P_BLOCKSVIEW))
+ {
sprintf(strchr(buf, '\0'), "%c", 'x');
+ }
if ((flags & P_NO_PASS))
+ {
sprintf(strchr(buf, '\0'), "%c", 'X');
+ }
if ((flags & P_PASS_THRU))
+ {
sprintf(strchr(buf, '\0'), "%c", '-');
+ }
if ((flags & P_PASS_ETHEREAL))
+ {
sprintf(strchr(buf, '\0'), "%c", '=');
+ }
if ((flags & P_DOOR_CLOSED))
+ {
sprintf(strchr(buf, '\0'), "%c", '+');
+ }
if ((flags & P_NO_MAGIC))
+ {
sprintf(strchr(buf, '\0'), "%c", '\\');
+ }
if ((flags & P_NO_CLERIC))
+ {
sprintf(strchr(buf, '\0'), "%c", '/');
+ }
if ((flags & P_WALK_ON))
+ {
sprintf(strchr(buf, '\0'), "%c", '>');
+ }
if ((flags & P_WALK_OFF))
+ {
sprintf(strchr(buf, '\0'), "%c", '<');
+ }
if ((flags & P_FLY_ON))
+ {
sprintf(strchr(buf, '\0'), "%c", '}');
+ }
if ((flags & P_FLY_OFF))
+ {
sprintf(strchr(buf, '\0'), "%c", '{');
+ }
if ((flags & P_REFL_MISSILE))
+ {
sprintf(strchr(buf, '\0'), "%c", ')');
+ }
if ((flags & P_REFL_SPELLS))
+ {
sprintf(strchr(buf, '\0'), "%c", '(');
+ }
if ((flags & P_MAGIC_EAR))
+ {
sprintf(strchr(buf, '\0'), "%c", '?');
+ }
if ((flags & P_CHECK_INV))
+ {
sprintf(strchr(buf, '\0'), "%c", '_');
+ }
if ((flags & P_PLAYER_GRAVE))
+ {
sprintf(strchr(buf, '\0'), "%c", '%');
+ }
NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Flags~: %s", buf);
@@ -592,51 +725,47 @@
}
if (flags)
+ {
sprintf(strchr(buf, '\0'), " ~+~ ");
+ }
}
NDI_LOG(llevSystem, NDI_UNIQUE, 0, ob, "~Terrain~: %s", buf);
}
-/* set_map_darkness() sets m->darkness to 0 <= value <= MAX_DARKNESS and
- * m->light_value to global_darkness_table[value]. */
-void set_map_darkness(mapstruct *m, int value)
+/* Allocates, initialises, and returns a pointer to a mapstruct.
+ * Modified to no longer take a path option which was not being
+ * used anyways. MSW 2001-07-01 */
+static mapstruct *GetLinkedMap(void)
{
- if (value < 0 || value > MAX_DARKNESS)
- value = MAX_DARKNESS;
+ /* Tag counter for the memory/weakref system. Uniquely identifies this
+ * instance of the map in memory. Not the same as the
+ * map_tag/global_map_tag. */
+ static tag_t gID = 0;
+ mapstruct *map = get_poolchunk(pool_map);
- MAP_DARKNESS(m) = (sint32)value;
- MAP_LIGHT_VALUE(m) = (sint32)global_darkness_table[value];
-}
+ if (!map)
+ {
+ LOG(llevError, "ERROR:: %s/GetLinkedMap(): OOM!\n", __FILE__);
-/*
- * Allocates, initialises, and returns a pointer to a mapstruct.
- * Modified to no longer take a path option which was not being
- * used anyways. MSW 2001-07-01
- */
-
-mapstruct * get_linked_map()
-{
- mapstruct *map = get_poolchunk(pool_map);
-
- if (map == NULL) {
- LOG(llevError, "ERROR: get_linked_map(): OOM.\n");
return NULL;
}
memset(map, 0, sizeof(mapstruct));
- map->tag = ++global_map_id;
+ map->tag = ++gID;
/* lifo queue */
- if(first_map)
+ if (first_map)
+ {
first_map->last = map;
+ }
+
map->next = first_map;
first_map = map;
+ map->in_memory = MAP_SWAPPED;
- map->in_memory = MAP_SWAPPED;
/* The maps used to pick up default x and y values from the
- * map archetype. Mimic that behaviour.
- */
+ * map archetype. Mimic that behaviour. */
MAP_WIDTH(map) = MAP_DEFAULT_WIDTH;
MAP_HEIGHT(map) = MAP_DEFAULT_HEIGHT;
MAP_WHEN_RESET(map) = MAP_DEFAULT_RESET_TIME;
@@ -649,18 +778,18 @@
/* We insert a dummy sentinel first in the activelist. This simplifies
* work later */
map->active_objects = get_object();
- insert_ob_in_ob(map->active_objects, &void_container); /* Avoid gc of the sentinel object */
+ FREE_AND_COPY_HASH(map->active_objects->name, "<map activelist sentinel>");
+ /* Avoid gc of the sentinel object */
+ insert_ob_in_ob(map->active_objects, &void_container);
+
return map;
}
-/*
- * Allocates the arrays contained in a mapstruct.
+/* Allocates the arrays contained in a mapstruct.
* This basically allocates the dynamic array of spaces for the
- * map.
- */
-
-void allocate_map(mapstruct *m)
+ * map. */
+static void AllocateMap(mapstruct *m)
{
#if 0
/* These are obnoxious - presumably the caller of this function knows what it is
@@ -668,598 +797,75 @@
* if the data has already been allocated.
*/
if(m->in_memory != MAP_SWAPPED )
- return;
+ return;
#endif
+
m->in_memory = MAP_LOADING;
+
/* Log this condition and free the storage. We could I suppose
* realloc, but if the caller is presuming the data will be intact,
* that is their poor assumption.
*/
- if (m->spaces || m->bitmap)
+ if (m->spaces ||
+ m->bitmap)
{
- LOG(llevError, "ERROR: allocate_map callled with already allocated map (%s)\n", m->path);
+ LOG(llevBug, "\nBUG:: %s/AllocateMap(): >%s< already allocated!\n",
+ __FILE__, STRING_MAP_PATH(m));
+
if (m->spaces)
- free(m->spaces);
- if (m->bitmap)
- free(m->bitmap);
- }
- if (m->buttons)
- {
- LOG(llevBug, "Bug: allocate_map callled with allready set buttons (%s)\n", m->path);
- }
-
- m->spaces = calloc(1, MAP_WIDTH(m) * MAP_HEIGHT(m) * sizeof(MapSpace));
-
- m->bitmap = malloc(((MAP_WIDTH(m) + 31) / 32) * MAP_HEIGHT(m) * sizeof(uint32));
-
- if (m->spaces == NULL || m->bitmap == NULL)
- LOG(llevError, "ERROR: allocate_map(): OOM.\n");
-}
-
-/* Creatures and returns a map of the specific size. Used
- * in random map code and the editor.
- */
-mapstruct * get_empty_map(int sizex, int sizey)
-{
- mapstruct *m = get_linked_map();
- if(! m)
- return NULL;
- m->width = sizex;
- m->height = sizey;
- m->in_memory = MAP_SWAPPED;
- allocate_map(m);
- return m;
-}
-
-/* This loads the header information of the map. The header
- * contains things like difficulty, size, timeout, etc.
- * this used to be stored in the map object, but with the
- * addition of tiling, fields beyond that easily named in an
- * object structure were needed, so it just made sense to
- * put all the stuff in the map object so that names actually make
- * sense.
- * This could be done in lex (like the object loader), but I think
- * currently, there are few enough fields this is not a big deal.
- * MSW 2001-07-01
- * NOTE: load_map_header will setup map_status dynamically when flags
- * has not a valid MAP_STATUS_FLAG()
- * return 0 on success, 1 on failure.
- */
-static int load_map_header(FILE *fp, mapstruct *m, int flags)
-{
- char buf[HUGE_BUF], msgbuf[HUGE_BUF], *key = buf, *value, *end;
- int msgpos = 0;
- int got_end = 0;
-
- while (fgets(buf, HUGE_BUF - 1, fp) != NULL)
- {
- buf[HUGE_BUF - 1] = 0;
- key = buf;
- while (isspace(*key))
- key++;
- if (*key == 0)
- continue; /* empty line */
- value = strchr(key, ' ');
- if (!value)
{
- end = key + (strlen(key) - 1);
- while (isspace(*end))
- --end;
- *++end = 0;
+ FREE(m->spaces);
}
- else
- {
- *value = 0;
- value++;
- while (isspace(*value))
- value++;
- end = value + (strlen(value) - 1);
- while (isspace(*end))
- --end;
- if (*++end != '\0')
- {
- *end = '\n';
- end[1] = '\0';
- }
- }
- /* key is the field name, value is what it should be set
- * to. We've already done the work to null terminate key,
- * and strip off any leading spaces for both of these.
- * We have not touched the newline at the end of the line -
- * these are needed for some values. the end pointer
- * points to the first of the newlines.
- * value could be NULL! It would be easy enough to just point
- * this to "" to prevent cores, but that would let more errors slide
- * through.
- */
-
- if (!strcmp(key, "arch"))
+ if (m->bitmap)
{
- /* This is an oddity, but not something we care about much. */
- /*if (strcmp(value, "map\n"))
- LOG(llevError, "ERROR: loading map and got a non 'arch map' line(%s %s)?\n", key, value);
- */
+ FREE(m->bitmap);
}
- else if (!strcmp(key, "name"))
- {
- *end = 0;
- FREE_AND_COPY_HASH(m->name, value);
- }
- else if (!strcmp(key,"background_music"))
- {
- *end = 0;
- FREE_AND_COPY_HASH(m->music, value);
- }
- else if (!strcmp(key, "msg"))
- {
- msgbuf[0] = '\0';
-
- while (fgets(buf, HUGE_BUF - 1, fp) != NULL)
- {
- if (!strcmp(buf, "endmsg\n"))
- break;
- else
- {
-#if 0 // SIGSEGVs
- /* slightly more efficient than strcat */
- strcpy(msgbuf + msgpos, buf);
- msgpos += strlen(buf);
-#else
- /* TODO: Use snprintf to not risk buffer overflow. */
- sprintf(strchr(msgbuf, '\0'), "%s", buf);
-#endif
- }
- }
-
- /* There are lots of maps that have empty messages (eg, msg/endmsg
- * with nothing between). There is no reason in those cases to
- * keep the empty message. Also, msgbuf contains garbage data
- * when msgpos is zero, so copying it results in crashes
- */
- if (msgbuf[0])
- {
- FREE_AND_COPY_HASH(m->msg, msgbuf);
- }
- }
- /* enter_x is the default x (west-east) entry point. */
- else if (!strcmp(key, "enter_x"))
- {
- int v = atoi(value);
-
- m->enter_x = v;
- }
- /* enter_y is the default y (north-south) entry point. */
- else if (!strcmp(key, "enter_y"))
- {
- int v = atoi(value);
-
- m->enter_y = v;
- }
- /* width is the total number of x (west-east) squares. There is a
- * default which should be stuck to and any deviation on a testserver
- * will produce a debug warning. However this is not enforced and once
- * the map gets to a non-testserver the non-standard width is assumed
- * to be intentional so no warning is given. */
- else if (!strcmp(key, "width"))
- {
- int v = atoi(value);
-
-#ifdef DAI_DEVELOPMENT_CONTENT
- if (v != MAP_DEFAULT_WIDTH)
- LOG(llevDebug, "DEBUG:: Non-standard map width %d (should be %d)!\n",
- v, MAP_DEFAULT_WIDTH);
-#endif
-
- m->width = v;
- }
- /* height is the total number of y (north-south) squares. There is a
- * default which should be stuck to and any deviation on a testserver
- * will produce a debug warning. However this is not enforced and once
- * the map gets to a non-testserver the non-standard height is assumed
- * to be intentional so no warning is given. */
- else if (!strcmp(key, "height"))
- {
- int v = atoi(value);
-
-#ifdef DAI_DEVELOPMENT_CONTENT
- if (v != MAP_DEFAULT_HEIGHT)
- LOG(llevDebug, "DEBUG:: Non-standard map height %d (should be %d)!\n",
- v, MAP_DEFAULT_HEIGHT);
-#endif
-
- m->height = v;
- }
- else if (!strcmp(key, "reset_timeout"))
- {
- int v = atoi(value);
-
-#ifdef MAP_RESET
-#ifdef MAP_MAXRESET
- if (v < 0 || v > MAP_MAXRESET)
- {
- /* Don't log temp maps. */
- if (!m->tmpname)
- {
- LOG(llevMapbug, "MAPBUG:: '%s': Illegal map reset time %d (must be 0 to %d, defaulting to %d)!\n",
- m->orig_path, v, MAP_MAXRESET, MAP_DEFAULT_RESET_TIME);
- }
- }
-#else // ifdef MAP_MAXRESET
- if (v < 0)
- {
- /* Don't log temp maps. */
- if (!m->tmpname)
- {
- LOG(llevMapbug, "MAPBUG:: '%s': Illegal map reset time %d (must be positive, defaulting to %d)!\n",
- m->orig_path, v, MAP_DEFAULT_RESET_TIME);
- }
- }
-#endif // ifdef MAP_MAXRESET
- else
-#endif // ifddef MAP_RESET
- {
- m->reset_time = v;
- m->reset_timeout = v;
- }
- }
- else if (!strcmp(key, "swap_time"))
- {
- int v = atoi(value);
-
- if (v < MAP_MINTIMEOUT || v > MAP_MAXTIMEOUT)
- {
- /* Don't log temp maps. */
- if (!m->tmpname)
- {
- LOG(llevMapbug, "MAPBUG:: '%s': Illegal map swap time %d (must be %d to %d, defaulting to %d)!\n",
- m->orig_path, v, MAP_MINTIMEOUT, MAP_MAXTIMEOUT, MAP_DEFAULT_SWAP_TIME);
- }
- }
- else
- {
- m->swap_time = v;
- m->timeout = v;
- }
- }
- /* difficulty is a 'recommended player level' for that map *for a
- * single player*, so follows the same restriction (1 to MAXLEVEL). It
- * is used in a number of situations to autogenerate treasure and
- * autocalculate monster stats and environment damage. The default is
- * 1. */
- else if (!strcmp(key, "difficulty"))
- {
- int v = atoi(value);
-
- if (v < 1 || v > MAXLEVEL)
- LOG(llevBug, "BUG:: Ilegal map difficulty %d (must be 1 to %d, defaulting to 1)!\n",
- v, MAXLEVEL);
- else
- m->difficulty = v;
- }
- /* darkness is a 'coarse' way to set a map's ambient light levels. As a
- * special case, darkness can be -1 which means full daylight (ie, the
- * mapper does not need to know the value of MAX_DARKNESS and the map
- * will cope if this value ever changes in the server); darkness -1 is
- * *not* the same as outdoor 1 (see below). The default is -1. */
- else if (!strcmp(key, "darkness"))
- {
- int v = atoi(value);
-
- if (v < -1 || v > MAX_DARKNESS)
- {
- LOG(llevBug, "BUG:: Illegal map darkness %d (must be -1 to %d, defaulting to -1)!\n",
- v, MAX_DARKNESS);
- }
- else if (v != MAP_DEFAULT_DARKNESS)
- {
- set_map_darkness(m, v);
- }
- }
- /* light is a 'finer' way to set a map's ambient light levels. Mappers
- * shouldn't explicitly set light as darkness takes care of it. */
- /* TODO: I think perhaps the following else if block should even be
- * removed -- Smacky 20081228 */
- else if (!strcmp(key, "light"))
- {
- int v = atoi(value);
-
- if (v < 0)
- LOG(llevBug, "BUG:: Illegal map light %d (must be positive, defaulting to 0)!\n",
- v);
-
- MAP_LIGHT_VALUE(m) = v;
-
- /* i assume that the default map_flags settings is 0 - so we don't handle <flagset> 0 */
- }
- else if (!strcmp(key, "no_save"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_NO_SAVE;
- }
- else if (!strcmp(key, "no_magic"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_NOMAGIC;
- }
- else if (!strcmp(key, "no_priest"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_NOPRIEST;
- }
- else if (!strcmp(key, "no_harm"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_NOHARM;
- }
- else if (!strcmp(key, "no_summon"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_NOSUMMON;
- }
- else if (!strcmp(key, "fixed_login"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_FIXED_LOGIN;
- }
- else if (!strcmp(key, "perm_death"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_PERMDEATH;
- }
- else if (!strcmp(key, "ultra_death"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_ULTRADEATH;
- }
- else if (!strcmp(key, "ultimate_death"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_ULTIMATEDEATH;
- }
- else if (!strcmp(key, "pvp"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_PVP;
- }
- /* outdoor 1 means the map has variable ambient light over the course of
- * a day, up to a maximum as given in darkness (see above). */
- else if (!strcmp(key, "outdoor"))
- {
- if (atoi(value))
- m->map_flags |= MAP_FLAG_OUTDOOR;
- }
- else if (!strcmp(key, "map_tag"))
- {
- m->map_tag = (uint32) atoi(value);
- }
- else if (!strcmp(key, "unique"))
- {
- if (atoi(value))
- m->map_status |= MAP_STATUS_UNIQUE;
- }
- else if (!strcmp(key, "multi"))
- {
- if (atoi(value))
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|