Jump to content
  • 0

downrefitem debug?


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

hi guys, can anybody tell me what causes this behavior from the source modification downrefitem?


here's the code i've added to my src.

 /*========================================== * Downgrades an Equipment Part by -1 . [Masao] *------------------------------------------*/BUILDIN_FUNC(downrefitem) {	short i = -1, down = 1;	int pos;	TBL_PC *sd;	sd = script_rid2sd(st);	if( sd == NULL )		return 0;	pos = script_getnum(st,2);	if (script_hasdata(st, 3))		down = script_getnum(st, 3);	if (pos > 0 && pos <= ARRAYLENGTH(equip))		i = pc_checkequip(sd,equip[pos-1]);	if (i >= 0) {		unsigned int ep = sd->status.inventory[i].equip;		//Logs items, got from (N)PC scripts [Lupus]		log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);		pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below		sd->status.inventory[i].refine -= down;		sd->status.inventory[i].refine = cap_value( sd->status.inventory[i].refine, 0, MAX_REFINE);		clif_refine(sd->fd,2,i,sd->status.inventory[i].refine);		clif_delitem(sd,i,1,3);		//Logs items, got from (N)PC scripts [Lupus]		log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);		clif_additem(sd,i,1,0);		pc_equipitem(sd,i,ep);		clif_misceffect(&sd->bl,2);		script_pushint(st, sd->status.inventory[i].refine);		return 1;	}	ShowError("buildin_downrefitem: No item equipped at pos %d (CID=%d/AID=%d).\n", pos, sd->status.char_id, sd->status.account_id);	script_pushint(st, -1);	return 0;}/*==========================================  *  *------------------------------------------*/ BUILDIN_FUNC(statusup)@@ -15157,6 +15202,7 @@ struct script_function buildin_func[] = { 	BUILDIN_DEF(getequippercentrefinery,"i"), 	BUILDIN_DEF(successrefitem,"i"), 	BUILDIN_DEF(failedrefitem,"i"),	BUILDIN_DEF(downrefitem,"i?"), 	BUILDIN_DEF(statusup,"i"), 	BUILDIN_DEF(statusup2,"ii"), 	BUILDIN_DEF(bonus,"iv"),

now, every time i the refine is successful it does nothing. however every time the item refine fails it gives me this debug error. can somebody Please check the source above?

1234.PNG

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

If you're using the default refiner of rA there shouldn't be a problem. Are you using a custom refiner script?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...