From f3b2ac6c17665c326be8d5bdef91492c0ace0b27 Mon Sep 17 00:00:00 2001 From: Xackery Date: Thu, 22 Feb 2018 18:43:31 -0800 Subject: [PATCH] Added rule to remove pet reagent cost --- common/ruletypes.h | 1 + zone/spells.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 219995913..b6acffc3c 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -156,6 +156,7 @@ RULE_BOOL(Character, UseOldBindWound, false) // Uses the original bind wound beh RULE_BOOL(Character, GrantHoTTOnCreate, false) // Grant Health of Target's Target leadership AA on character creation RULE_BOOL(Character, UseOldConSystem, false) // Grant Health of Target's Target leadership AA on character creation RULE_BOOL(Character, OPClientUpdateVisualDebug, false) // Shows a pulse and forward directional particle each time the client sends its position to server +RULE_BOOL(Character, PetsUseReagents, true) //Pets use reagent on spells RULE_CATEGORY_END() RULE_CATEGORY(Mercs) diff --git a/zone/spells.cpp b/zone/spells.cpp index 78ef657aa..e66a41fa8 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1208,7 +1208,10 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo // handle the components for traditional casters else { - if(c->GetInv().HasItem(component, component_count, invWhereWorn|invWherePersonal) == -1) // item not found + if (!RuleB(Character, PetsUseReagents) && IsEffectInSpell(spell_id, SE_SummonPet)) { + //bypass reagent cost + } + else if(c->GetInv().HasItem(component, component_count, invWhereWorn|invWherePersonal) == -1) // item not found { if (!missingreags) { @@ -1238,6 +1241,9 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo return; } } + else if (!RuleB(Character, PetsUseReagents) && IsEffectInSpell(spell_id, SE_SummonPet)) { + //bypass reagent cost + } else if (!bard_song_mode) { int noexpend;