summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorreddozen <reddozen@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-02 00:20:17 +0000
committerreddozen <reddozen@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-02 00:20:17 +0000
commitd9d6d28182bd91f0dcdffb4398d1b845dea581b3 (patch)
tree6d777933439cd4154674004c7127c26468d71344 /src/map/mob.c
parentc638f42f8e80a980c21e210c6ce149731dd53b17 (diff)
downloadhercules-d9d6d28182bd91f0dcdffb4398d1b845dea581b3.tar.gz
hercules-d9d6d28182bd91f0dcdffb4398d1b845dea581b3.tar.bz2
hercules-d9d6d28182bd91f0dcdffb4398d1b845dea581b3.tar.xz
hercules-d9d6d28182bd91f0dcdffb4398d1b845dea581b3.zip
added support to regulate MVP drops [Reddozen]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6439 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c70
1 files changed, 55 insertions, 15 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 84f40b514..433787b8d 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3222,32 +3222,52 @@ static int mob_readdb(void)
ratemin = battle_config.item_drop_treasure_min;
ratemax = battle_config.item_drop_treasure_max;
}
- else switch (type)
+ else switch (type) // Added suport to restrict normal drops of MVP's [Reddozen]
{
case 0:
- rate_adjust = battle_config.item_rate_heal;
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_heal_boss;
+ else {
+ rate_adjust = battle_config.item_rate_heal;
+ }
ratemin = battle_config.item_drop_heal_min;
ratemax = battle_config.item_drop_heal_max;
break;
case 2:
- rate_adjust = battle_config.item_rate_use;
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_use_boss;
+ else {
+ rate_adjust = battle_config.item_rate_use;
+ }
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
- rate_adjust = battle_config.item_rate_equip;
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_equip_boss;
+ else {
+ rate_adjust = battle_config.item_rate_equip;
+ }
ratemin = battle_config.item_drop_equip_min;
ratemax = battle_config.item_drop_equip_max;
break;
case 6:
- rate_adjust = battle_config.item_rate_card;
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_card_boss;
+ else {
+ rate_adjust = battle_config.item_rate_card;
+ }
ratemin = battle_config.item_drop_card_min;
ratemax = battle_config.item_drop_card_max;
break;
default:
- rate_adjust = battle_config.item_rate_common;
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_common_boss;
+ else {
+ rate_adjust = battle_config.item_rate_common;
+ }
ratemin = battle_config.item_drop_common_min;
ratemax = battle_config.item_drop_common_max;
break;
@@ -3851,32 +3871,52 @@ static int mob_read_sqldb(void)
ratemin = battle_config.item_drop_treasure_min;
ratemax = battle_config.item_drop_treasure_max;
}
- else switch(type)
+ else switch (type) // Added suport to restrict normal drops of MVP's [Reddozen]
{
- case 0: // Added by Valaris
- rate_adjust = battle_config.item_rate_heal;
+ case 0: // Val added heal restrictions
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_heal_boss;
+ else {
+ rate_adjust = battle_config.item_rate_heal;
+ }
ratemin = battle_config.item_drop_heal_min;
ratemax = battle_config.item_drop_heal_max;
break;
case 2:
- rate_adjust = battle_config.item_rate_use;
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_use_boss;
+ else {
+ rate_adjust = battle_config.item_rate_use;
+ }
ratemin = battle_config.item_drop_use_min;
- ratemax = battle_config.item_drop_use_max; // End
+ ratemax = battle_config.item_drop_use_max;
break;
case 4:
case 5:
- case 8: // Changed to include Pet Equip
- rate_adjust = battle_config.item_rate_equip;
+ case 8: // Changed to include Pet Equip
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_equip_boss;
+ else {
+ rate_adjust = battle_config.item_rate_equip;
+ }
ratemin = battle_config.item_drop_equip_min;
ratemax = battle_config.item_drop_equip_max;
break;
case 6:
- rate_adjust = battle_config.item_rate_card;
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_card_boss;
+ else {
+ rate_adjust = battle_config.item_rate_card;
+ }
ratemin = battle_config.item_drop_card_min;
ratemax = battle_config.item_drop_card_max;
break;
default:
- rate_adjust = battle_config.item_rate_common;
+ if (mob_db_data[class_]->mexp > 0)
+ rate_adjust = battle_config.item_rate_common_boss;
+ else {
+ rate_adjust = battle_config.item_rate_common;
+ }
ratemin = battle_config.item_drop_common_min;
ratemax = battle_config.item_drop_common_max;
break;