summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-09 15:12:53 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-09 15:12:53 +0000
commit6bd0769c68ca86c5454a360f46d0facbbc75cfe5 (patch)
tree91bffd583777704b9ebb1d00e2831ea2faed59eb /src/map
parent8711b3099048ccacaa84f52fef06e4c6ded4aa4b (diff)
downloadhercules-6bd0769c68ca86c5454a360f46d0facbbc75cfe5.tar.gz
hercules-6bd0769c68ca86c5454a360f46d0facbbc75cfe5.tar.bz2
hercules-6bd0769c68ca86c5454a360f46d0facbbc75cfe5.tar.xz
hercules-6bd0769c68ca86c5454a360f46d0facbbc75cfe5.zip
- Fixed @mapinfo displaying incorrectly maps with nosave which send you back to your last savepoint.
- Moved guild_exp_rate from a mapserver battle config setting to a char server config. It no longer modifies the total taxed exp as seen on the guild information window, but directly modifies the exp that the guild earns. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7074 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c4
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/guild.c27
4 files changed, 11 insertions, 23 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 5f5b61370..0b9a0808f 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -5696,7 +5696,9 @@ int atcommand_mapinfo(
clif_displaymessage(fd, atcmd_output);
if (map[m_id].flag.nosave) {
- if (map[m_id].save.x == -1 || map[m_id].save.y == -1 )
+ if (!map[m_id].save.map)
+ sprintf(atcmd_output, "No Save (Return to last Save Point)");
+ else if (map[m_id].save.x == -1 || map[m_id].save.y == -1 )
sprintf(atcmd_output, "No Save, Save Point: %s,Random",mapindex_id2name(map[m_id].save.map));
else
sprintf(atcmd_output, "No Save, Save Point: %s,%d,%d",
diff --git a/src/map/battle.c b/src/map/battle.c
index 487c65c14..c9245e7fa 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3326,7 +3326,6 @@ static const struct battle_data_short {
{ "quest_skill_reset", &battle_config.quest_skill_reset },
{ "basic_skill_check", &battle_config.basic_skill_check },
{ "guild_emperium_check", &battle_config.guild_emperium_check },
- { "guild_exp_rate", &battle_config.guild_exp_rate },
{ "guild_exp_limit", &battle_config.guild_exp_limit },
{ "player_invincible_time", &battle_config.pc_invincible_time },
{ "pet_catch_rate", &battle_config.pet_catch_rate },
@@ -3721,7 +3720,6 @@ void battle_set_defaults() {
battle_config.basic_skill_check=1;
battle_config.guild_emperium_check=1;
battle_config.guild_exp_limit=50;
- battle_config.guild_exp_rate=100;
battle_config.pc_invincible_time = 5000;
battle_config.pet_catch_rate=100;
battle_config.pet_rename=0;
diff --git a/src/map/battle.h b/src/map/battle.h
index 4980ecceb..8cbc15031 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -165,7 +165,6 @@ extern struct Battle_Config {
unsigned short quest_skill_reset;
unsigned short basic_skill_check;
unsigned short guild_emperium_check;
- unsigned short guild_exp_rate; //[Skotlex]
unsigned short guild_exp_limit;
unsigned short guild_max_castles;
unsigned short pc_invincible_time;
diff --git a/src/map/guild.c b/src/map/guild.c
index bef4f0c31..8e4a16901 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1141,8 +1141,6 @@ unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp)
struct guild *g;
struct guild_expcache *c;
int per;
- unsigned int exp2;
- double tmp;
nullpo_retr(0, sd);
@@ -1150,32 +1148,23 @@ unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp)
if (sd->status.guild_id == 0 ||
(g = guild_search(sd->status.guild_id)) == NULL ||
- (per = g->position[guild_getposition(sd,g)].exp_mode) <= 0)
+ (per = guild_getposition(sd,g)) < 0 ||
+ (per = g->position[per].exp_mode) < 1)
return 0;
- if (per > 100) per = 100;
- else
- if (per < 1) return 0;
-
-
- tmp = exp * per / 100;
- if (tmp <= 0)
- return 0;
-
- exp2 = (unsigned int)tmp;
+ if (per < 100)
+ exp = (unsigned int) exp * per / 100;
+ //Otherwise tax everything.
- if (battle_config.guild_exp_rate != 100)
- tmp = tmp*battle_config.guild_exp_rate/100;
-
c = guild_expcache_db->ensure(guild_expcache_db, i2key(sd->status.char_id), create_expcache, sd);
- if (c->exp > UINT_MAX - (unsigned int)tmp)
+ if (c->exp > UINT_MAX - exp)
c->exp = UINT_MAX;
else
- c->exp += (unsigned int)tmp;
+ c->exp += exp;
- return exp2;
+ return exp;
}
// Celest