summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 018ceae01..eb3f33ac5 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1106,7 +1106,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
if (sd->status.skill[MC_DISCOUNT].flag != 0)
skill = sd->status.skill[MC_DISCOUNT].flag - 2;
if (skill > 0) {
- z = z * (double)skill * (double)battle_config.shop_exp/100.;
+ z = z * (double)skill * (double)battle_config.shop_exp/10000.;
if (z < 1)
z = 1;
pc_gainexp(sd,0,(int)z);
@@ -1166,7 +1166,7 @@ int npc_selllist(struct map_session_data *sd,int n,unsigned short *item_list)
if (sd->status.skill[MC_OVERCHARGE].flag != 0)
skill = sd->status.skill[MC_OVERCHARGE].flag - 2;
if (skill > 0) {
- z = z * (double)skill * (double)battle_config.shop_exp/100.;
+ z = z * (double)skill * (double)battle_config.shop_exp/10000.;
if (z < 1)
z = 1;
pc_gainexp(sd,0,(int)z);
@@ -2094,16 +2094,13 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4)
md->bl.x=x;
md->bl.y=y;
- if(sscanf(w3,"%[^,],%d",mobname,&level) > 1) {
- if(strcmp(mobname,"--en--")==0)
- memcpy(md->name,mob_db[class_].name,24);
- else if(strcmp(mobname,"--ja--")==0)
- memcpy(md->name,mob_db[class_].jname,24);
+ if(sscanf(w3,"%[^,],%d",mobname,&level) > 1)
md->level=level;
- }
-
- else
- memcpy(md->name,w3,24);
+ if(strcmp(mobname,"--en--")==0)
+ memcpy(md->name,mob_db[class_].name,24);
+ else if(strcmp(mobname,"--ja--")==0)
+ memcpy(md->name,mob_db[class_].jname,24);
+ else memcpy(md->name,mobname,24);
md->n = i;
md->base_class = md->class_ = class_;