summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/battle/gm.conf5
-rw-r--r--src/map/atcommand.c12
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
4 files changed, 16 insertions, 3 deletions
diff --git a/conf/battle/gm.conf b/conf/battle/gm.conf
index fe07a6fc4..6d43d4e73 100644
--- a/conf/battle/gm.conf
+++ b/conf/battle/gm.conf
@@ -25,3 +25,8 @@ atcommand_max_stat_bypass: no
// Ban people that try trade dupe.
// Duration of the ban, in minutes (default: 5). To disable the ban, set 0.
ban_hack_trade: 5
+
+// requires RENEWAL_DROP to be enabled (src/map/config/renewal.h)
+// modifies @mobinfo to display the users' real drop rate as per renewal_drop formula
+// modifies @iteminfo to not display the minimum item drop rate (since it can't tell the mob level)
+atcommand_mobinfo_type: 1 \ No newline at end of file
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index f52685855..0bf57ea52 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -6715,12 +6715,18 @@ ACMD_FUNC(mobinfo)
strcpy(atcmd_output, " ");
j = 0;
for (i = 0; i < MAX_MOB_DROP; i++) {
+ int droprate;
if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL)
continue;
+ droprate = mob->dropitem[i].p;
+#ifdef RENEWAL_DROP
+ if( battle_config.atcommand_mobinfo_type )
+ droprate = droprate * party_renewal_drop_mod(sd->status.base_level - mob->lv) / 100;
+#endif
if (item_data->slot)
- sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, (float)mob->dropitem[i].p / 100);
+ sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, (float)droprate / 100);
else
- sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, (float)mob->dropitem[i].p / 100);
+ sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, (float)droprate / 100);
strcat(atcmd_output, atcmd_output2);
if (++j % 3 == 0) {
clif_displaymessage(fd, atcmd_output);
@@ -7150,7 +7156,7 @@ ACMD_FUNC(iteminfo)
if (item_data->maxchance == -1)
strcpy(atcmd_output, " - Available in the shops only.");
- else if (item_data->maxchance)
+ else if (!battle_config.atcommand_mobinfo_type && item_data->maxchance)
sprintf(atcmd_output, " - Maximal monsters drop chance: %02.02f%%", (float)item_data->maxchance / 100 );
else
strcpy(atcmd_output, " - Monsters don't drop this item.");
diff --git a/src/map/battle.c b/src/map/battle.c
index eaadf451c..96132b3e3 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5407,6 +5407,7 @@ static const struct _battle_data {
{ "mvp_tomb_enabled", &battle_config.mvp_tomb_enabled, 1, 0, 1 },
{ "feature.atcommand_suggestions", &battle_config.atcommand_suggestions_enabled, 0, 0, 1 },
{ "min_npc_vending_distance", &battle_config.min_npc_vending_distance, 3, 0, 100 },
+ { "atcommand_mobinfo_type", &battle_config.atcommand_mobinfo_type, 0, 0, 1 },
};
diff --git a/src/map/battle.h b/src/map/battle.h
index 22ae1c13a..5cacdf0ef 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -474,6 +474,7 @@ extern struct Battle_Config
int atcommand_suggestions_enabled;
int min_npc_vending_distance;
+ int atcommand_mobinfo_type;
} battle_config;
void do_init_battle(void);