Complete revision of SE_SkillProc, SE_LimitToSkill,

SE_SkillProcSuccess (now implemented correctly)
to function more accurately and efficiently, AA supported.
This may need to be updated in the future, if more live
spells readily become avialable to test with.
This commit is contained in:
KayenEQ
2014-07-06 18:58:16 -04:00
parent 3a4e72e3e7
commit 0e438942e4
13 changed files with 415 additions and 186 deletions
-31
View File
@@ -5103,37 +5103,6 @@ bool Mob::RemoveDefensiveProc(uint16 spell_id, bool bAll)
return true;
}
bool Mob::AddSkillProc(uint16 spell_id, uint16 iChance, uint16 base_spell_id)
{
if(spell_id == SPELL_UNKNOWN)
return(false);
int i;
for (i = 0; i < MAX_PROCS; i++) {
if (SkillProcs[i].spellID == SPELL_UNKNOWN) {
SkillProcs[i].spellID = spell_id;
SkillProcs[i].chance = iChance;
SkillProcs[i].base_spellID = base_spell_id;
mlog(SPELLS__PROCS, "Added spell-granted skill proc spell %d with chance %d to slot %d", spell_id, iChance, i);
return true;
}
}
return false;
}
bool Mob::RemoveSkillProc(uint16 spell_id, bool bAll)
{
for (int i = 0; i < MAX_PROCS; i++) {
if (bAll || SkillProcs[i].spellID == spell_id) {
SkillProcs[i].spellID = SPELL_UNKNOWN;
SkillProcs[i].chance = 0;
SkillProcs[i].base_spellID = SPELL_UNKNOWN;
mlog(SPELLS__PROCS, "Removed Skill proc %d from slot %d", spell_id, i);
}
}
return true;
}
bool Mob::AddRangedProc(uint16 spell_id, uint16 iChance, uint16 base_spell_id)
{
if(spell_id == SPELL_UNKNOWN)