I was looking to see if it'd be possible to add in a custom weapon level "5" for some custom weapons on my server. From what I have done below, I tested by changing the weapon level of Angra Manyu to 5. After getting an enriched oridecon, it appeared in the refinement window on my whitesmith. However, when clicked, it did nothing.
So far I have done the following in my source code, noted with the comment starting with "// Custom":
Here's the snippet from the clif.c file
/// Presents a list of weapon items that can be refined [Taken from jAthena] (ZC_NOTIFY_WEAPONITEMLIST).
/// 0221 <packet len>.W { <index>.W <name id>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }*
void clif_item_refine_list(struct map_session_data *sd)
{
int i,c;
int fd;
int skilllv;
int wlv;
int refine_item[6]; // Custom -- Increased from "int refine_item[5];
nullpo_retv(sd);
skilllv = pc_checkskill(sd,WS_WEAPONREFINE);
fd=sd->fd;
refine_item[0] = -1;
refine_item[1] = pc_search_inventory(sd,1010);
refine_item[2] = pc_search_inventory(sd,1011);
refine_item[3] = refine_item[4] = pc_search_inventory(sd,984);
refine_item[5] = pc_search_inventory(sd,7620); // Custom -- Added new line so it uses enriched oridecon
WFIFOHEAD(fd, MAX_INVENTORY * 13 + 4);
WFIFOW(fd,0)=0x221;
for(i=c=0;i<MAX_INVENTORY;i++){
if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].refine < skilllv &&
sd->status.inventory[i].identify && (wlv=itemdb_wlv(sd->status.inventory[i].nameid)) >=1 &&
refine_item[wlv]!=-1 && !(sd->status.inventory[i].equip&EQP_ARMS)){
WFIFOW(fd,c*13+ 4)=i+2;
WFIFOW(fd,c*13+ 6)=sd->status.inventory[i].nameid;
WFIFOB(fd,c*13+ 8)=sd->status.inventory[i].refine;
clif_addcards(WFIFOP(fd,c*13+9), &sd->status.inventory[i]);
c++;
}
}
WFIFOW(fd,2)=c*13+4;
WFIFOSET(fd,WFIFOW(fd,2));
if (c > 0) {
sd->menuskill_id = WS_WEAPONREFINE;
sd->menuskill_val = skilllv;
}
}
Question
Bake Mono
I was looking to see if it'd be possible to add in a custom weapon level "5" for some custom weapons on my server. From what I have done below, I tested by changing the weapon level of Angra Manyu to 5. After getting an enriched oridecon, it appeared in the refinement window on my whitesmith. However, when clicked, it did nothing.
So far I have done the following in my source code, noted with the comment starting with "// Custom":
Here's the snippet from the clif.c file
And this is the refine_db.txt
What else should be done, or what file should I look into?
Edited by Bake MonoLink to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.