diff --git a/common/spdat.cpp b/common/spdat.cpp index e8605b6e9..2cbf8a97d 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -675,6 +675,20 @@ bool IsDiscipline(uint16 spell_id) return false; } +bool IsCombatSkill(uint16 spell_id) +{ + if (!IsValidSpell(spell_id)) + return false; + + //Check if Discipline OR melee proc (from non-castable spell) + if ((spells[spell_id].mana == 0 && + (spells[spell_id].EndurCost || spells[spell_id].EndurUpkeep)) || + ((spells[spell_id].cast_time == 0) && (spells[spell_id].recast_time == 0) && (spells[spell_id].recovery_time == 0))) + return true; + + return false; +} + bool IsResurrectionEffects(uint16 spell_id) { // spell id 756 is Resurrection Effects spell diff --git a/common/spdat.h b/common/spdat.h index 368c4018b..64b3aedc1 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -800,6 +800,7 @@ int32 CalculateCorruptionCounters(uint16 spell_id); int32 CalculateCounters(uint16 spell_id); bool IsDisciplineBuff(uint16 spell_id); bool IsDiscipline(uint16 spell_id); +bool IsCombatSkill(uint16 spell_id); bool IsResurrectionEffects(uint16 spell_id); bool IsRuneSpell(uint16 spell_id); bool IsMagicRuneSpell(uint16 spell_id); diff --git a/utils/sql/git/required/2014_02_13_spells_new_update.sql b/utils/sql/git/required/2014_02_13_spells_new_update.sql index c843d40aa..3c3675587 100644 --- a/utils/sql/git/required/2014_02_13_spells_new_update.sql +++ b/utils/sql/git/required/2014_02_13_spells_new_update.sql @@ -11,3 +11,7 @@ ALTER TABLE `spells_new` CHANGE `field214` `NotInCombat` INT(11) NOT NULL DEFAUL ALTER TABLE `spells_new` CHANGE `field168` `IsDiscipline` INT(11) NOT NULL DEFAULT '0'; ALTER TABLE `spells_new` CHANGE `field211` `CastRestriction` INT(11) NOT NULL DEFAULT '0'; +UPDATE altadv_vars SET sof_next_id = 8261 WHERE skill_id = 8232; +UPDATE altadv_vars SET sof_next_id = 0 WHERE skill_id = 8261; +UPDATE altadv_vars SET sof_current_level = 3 WHERE skill_id = 8261; + diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 49f0f2a1c..d9438ef90 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -4026,13 +4026,12 @@ int16 Client::CalcAAFocus(focusType type, uint32 aa_ID, uint16 spell_id) } break; - case SE_LimitCombatSkills: - if (base1 == 0){ - if((spell.cast_time == 0) && (spell.recast_time == 0) && (spell.recovery_time == 0)) //Exclude procs - LimitFailure = true; - } - break; + if (base1 == 0 && IsCombatSkill(spell_id)) //Exclude Discs + LimitFailure = true; + else if (base1 == 1 && !IsCombatSkill(spell_id)) //Exclude Spells + LimitFailure = true; + break; case SE_LimitSpellGroup: if(base1 < 0) { @@ -4429,10 +4428,10 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo break; case SE_LimitCombatSkills: - if (focus_spell.base[i] == 0){ - if((spell.cast_time == 0) && (spell.recast_time == 0) && (spell.recovery_time == 0)) //Exclude procs - return 0; - } + if (focus_spell.base[i] == 0 && IsCombatSkill(spell_id)) //Exclude Disc + return 0; + else if (focus_spell.base[i] == 1 && !IsCombatSkill(spell_id)) //Include Spells + return 0; break; case SE_LimitSpellGroup: