mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +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) {
|
bool Mob::IsCombatProc(uint16 spell_id) {
|
||||||
|
|
||||||
if (RuleB(Spells, FocusCombatProcs))
|
if (RuleB(Spells, FocusCombatProcs)) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(spell_id == SPELL_UNKNOWN)
|
if (spell_id == SPELL_UNKNOWN) {
|
||||||
return(false);
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
if ((spells[spell_id].cast_time == 0) && (spells[spell_id].recast_time == 0) && (spells[spell_id].recovery_time == 0))
|
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++){
|
for (int i = 0; i < MAX_PROCS; i++){
|
||||||
if (PermaProcs[i].spellID == spell_id || SpellProcs[i].spellID == spell_id
|
if (PermaProcs[i].spellID == spell_id ||
|
||||||
|| RangedProcs[i].spellID == spell_id){
|
SpellProcs[i].spellID == spell_id ||
|
||||||
|
RangedProcs[i].spellID == spell_id ||
|
||||||
|
DefensiveProcs[i].spellID == spell_id){
|
||||||
return true;
|
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;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user