fix for LimitCombatSkills

fix for Extended Inginuity table data
This commit is contained in:
KayenEQ 2014-02-15 22:34:48 -05:00
parent 49df0a5d33
commit 1b7271359e
4 changed files with 28 additions and 10 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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: