diff --git a/common/spdat.h b/common/spdat.h index b70d708f0..487b5d00a 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -38,6 +38,7 @@ #define MAX_RESISTABLE_EFFECTS 12 // Number of effects that are typcially checked agianst resists. #define MaxLimitInclude 16 //Number(x 0.5) of focus Limiters that have inclusive checks used when calcing focus effects #define MAX_SKILL_PROCS 4 //Number of spells to check skill procs from. (This is arbitrary) [Single spell can have multiple proc checks] +#define MAX_SYMPATHETIC_PROCS 10 // Number of sympathetic procs a client can have (This is arbitrary) const int Z_AGGRO=10; diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 24eac51ee..e03d5672a 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -5183,7 +5183,6 @@ int16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) { return 0; uint16 proc_spellid = 0; - uint8 MAX_SYMPATHETIC = 10; float ProcChance = 0.0f; std::vector SympatheticProcList; @@ -5195,7 +5194,7 @@ int16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) { for(int x = EmuConstants::EQUIPMENT_BEGIN; x <= EmuConstants::EQUIPMENT_END; x++) { - if (SympatheticProcList.size() > MAX_SYMPATHETIC) + if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS) continue; TempItem = nullptr; @@ -5215,7 +5214,7 @@ int16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) { for (int y = AUG_BEGIN; y < EmuConstants::ITEM_COMMON_SIZE; ++y) { - if (SympatheticProcList.size() > MAX_SYMPATHETIC) + if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS) continue; ItemInst *aug = nullptr; @@ -5243,11 +5242,11 @@ int16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) { int buff_max = GetMaxTotalSlots(); for (buff_slot = 0; buff_slot < buff_max; buff_slot++) { - if (SympatheticProcList.size() > MAX_SYMPATHETIC) + if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS) continue; focusspellid = buffs[buff_slot].spellid; - if (IsValidSpell(focusspellid)) + if (!IsValidSpell(focusspellid)) continue; proc_spellid = CalcFocusEffect(type, focusspellid, spell_id); @@ -5275,7 +5274,7 @@ int16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) { if (aa_AA < 1 || aa_value < 1) continue; - if (SympatheticProcList.size() > MAX_SYMPATHETIC) + if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS) continue; proc_spellid = CalcAAFocus(type, aa_AA, spell_id);