mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Rules] Add rule to configure max number of procs per round Combat:MaxProcs (#3640)
This commit is contained in:
+5
-5
@@ -3628,7 +3628,7 @@ int64 Mob::ReduceAllDamage(int64 damage)
|
||||
|
||||
bool Mob::HasProcs() const
|
||||
{
|
||||
for (int i = 0; i < MAX_PROCS; i++) {
|
||||
for (int i = 0; i < m_max_procs; i++) {
|
||||
if (IsValidSpell(PermaProcs[i].spellID) || IsValidSpell(SpellProcs[i].spellID)) {
|
||||
return true;
|
||||
}
|
||||
@@ -3646,7 +3646,7 @@ bool Mob::HasProcs() const
|
||||
|
||||
bool Mob::HasDefensiveProcs() const
|
||||
{
|
||||
for (int i = 0; i < MAX_PROCS; i++) {
|
||||
for (int i = 0; i < m_max_procs; i++) {
|
||||
if (IsValidSpell(DefensiveProcs[i].spellID)) {
|
||||
return true;
|
||||
}
|
||||
@@ -3682,7 +3682,7 @@ bool Mob::HasSkillProcSuccess() const
|
||||
|
||||
bool Mob::HasRangedProcs() const
|
||||
{
|
||||
for (int i = 0; i < MAX_PROCS; i++){
|
||||
for (int i = 0; i < m_max_procs; i++){
|
||||
if (IsValidSpell(RangedProcs[i].spellID)) {
|
||||
return true;
|
||||
}
|
||||
@@ -4580,7 +4580,7 @@ void Mob::TryDefensiveProc(Mob *on, uint16 hand)
|
||||
}
|
||||
|
||||
//Spell Procs and Quest added procs
|
||||
for (int i = 0; i < MAX_PROCS; i++) {
|
||||
for (int i = 0; i < m_max_procs; i++) {
|
||||
if (IsValidSpell(DefensiveProcs[i].spellID)) {
|
||||
if (!IsProcLimitTimerActive(DefensiveProcs[i].base_spellID, DefensiveProcs[i].proc_reuse_time, ProcType::DEFENSIVE_PROC)) {
|
||||
float chance = proc_chance * (static_cast<float>(DefensiveProcs[i].chance) / 100.0f);
|
||||
@@ -4783,7 +4783,7 @@ void Mob::TrySpellProc(const EQ::ItemInstance *inst, const EQ::ItemData *weapon,
|
||||
|
||||
int16 poison_slot=-1;
|
||||
|
||||
for (uint32 i = 0; i < MAX_PROCS; i++) {
|
||||
for (uint32 i = 0; i < m_max_procs; i++) {
|
||||
if (IsPet() && hand != EQ::invslot::slotPrimary) //Pets can only proc spell procs from their primay hand (ie; beastlord pets)
|
||||
continue; // If pets ever can proc from off hand, this will need to change
|
||||
|
||||
|
||||
Reference in New Issue
Block a user