summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--conf-tmpl/battle/drops.conf5
-rw-r--r--src/map/battle.c10
-rw-r--r--src/map/battle.h5
-rw-r--r--src/map/mob.c70
5 files changed, 75 insertions, 17 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index d458f29f6..0c0142939 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/01
+ * After testing to make sure it works properly, I'm including
+ new battle conf options to limit MVP drops. [Reddozen]
* Removed OPTION_XMAS, it seems to not exist.... [Skotlex]
* Added SC_SMA to handle "ready to use SMA" status (rather than SC_COMBO)
since it has a visual effect to use. [Skotlex]
diff --git a/conf-tmpl/battle/drops.conf b/conf-tmpl/battle/drops.conf
index 776114d62..e36194f57 100644
--- a/conf-tmpl/battle/drops.conf
+++ b/conf-tmpl/battle/drops.conf
@@ -59,26 +59,31 @@ mvp_item_third_get_time: 2000
// The rate the common items are dropped (Items that are in the ETC tab, besides card)
item_rate_common: 100
+item_rate_common_boss: 100
item_drop_common_min: 1
item_drop_common_max: 10000
// The rate healing items are dropped (items that restore HP or SP)
item_rate_heal: 100
+item_rate_heal_boss: 100
item_drop_heal_min: 1
item_drop_heal_max: 10000
// The rate at which usable items (in the item tab) other then healing items are dropped.
item_rate_use: 100
+item_rate_use_boss: 100
item_drop_use_min: 1
item_drop_use_max: 10000
// The rate at which equipment is dropped.
item_rate_equip: 100
+item_rate_equip_boss: 100
item_drop_equip_min: 1
item_drop_equip_max: 10000
// The rate at which cards are dropped
item_rate_card: 100
+item_rate_card_boss: 100
item_drop_card_min: 1
item_drop_card_max: 10000
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;