diff options
author | reddozen <reddozen@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-02 00:20:17 +0000 |
---|---|---|
committer | reddozen <reddozen@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-02 00:20:17 +0000 |
commit | d9d6d28182bd91f0dcdffb4398d1b845dea581b3 (patch) | |
tree | 6d777933439cd4154674004c7127c26468d71344 /src | |
parent | c638f42f8e80a980c21e210c6ce149731dd53b17 (diff) | |
download | hercules-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')
-rw-r--r-- | src/map/battle.c | 10 | ||||
-rw-r--r-- | src/map/battle.h | 5 | ||||
-rw-r--r-- | src/map/mob.c | 70 |
3 files changed, 68 insertions, 17 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index c1c451471..45f7ac24d 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3920,10 +3920,15 @@ static const struct battle_data_int { // eAthena additions
{ "item_rate_mvp", &battle_config.item_rate_mvp },
{ "item_rate_common", &battle_config.item_rate_common }, // Added by RoVeRT
+ { "item_rate_common_boss", &battle_config.item_rate_common_boss }, // [Reddozen]
{ "item_rate_equip", &battle_config.item_rate_equip },
+ { "item_rate_equip_boss", &battle_config.item_rate_equip_boss }, // [Reddozen]
{ "item_rate_card", &battle_config.item_rate_card }, // End Addition
+ { "item_rate_card_boss", &battle_config.item_rate_card_boss }, // [Reddozen]
{ "item_rate_heal", &battle_config.item_rate_heal }, // Added by Valaris
+ { "item_rate_heal_boss", &battle_config.item_rate_heal_boss }, // [Reddozen]
{ "item_rate_use", &battle_config.item_rate_use }, // End
+ { "item_rate_use_boss", &battle_config.item_rate_use_boss }, // [Reddozen]
{ "item_rate_adddrop", &battle_config.item_rate_adddrop }, // End
{ "item_rate_treasure", &battle_config.item_rate_treasure }, // End
{ "day_duration", &battle_config.day_duration }, // added by [Yor]
@@ -4173,10 +4178,15 @@ void battle_set_defaults() { // eAthena additions
battle_config.item_rate_mvp=100;
battle_config.item_rate_common = 100;
+ battle_config.item_rate_common_boss = battle_config.item_rate_common; // [Reddozen]
battle_config.item_rate_equip = 100;
+ battle_config.item_rate_equip_boss = battle_config.item_rate_equip; // [Reddozen]
battle_config.item_rate_card = 100;
+ battle_config.item_rate_card_boss = battle_config.item_rate_card; // [Reddozen]
battle_config.item_rate_heal = 100; // Added by Valaris
+ battle_config.item_rate_heal_boss = battle_config.item_rate_heal; // [Reddozen]
battle_config.item_rate_use = 100; // End
+ battle_config.item_rate_use_boss = battle_config.item_rate_use; // [Reddozen]
battle_config.item_rate_adddrop = 100;
battle_config.item_rate_treasure = 100;
battle_config.logarithmic_drops = 0;
diff --git a/src/map/battle.h b/src/map/battle.h index 96ea7eebc..03d285f1a 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -272,8 +272,9 @@ extern struct Battle_Config { unsigned short mob_attack_attr_none;
unsigned short mob_ghostring_fix;
unsigned short pc_attack_attr_none;
- int item_rate_mvp, item_rate_common,item_rate_card,item_rate_equip,
- item_rate_heal, item_rate_use, item_rate_treasure, // Added by RoVeRT, Additional Heal and Usable item rate by Val
+ int item_rate_mvp, item_rate_common, item_rate_common_boss, item_rate_card, item_rate_card_boss, // added support for MVP drops [Reddozen]
+ item_rate_equip, item_rate_equip_boss, item_rate_heal, item_rate_heal_boss, item_rate_use,
+ item_rate_use_boss, item_rate_treasure, // Added by RoVeRT, Additional Heal and Usable item rate by Val
item_rate_adddrop;
unsigned short logarithmic_drops;
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;
|