[forage rule feature] add a rule to disabled using common_food_ids from the list in forage.cpp. currently set to enabled. (#3796)

This commit is contained in:
regneq 2023-12-22 00:43:17 -08:00 committed by GitHub
parent e06c7d7735
commit 267c280db8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -215,6 +215,7 @@ RULE_BOOL(Character, EnableRaidEXPModifier, true, "Enable or disable the raid ex
RULE_BOOL(Character, EnableRaidMemberEXPModifier, true, "Enable or disable the raid experience modifier based on members in raid, default is true")
RULE_BOOL(Character, LeaveCursorMoneyOnCorpse, false, "Enable or disable leaving cursor money on player corpses")
RULE_BOOL(Character, ItemExtraSkillDamageCalcAsPercent, false, "If enabled, apply Item Extra Skill Damage as Percentage-based modifiers")
RULE_BOOL(Character, UseForageCommonFood, true, "If enabled, use the common foods specified in the code.")
RULE_CATEGORY_END()
RULE_CATEGORY(Mercs)

View File

@ -456,7 +456,7 @@ void Client::ForageItem(bool guarantee) {
}
//not an else in case theres no DB food
if (foragedfood == 0) {
if (foragedfood == 0 && RuleB(Character, UseForageCommonFood)) {
uint8 index = 0;
index = zone->random.Int(0, MAX_COMMON_FOOD_IDS-1);
foragedfood = common_food_ids[index];