Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added a new configuration setting "item_drop_mvp_mode" * By default "item_drop_mvp_mode" is set to official order (0) which is always starting at first, then going to the second if the first didn't drop and only checking the third if the second didn't drop either * @mobinfo will now properly consider this and display the effective chance, so if the MVP has 3 MVP item drops at 50%, the first item will display the chance 50%, the second 25% and the third 12.5%, this should help a lot against drop rate confusion (e.g. players wondering why always only the first item drops when all three are displayed at 100%); this only applies to official order (0) * When "item_drop_mvp_mode" is set to random order (1), MVP item drops are checked in random order, but if one MVP item drops, the process will be canceled, so you will never get more than one MVP item no matter how high the drop rate is * When "item_drop_mvp_mode" is set to all items (2), all MVP item drops are checked and have a chance to drop, regardless of other MVP items already being dropped or not (i.e. there is a chance that the player gets all 3 MVP items)
- Loading branch information
1 parent
464dd45
commit 5110ddb
Showing
5 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7047,25 +7047,32 @@ ACMD_FUNC(mobinfo) | |
clif_displaymessage(fd, atcmd_output); | ||
// mvp | ||
if (mob->mexp) { | ||
float mvppercent, mvpremain; | ||
sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%u | ||
clif_displaymessage(fd, atcmd_output); | ||
strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: | ||
mvpremain = 100.0; //Remaining drop chance for official mvp drop mode | ||
j = 0; | ||
for (i = 0; i < MAX_MVP_DROP; i++) { | ||
if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL) | ||
continue; | ||
if (mob->mvpitem[i].p > 0) { | ||
//Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% | ||
mvppercent = (float)mob->mvpitem[i].p * mvpremain / 10000.0; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Playtester
Author
Member
|
||
if(battle_config.item_drop_mvp_mode == 0) { | ||
mvpremain -= mvppercent; | ||
} | ||
if (mvppercent > 0) { | ||
j++; | ||
if (j == 1) { | ||
if (item_data->slot) | ||
sprintf(atcmd_output2, " %s[%d] %02.02f%%", item_data->jname, item_data->slot, (float)mob->mvpitem[i].p / 100); | ||
sprintf(atcmd_output2, " %s[%d] %02.02f%%", item_data->jname, item_data->slot, mvppercent); | ||
else | ||
sprintf(atcmd_output2, " %s %02.02f%%", item_data->jname, (float)mob->mvpitem[i].p / 100); | ||
sprintf(atcmd_output2, " %s %02.02f%%", item_data->jname, mvppercent); | ||
} else { | ||
if (item_data->slot) | ||
sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, (float)mob->mvpitem[i].p / 100); | ||
sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, mvppercent); | ||
else | ||
sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, (float)mob->mvpitem[i].p / 100); | ||
sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, mvppercent); | ||
} | ||
strcat(atcmd_output, atcmd_output2); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show warning VC 2013 : '=' : conversion from 'double' to 'float', possible loss of data
maybe to fixed
double mvppercent, mvpremain;
mvppercent = (float)mob->mvpitem[i].p * (float)mvpremain / 10000.0;