diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-03-24 20:36:25 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-03-24 20:36:25 -0400 |
commit | bf400032e3e3699c71cf4dc73a22a230a27cf837 (patch) | |
tree | b60764459abaa4f1c6906f365638f27527416872 /src/map | |
parent | de1506a74746b91e069109f1ba3539944241a8cd (diff) | |
download | tmwa-bf400032e3e3699c71cf4dc73a22a230a27cf837.tar.gz tmwa-bf400032e3e3699c71cf4dc73a22a230a27cf837.tar.bz2 tmwa-bf400032e3e3699c71cf4dc73a22a230a27cf837.tar.xz tmwa-bf400032e3e3699c71cf4dc73a22a230a27cf837.zip |
Add new death penalty type (3) which takes a percentage of the player's zeny
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 8d1066d..e5d7e08 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5929,9 +5929,17 @@ int pc_damage (struct block_list *src, struct map_session_data *sd, (double) sd->status.base_exp * (double) battle_config.death_penalty_base / 10000; } + if (battle_config.death_penalty_type == 3 + && battle_config.death_penalty_base > 0) + sd->status.zeny -= (double) sd->status.zeny * + (double) battle_config.death_penalty_base / 10000; + if (sd->status.base_exp < 0) sd->status.base_exp = 0; + if (sd->status.zeny < 0) + sd->status.zeny = 0; clif_updatestatus (sd, SP_BASEEXP); + clif_updatestatus (sd, SP_ZENY); if (battle_config.death_penalty_type == 1 && battle_config.death_penalty_job > 0) |