diff options
author | shinomori <shinomori@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-23 10:58:04 +0000 |
---|---|---|
committer | shinomori <shinomori@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-23 10:58:04 +0000 |
commit | 8f76148e09a0927ca15abc7126b98baa4f41b1dd (patch) | |
tree | 9828af97db8a3a549ab5723b7def710e47bcde32 /src/map | |
parent | 80b00a7c1c9c01d6fed95d2ced96c1ac715da26d (diff) | |
download | hercules-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
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/map.c | 6 | ||||
-rw-r--r-- | src/map/map.h | 2 | ||||
-rw-r--r-- | src/map/mob.c | 20 | ||||
-rw-r--r-- | src/map/npc.c | 9 |
4 files changed, 33 insertions, 4 deletions
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;
}
|