summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshinomori <shinomori@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-23 10:58:04 +0000
committershinomori <shinomori@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-23 10:58:04 +0000
commit8f76148e09a0927ca15abc7126b98baa4f41b1dd (patch)
tree9828af97db8a3a549ab5723b7def710e47bcde32
parent80b00a7c1c9c01d6fed95d2ced96c1ac715da26d (diff)
downloadhercules-8f76148e09a0927ca15abc7126b98baa4f41b1dd.tar.gz
hercules-8f76148e09a0927ca15abc7126b98baa4f41b1dd.tar.bz2
hercules-8f76148e09a0927ca15abc7126b98baa4f41b1dd.tar.xz
hercules-8f76148e09a0927ca15abc7126b98baa4f41b1dd.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6239 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--src/map/map.c6
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/mob.c20
-rw-r--r--src/map/npc.c9
5 files changed, 37 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 331d075a8..3e441bef7 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -2,7 +2,10 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
-
+2006/04/23
+ * additional experience multiplicator as mapflags which is based off battle.conf
+ so with battle.conf rates 200 and "mapflag <jexp/bexp> 200" it will be 4x
+ on this specific map and 2x anywhere else [Jbain]
2006/04/22
* Angelus was giving more bonus than it should. Fixed. [Zido]
* Added Option constants for Carts, fixed OPTION_FLYING (it conflicts with
diff --git a/src/map/map.c b/src/map/map.c
index f3106668e..507c36b1c 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3057,7 +3057,11 @@ int map_readallmaps (void)
map[i].bxs = (map[i].xs + BLOCK_SIZE - 1) / BLOCK_SIZE;
map[i].bys = (map[i].ys + BLOCK_SIZE - 1) / BLOCK_SIZE;
-
+
+ // default experience multiplicator
+ map[i].jexp = 100;
+ map[i].bexp = 100;
+
size = map[i].bxs * map[i].bys * sizeof(struct block_list*);
map[i].block = (struct block_list**)aCalloc(size, 1);
map[i].block_mob = (struct block_list**)aCalloc(size, 1);
diff --git a/src/map/map.h b/src/map/map.h
index 525b7dc5e..ff1fe27c2 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1067,6 +1067,8 @@ struct map_data {
struct spawn_data *moblist[MAX_MOB_LIST_PER_MAP]; // [Wizputer]
int mob_delete_timer; // [Skotlex]
int zone; // [Komurka]
+ int jexp; // map experience multiplicator
+ int bexp; // map experience multiplicator
};
struct map_data_other_server {
diff --git a/src/map/mob.c b/src/map/mob.c
index 55faf7ca1..9aa611c57 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1861,13 +1861,29 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
else
job_exp = (unsigned int)(job_exp*per);
- //mapflags: noexp check [Lorky]
+/* //mapflags: noexp check [Lorky]
if (map[md->bl.m].flag.nobaseexp == 1) base_exp=0;
else if (base_exp < 1) base_exp = 1;
if (map[md->bl.m].flag.nojobexp == 1) job_exp=0;
else if (job_exp < 1) job_exp = 1;
-
+*/
+ if (map[md->bl.m].flag.nobaseexp == 1)
+ base_exp=0;
+ else if (base_exp < 1)
+ base_exp = (map[md->bl.m].bexp<=100) ? 1 : map[md->bl.m].bexp/100;
+ else if ( map[md->bl.m].bexp != 100 )
+ base_exp=(int)((double)base_exp*((double)map[md->bl.m].bexp/100.0));
+
+ if (map[md->bl.m].flag.nojobexp == 1)
+ job_exp=0;
+ else if (job_exp < 1)
+ job_exp = (map[md->bl.m].jexp<=100) ? 1 : map[md->bl.m].jexp/100;
+ else if ( map[md->bl.m].bexp != 100 )
+ job_exp=(int)((double)job_exp*((double)map[md->bl.m].jexp/100.0));
+
+
+
//end added Lorky
if((pid=tmpsd[i]->status.party_id)>0){ // パーティに入っている
int j;
diff --git a/src/map/npc.c b/src/map/npc.c
index bd83131ed..038c2804c 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2412,7 +2412,14 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
map[m].zone = 0;
}
}
-
+ else if (strcmpi(w3,"jexp")==0) {
+ map[m].jexp = (state) ? atoi(w4) : 100;
+ if( map[m].jexp < 0 ) map[m].jexp = 100;
+ }
+ else if (strcmpi(w3,"bexp")==0) {
+ map[m].bexp = (state) ? atoi(w4) : 100;
+ if( map[m].bexp < 0 ) map[m].bexp = 100;
+ }
return 0;
}