Added rule_bool 'Character:UseNoJunkFishing'

This commit is contained in:
Uleat 2019-12-22 21:36:13 -05:00
parent e050534378
commit c87b4f2ad4
2 changed files with 30 additions and 27 deletions

View File

@ -157,6 +157,7 @@ RULE_BOOL(Character, OPClientUpdateVisualDebug, false, "Shows a pulse and forwar
RULE_BOOL(Character, AllowCrossClassTrainers, false, "") RULE_BOOL(Character, AllowCrossClassTrainers, false, "")
RULE_BOOL(Character, PetsUseReagents, true, "Pets use reagent on spells") RULE_BOOL(Character, PetsUseReagents, true, "Pets use reagent on spells")
RULE_BOOL(Character, DismountWater, true, "Dismount horses when entering water") RULE_BOOL(Character, DismountWater, true, "Dismount horses when entering water")
RULE_BOOL(Character, UseNoJunkFishing, false, "Disregards junk items when fishing")
RULE_CATEGORY_END() RULE_CATEGORY_END()
RULE_CATEGORY(Mercs) RULE_CATEGORY(Mercs)

View File

@ -309,10 +309,11 @@ void Client::GoFish()
if(food_id == 0) { if(food_id == 0) {
int index = zone->random.Int(0, MAX_COMMON_FISH_IDS-1); int index = zone->random.Int(0, MAX_COMMON_FISH_IDS-1);
food_id = common_fish_ids[index]; food_id = (RuleB(Character, UseNoJunkFishing) ? 13019 : common_fish_ids[index]);
} }
const EQEmu::ItemData* food_item = database.GetItem(food_id); const EQEmu::ItemData* food_item = database.GetItem(food_id);
if (food_item) {
if (food_item->ItemType != EQEmu::item::ItemTypeFood) { if (food_item->ItemType != EQEmu::item::ItemTypeFood) {
MessageString(Chat::Skills, FISHING_SUCCESS); MessageString(Chat::Skills, FISHING_SUCCESS);
@ -346,6 +347,7 @@ void Client::GoFish()
} }
} }
} }
}
else else
{ {
//chance to use bait when you dont catch anything... //chance to use bait when you dont catch anything...