mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 02:11:30 +00:00
[Spells] Update to IsCombatProc checks (#1741)
* Update spells.cpp * Update spells.cpp * Update spells.cpp * Update spells.cpp
This commit is contained in:
parent
cef352f0ac
commit
776449aa3d
@ -5669,21 +5669,36 @@ bool Mob::FindType(uint16 type, bool bOffensive, uint16 threshold) {
|
||||
|
||||
bool Mob::IsCombatProc(uint16 spell_id) {
|
||||
|
||||
if (RuleB(Spells, FocusCombatProcs))
|
||||
if (RuleB(Spells, FocusCombatProcs)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(spell_id == SPELL_UNKNOWN)
|
||||
if (spell_id == SPELL_UNKNOWN) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
if ((spells[spell_id].cast_time == 0) && (spells[spell_id].recast_time == 0) && (spells[spell_id].recovery_time == 0))
|
||||
{
|
||||
|
||||
for (int i = 0; i < MAX_PROCS; i++){
|
||||
if (PermaProcs[i].spellID == spell_id || SpellProcs[i].spellID == spell_id
|
||||
|| RangedProcs[i].spellID == spell_id){
|
||||
if (PermaProcs[i].spellID == spell_id ||
|
||||
SpellProcs[i].spellID == spell_id ||
|
||||
RangedProcs[i].spellID == spell_id ||
|
||||
DefensiveProcs[i].spellID == spell_id){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsClient()) {
|
||||
for (int i = 0; i < MAX_AA_PROCS; i += 4) {
|
||||
|
||||
if (aabonuses.SpellProc[i + 1] == spell_id ||
|
||||
aabonuses.RangedProc[i + 1] == spell_id ||
|
||||
aabonuses.DefensiveProc[i + 1] == spell_id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user