Let's assume common_drop_item.txt is almost never used by anyone, but for those who are thinking about using it, here's some (potential) bugs I found inside.
Those may or may be not bugs, it depends on what use you want to make for common_drop_item.
I think the most useful use would be to set drops easily depending on mob and users' levels, without making it mob-by-mob(mob_drop_item.txt), for those who wish to rewrite all the drops from scratch.
It would be a good replace of settings drops via LUA(which may cause performance issues, and also you have to deal also with empire and user's drop rates) too.
The bugs I found are:
1) Min and max_level are only based on the user's level. No matter which mob level it is(e.g. min_level=30, max_level=100: if you kill a wolf(level 3) you will get the item anyway).
2) Consequence of (1), if player level is above or below 15 levels(standard level limit for dropping items) than mob's, the item will be dropped anyway.
3) The "count" was declared but never applied, only one item used to be dropped.
And so on, thus I decided to rewrite the entire function and make it useful.
Renewal Features:
1) If mob level is below or above than for example 15 levels than the common_drop_item, the item won't be dropped.
2) If mob level is above or below than certain levels from user, the item won't be dropped.
3) Just like standard drops, there will be applied handicaps on drop rate %, based on user and mob levels(There is a mid-level between start and end, the farthest difference between this and user or mob level is, the less drop rate % will be)
4) Drops can be also based on mob ranks(like common drop item's concern), and the ranks can be indicated.
5) You can choose in which map the item can be dropped(0=any).
6) Multiple items can be set in the same settings.
Other features can be found in the function.
Understanding structure:
The structure is similar to mob_drop_item's one, but with new(and different) variables, which are:
"map": the map index, default 0
"lv_start" and "lv_end": min and max (user)level, default 1-999
"min_rank": and "max_rank": min and max (mob)Rank, starting from 0, which is the 1st rank, default 0-3
"rank_gain": if there are more ranks, each rank will have more % chance to drop the item, based on the previous rank's percent, default 20
"level_diff": the minimum level difference between user and mobs' levels, and also the minimum level difference between mob and lv_start or lv_end, default 15
For item declaration, the syntax is the same as mob_drop_item, with 3 chars:
ID VNUM COUNT PERCENT
Note:
This system has not been tested in real servers, and it may have some bugs or can be optimized, so please analyze it if you are planning to user it in real servers.
If you find any bug or you have any advice, please share it here.
Replace inside ITEM_MANAGER::CreateDropItem function in item_manager.cpp
Replace entire function inside item_manager_read_tables.cpp
Replace this class inside item_manager_private_types.h and item_manager.cpp
Example Usage(Sword+9 at 0.5%):
Note:
If you wish to apply fairness between q.ty of items->percents, you can use one of these logics:
1) multiply iPercent by i (inside item_manager.cpp)
2) just multiply manually item percents by count of items inside common_drop_item.txt(e.g. first item(1) percent = 1, item_count=30 -> first_item(1) percent = first_item(1) percent*item_count)