Jump to content
  • 0
Break San

remove discounts

Question

11 answers to this question

Recommended Posts

  • 0

two places:

 

npc.c

	// custom merchant shop exp bonus	if( battle_config.shop_exp > 0 && z > 0 && (skill_t = pc->checkskill2(sd,idx)) > 0 ) {		if( sd->status.skill[idx].flag >= SKILL_FLAG_REPLACED_LV_0 )			skill_t = sd->status.skill[idx].flag - SKILL_FLAG_REPLACED_LV_0;				if( skill_t > 0 ) {			z = z * (double)skill_t * (double)battle_config.shop_exp/10000.;			if( z < 1 )				z = 1;			pc->gainexp(sd,NULL,0,(int)z, false);		}	}

 

pc.c

 

int pc_modifybuyvalue(struct map_session_data *sd,int orig_value) {	int skill_lv,val = orig_value,rate1 = 0,rate2 = 0;	if((skill_lv=pc->checkskill(sd,MC_DISCOUNT))>0)   // merchant discount		rate1 = 5+skill_lv*2-((skill_lv==10)? 1:0);	if((skill_lv=pc->checkskill(sd,RG_COMPULSION))>0) // rogue discount		rate2 = 5+skill_lv*4;	if(rate1 < rate2) rate1 = rate2;	if(rate1)		val = (int)((double)orig_value*(double)(100-rate1)/100.);	if(val < 0) val = 0;	if(orig_value > 0 && val < 1) val = 1;	return val;}

Share this post


Link to post
Share on other sites
  • 0

 

two places:

 

npc.c

	// custom merchant shop exp bonus	if( battle_config.shop_exp > 0 && z > 0 && (skill_t = pc->checkskill2(sd,idx)) > 0 ) {		if( sd->status.skill[idx].flag >= SKILL_FLAG_REPLACED_LV_0 )			skill_t = sd->status.skill[idx].flag - SKILL_FLAG_REPLACED_LV_0;				if( skill_t > 0 ) {			z = z * (double)skill_t * (double)battle_config.shop_exp/10000.;			if( z < 1 )				z = 1;			pc->gainexp(sd,NULL,0,(int)z, false);		}	}

 

pc.c

 

int pc_modifybuyvalue(struct map_session_data *sd,int orig_value) {	int skill_lv,val = orig_value,rate1 = 0,rate2 = 0;	if((skill_lv=pc->checkskill(sd,MC_DISCOUNT))>0)   // merchant discount		rate1 = 5+skill_lv*2-((skill_lv==10)? 1:0);	if((skill_lv=pc->checkskill(sd,RG_COMPULSION))>0) // rogue discount		rate2 = 5+skill_lv*4;	if(rate1 < rate2) rate1 = rate2;	if(rate1)		val = (int)((double)orig_value*(double)(100-rate1)/100.);	if(val < 0) val = 0;	if(orig_value > 0 && val < 1) val = 1;	return val;}

 

 

remove or add?

Share this post


Link to post
Share on other sites
  • 0

 

disable skill MC_DISCOUNT and RG_COMPULSION from skill_db

 

:meow:

 

 

// put in front did not solve

first of all restart server and reset all players that has it..

 

:meow:

Share this post


Link to post
Share on other sites
  • 0

 

 

disable skill MC_DISCOUNT and RG_COMPULSION from skill_db

 

:meow:

 

 

// put in front did not solve

first of all restart server and reset all players that has it..

 

:meow:

 

the market disappeared off the look, plus the price is still decreasing.

 

 

evilpuncker

 

npc.c: In function ‘npc_buylist’:npc.c:1757: warning: unused variable ‘idx’npc.c:1757: warning: unused variable ‘skill_t’        CC      npc_chat.c        CC      party.c        CC      path.c        CC      pc.cpc.c: In function ‘pc_defaults’:pc.c:10802: error: ‘pc_modifybuyvalue’ undeclared (first use in this function)pc.c:10802: error: (Each undeclared identifier is reported only oncepc.c:10802: error: for each function it appears in.)make[1]: *** [obj_sql/pc.o] Error 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.