From 6749d6567aa972b5cc46e1ed85986be21e2ec799 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 11 Jul 2006 16:32:37 +0000 Subject: - Coded @reset. - Reenabled @changesex - Added function pet_create_egg which handles creating pet eggs correctly (when passed item id is indeed a valid petegg). Applied this on @createitem and getitem. - Cleaned up code of @item - Added define UNKNOWN_ITEM_ID (512 = apple) - Added IT_* enumation item_Types to identify said data from items. - Cleaned up the itemdb_isequip functions. itemdb_isequip will now return if the item is equipable by players, itemdb_isstackable returns if the item can be stacked, and itemdb_isidentified returns if the item should drop identified. - Added defines CARD0_PET/CARD0_FORGE/CARD0_CREATED to identify if a given item has "invalid" cards, added define function itemdb_isspecial to simplify this check. - Removed itemdb.c considering item ids above 20000 as invalid. - Cleaned up script commands getitem and card-counting related ones. - Cleaned up a bit more pc_isequip git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7613 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index 164a6c7c2..af9fb74dc 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8595,7 +8595,8 @@ void skill_weaponrefine (struct map_session_data *sd, int idx) if (ep) pc_equipitem(sd,idx,ep); clif_misceffect(&sd->bl,3); - if(item->refine == MAX_REFINE && item->card[0] == 0x00ff && MakeDWord(item->card[2],item->card[3]) == sd->char_id){ // Fame point system [DracoRPG] + if(item->refine == MAX_REFINE && item->card[0] == CARD0_FORGE && + MakeDWord(item->card[2],item->card[3]) == sd->char_id){ // Fame point system [DracoRPG] switch(ditem->wlv){ case 1: pc_addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point @@ -10118,7 +10119,7 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in tmp_item.amount=1; tmp_item.identify=1; if(equip){ - tmp_item.card[0]=0x00ff; + tmp_item.card[0]=CARD0_FORGE; tmp_item.card[1]=((sc*5)<<8)+ele; tmp_item.card[2]=GetWord(sd->char_id,0); // CharId tmp_item.card[3]=GetWord(sd->char_id,1); @@ -10142,7 +10143,7 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in break; } if (flag) { - tmp_item.card[0]=0x00fe; + tmp_item.card[0]=CARD0_CREATE; tmp_item.card[1]=0; tmp_item.card[2]=GetWord(sd->char_id,0); // CharId tmp_item.card[3]=GetWord(sd->char_id,1); @@ -10286,7 +10287,7 @@ int skill_arrow_create (struct map_session_data *sd, int nameid) tmp_item.nameid = skill_arrow_db[index].cre_id[i]; tmp_item.amount = skill_arrow_db[index].cre_amount[i]; if(battle_config.making_arrow_name_input) { - tmp_item.card[0]=0x00fe; + tmp_item.card[0]=CARD0_CREATE; tmp_item.card[1]=0; tmp_item.card[2]=GetWord(sd->char_id,0); // CharId tmp_item.card[3]=GetWord(sd->char_id,1); -- cgit v1.2.3-60-g2f50