diff --git a/conf/battle/drops.conf b/conf/battle/drops.conf index 918cb5ea44..edef3308fb 100644 --- a/conf/battle/drops.conf +++ b/conf/battle/drops.conf @@ -189,3 +189,6 @@ idletime_mer_option: 0x1F // If drop rate was below this amount and bonus is applied to it, the bonus can't make it exceed this amount. drop_rate_cap: 9000 drop_rate_cap_vip: 9000 + +// Displays a colored pillar effect for items dropped by monsters that contain random options. +rndopt_drop_pillar: on diff --git a/src/map/battle.cpp b/src/map/battle.cpp index b00b5dae98..61f64a315d 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -9128,6 +9128,7 @@ static const struct _battle_data { { "mer_idle_no_share" , &battle_config.mer_idle_no_share, 0, 0, INT_MAX, }, { "idletime_mer_option", &battle_config.idletime_mer_option, 0x1F, 0x1, 0xFFF, }, { "feature.refineui", &battle_config.feature_refineui, 1, 0, 1, }, + { "rndopt_drop_pillar", &battle_config.rndopt_drop_pillar, 1, 0, 1, }, #include "../custom/battle_config_init.inc" }; diff --git a/src/map/battle.hpp b/src/map/battle.hpp index 1fd1e288c9..d3ce73e860 100644 --- a/src/map/battle.hpp +++ b/src/map/battle.hpp @@ -689,6 +689,7 @@ struct Battle_Config int mer_idle_no_share; int idletime_mer_option; int feature_refineui; + int rndopt_drop_pillar; #include "../custom/battle_config_struct.inc" }; diff --git a/src/map/clif.cpp b/src/map/clif.cpp index d812c12c16..edac1d3ed1 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -878,13 +878,34 @@ void clif_dropflooritem( struct flooritem_data* fitem, bool canShowEffect ){ if( dropEffect > 0 ){ p.showdropeffect = 1; p.dropeffectmode = dropEffect - 1; - }else{ + }else if (battle_config.rndopt_drop_pillar != 0){ + uint8 optionCount = 0; + + for (uint8 i = 0; i < MAX_ITEM_RDM_OPT; i++) { + if (fitem->item.option[i].id != 0) { + optionCount++; + } + } + + if (optionCount > 0) { + p.showdropeffect = 1; + if (optionCount == 1) + p.dropeffectmode = DROPEFFECT_BLUE_PILLAR - 1; + else if (optionCount == 2) + p.dropeffectmode = DROPEFFECT_YELLOW_PILLAR - 1; + else + p.dropeffectmode = DROPEFFECT_PURPLE_PILLAR - 1; + } else { + p.showdropeffect = 0; + p.dropeffectmode = DROPEFFECT_NONE; + } + } else { p.showdropeffect = 0; - p.dropeffectmode = 0; + p.dropeffectmode = DROPEFFECT_NONE; } }else{ p.showdropeffect = 0; - p.dropeffectmode = 0; + p.dropeffectmode = DROPEFFECT_NONE; } #endif clif_send( &p, sizeof(p), &fitem->bl, AREA );