Hi
Currently I am using 16084 revision. I am not upgrading my current version because its quite stable in our end. Players enjoy playing smoothly. Now I merged BUILDIN_FUNC(downrefitem) to my current svn but it says "equip" is undeclared. If anyone have an idea what part did I missed.
Here is the code I manually put in.
../src/map/script.c
BUILDIN_DEF(downrefitem,"i"),
/*==========================================
* Downgrades an Equipment Part by -1 . [Masao]
*------------------------------------------*/
BUILDIN_FUNC(downrefitem)
{
int i = -1,num,ep;
TBL_PC *sd;
num = script_getnum(st,2);
sd = script_rid2sd(st);
if( sd == NULL )
return 0;
if (num > 0 && num <= ARRAYLENGTH(equip))
i = pc_checkequip(sd,equip[num-1]);
if(i >= 0) {
ep = sd->status.inventory[i].equip;
//Logs items, got from (N)PC scripts [Lupus]
log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i]);
sd->status.inventory[i].refine++;
pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below
clif_refine(sd->fd,2,i,sd->status.inventory[i].refine = sd->status.inventory[i].refine - 2);
clif_delitem(sd,i,1,3);
//Logs items, got from (N)PC scripts [Lupus]
log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]);
clif_additem(sd,i,1,0);
pc_equipitem(sd,i,ep);
clif_misceffect(&sd->bl,2);
}
return 0;
}
I just want to know what part is missing.