From 0461ac7912c4a04bebad40c1e0a8b043eb4fd791 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 11 Jun 2021 14:29:09 -0400 Subject: [PATCH] [Rule] Allow Skill ups from items (Default: On) (#1376) --- common/ruletypes.h | 1 + zone/spells.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index e2c25fb02..a261afc25 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -164,6 +164,7 @@ RULE_INT(Character, DefaultGuild, 0, "If not 0, new characters placed into the g RULE_BOOL(Character, ProcessFearedProximity, false, "Processes proximity checks when feared") RULE_BOOL(Character, EnableCharacterEXPMods, false, "Enables character zone-based experience modifiers.") RULE_BOOL(Character, PVPEnableGuardFactionAssist, true, "Enables faction based assisting against the aggresor in pvp.") +RULE_BOOL(Character, SkillUpFromItems, true, "Allow Skill ups from clickable items") RULE_CATEGORY_END() RULE_CATEGORY(Mercs) diff --git a/zone/spells.cpp b/zone/spells.cpp index 15a1151e0..ec5a2c978 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1419,7 +1419,9 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo if(IsClient()) { Client *c = CastToClient(); - c->CheckSongSkillIncrease(spell_id); + if((IsFromItem && RuleB(Character, SkillUpFromItems)) || !IsFromItem) { + c->CheckSongSkillIncrease(spell_id); + } if (spells[spell_id].EndurTimerIndex > 0 && slot < CastingSlot::MaxGems) c->SetLinkedSpellReuseTimer(spells[spell_id].EndurTimerIndex, spells[spell_id].recast_time / 1000); c->MemorizeSpell(static_cast(slot), spell_id, memSpellSpellbar); @@ -1442,7 +1444,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo SetMana(GetMana()); // skills - if (EQ::skills::IsCastingSkill(spells[spell_id].skill)) { + if (EQ::skills::IsCastingSkill(spells[spell_id].skill) && ((IsFromItem && RuleB(Character, SkillUpFromItems)) || !IsFromItem)) { c->CheckIncreaseSkill(spells[spell_id].skill, nullptr); // increased chance of gaining channel skill if you regained concentration