summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 16:32:37 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 16:32:37 +0000
commit6749d6567aa972b5cc46e1ed85986be21e2ec799 (patch)
tree4d28fd94577ad9183c9341f71fd961931faba416 /src/map/mob.c
parent1e844abc3fa269a504ba6610ac83224d9660ce22 (diff)
downloadhercules-6749d6567aa972b5cc46e1ed85986be21e2ec799.tar.gz
hercules-6749d6567aa972b5cc46e1ed85986be21e2ec799.tar.bz2
hercules-6749d6567aa972b5cc46e1ed85986be21e2ec799.tar.xz
hercules-6749d6567aa972b5cc46e1ed85986be21e2ec799.zip
- 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
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 63b71b941..ead808d70 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1415,7 +1415,7 @@ static struct item_drop* mob_setdropitem(int nameid, int qty)
memset(&drop->item_data, 0, sizeof(struct item));
drop->item_data.nameid = nameid;
drop->item_data.amount = qty;
- drop->item_data.identify = !itemdb_isequip3(nameid);
+ drop->item_data.identify = itemdb_isidentified(nameid);
drop->next = NULL;
return drop;
};
@@ -2043,7 +2043,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
memset(&item,0,sizeof(item));
item.nameid=md->db->mvpitem[i].nameid;
- item.identify=!itemdb_isequip3(item.nameid);
+ item.identify= itemdb_isidentified(item.nameid);
clif_mvp_item(mvp_sd,item.nameid);
log_mvp[0] = item.nameid;
@@ -3278,7 +3278,7 @@ static int mob_readdb(void)
}
else switch (type) // Added suport to restrict normal drops of MVP's [Reddozen]
{
- case 0:
+ case IT_HEALING:
if (status->mode&MD_BOSS)
rate_adjust = battle_config.item_rate_heal_boss;
else
@@ -3286,7 +3286,7 @@ static int mob_readdb(void)
ratemin = battle_config.item_drop_heal_min;
ratemax = battle_config.item_drop_heal_max;
break;
- case 2:
+ case IT_USABLE:
if (status->mode&MD_BOSS)
rate_adjust = battle_config.item_rate_use_boss;
else
@@ -3294,9 +3294,9 @@ static int mob_readdb(void)
ratemin = battle_config.item_drop_use_min;
ratemax = battle_config.item_drop_use_max;
break;
- case 4:
- case 5:
- case 8: // Changed to include Pet Equip
+ case IT_WEAPON:
+ case IT_ARMOR:
+ case IT_PETARMOR: // Changed to include Pet Equip
if (status->mode&MD_BOSS)
rate_adjust = battle_config.item_rate_equip_boss;
else
@@ -3304,7 +3304,7 @@ static int mob_readdb(void)
ratemin = battle_config.item_drop_equip_min;
ratemax = battle_config.item_drop_equip_max;
break;
- case 6:
+ case IT_CARD:
if (status->mode&MD_BOSS)
rate_adjust = battle_config.item_rate_card_boss;
else
@@ -3958,7 +3958,7 @@ static int mob_read_sqldb(void)
}
else switch (type) // Added suport to restrict normal drops of MVP's [Reddozen]
{
- case 0: // Val added heal restrictions
+ case IT_HEALING: // Val added heal restrictions
if (status->mode&MD_BOSS)
rate_adjust = battle_config.item_rate_heal_boss;
else
@@ -3966,7 +3966,7 @@ static int mob_read_sqldb(void)
ratemin = battle_config.item_drop_heal_min;
ratemax = battle_config.item_drop_heal_max;
break;
- case 2:
+ case IT_USABLE:
if (status->mode&MD_BOSS)
rate_adjust = battle_config.item_rate_use_boss;
else
@@ -3974,9 +3974,9 @@ static int mob_read_sqldb(void)
ratemin = battle_config.item_drop_use_min;
ratemax = battle_config.item_drop_use_max;
break;
- case 4:
- case 5:
- case 8: // Changed to include Pet Equip
+ case IT_WEAPON:
+ case IT_ARMOR:
+ case IT_PETEQUIP: // Changed to include Pet Equip
if (status->mode&MD_BOSS)
rate_adjust = battle_config.item_rate_equip_boss;
else
@@ -3984,7 +3984,7 @@ static int mob_read_sqldb(void)
ratemin = battle_config.item_drop_equip_min;
ratemax = battle_config.item_drop_equip_max;
break;
- case 6:
+ case IT_CARD:
if (status->mode&MD_BOSS)
rate_adjust = battle_config.item_rate_card_boss;
else