From a7479a628c50e15c6fe7ddf388ffaf478c2e298a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 29 Dec 2019 23:00:42 -0500 Subject: [PATCH] Use CastTime == 0 on clickies to prevent reagent consumption This /may/ not be correct, but we think it is --- zone/spells.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 8f787bec4..091f1a32c 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1151,7 +1151,13 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo // first check for component reduction if(IsClient()) { int reg_focus = CastToClient()->GetFocusEffect(focusReagentCost,spell_id);//Client only - if(zone->random.Roll(reg_focus)) { + /* it seems something causes some items not to consume reagents, it's not click type or temp flag + * it maybe cast time being instant, which I had a hard time disproving, so lets do that + * Items that might prove this wrong: Mystic Cloak (1057), Moss Mask (1400), and a bunch others + */ + if (item && item->GetItem() && item->GetItem()->CastTime == 0) { + LogSpells("Spell [{}]: Casted from instant clicky, prevent reagent consumption", spell_id); + } else if(zone->random.Roll(reg_focus)) { LogSpells("Spell [{}]: Reagent focus item prevented reagent consumption ([{}] chance)", spell_id, reg_focus); } else { if(reg_focus > 0)