[Spells] Fixed proc rate for Ranged procs (#1715)

This commit is contained in:
KayenEQ 2021-11-11 20:27:50 -05:00 committed by GitHub
parent 239033a269
commit 17c8e8414c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4136,7 +4136,7 @@ void Mob::TryDefensiveProc(Mob *on, uint16 hand) {
float ProcChance, ProcBonus; float ProcChance, ProcBonus;
on->GetDefensiveProcChances(ProcBonus, ProcChance, hand, this); on->GetDefensiveProcChances(ProcBonus, ProcChance, hand, this);
if (hand != EQ::invslot::slotPrimary) { if (hand == EQ::invslot::slotSecondary) {
ProcChance /= 2; ProcChance /= 2;
} }
@ -4238,7 +4238,7 @@ void Mob::TryWeaponProc(const EQ::ItemInstance *inst, const EQ::ItemData *weapon
ProcBonus += static_cast<float>(itembonuses.ProcChance) / 10.0f; // Combat Effects ProcBonus += static_cast<float>(itembonuses.ProcChance) / 10.0f; // Combat Effects
float ProcChance = GetProcChances(ProcBonus, hand); float ProcChance = GetProcChances(ProcBonus, hand);
if (hand != EQ::invslot::slotPrimary) //Is Archery intened to proc at 50% rate? if (hand == EQ::invslot::slotSecondary)
ProcChance /= 2; ProcChance /= 2;
// Try innate proc on weapon // Try innate proc on weapon
@ -4321,7 +4321,7 @@ void Mob::TrySpellProc(const EQ::ItemInstance *inst, const EQ::ItemData *weapon,
float ProcChance = 0.0f; float ProcChance = 0.0f;
ProcChance = GetProcChances(ProcBonus, hand); ProcChance = GetProcChances(ProcBonus, hand);
if (hand != EQ::invslot::slotPrimary) //Is Archery intened to proc at 50% rate? if (hand == EQ::invslot::slotSecondary)
ProcChance /= 2; ProcChance /= 2;
bool rangedattk = false; bool rangedattk = false;
@ -5216,7 +5216,7 @@ float Mob::GetSkillProcChances(uint16 ReuseTime, uint16 hand) {
if (!ReuseTime && hand) { if (!ReuseTime && hand) {
weapon_speed = GetWeaponSpeedbyHand(hand); weapon_speed = GetWeaponSpeedbyHand(hand);
ProcChance = static_cast<float>(weapon_speed) * (RuleR(Combat, AvgProcsPerMinute) / 60000.0f); ProcChance = static_cast<float>(weapon_speed) * (RuleR(Combat, AvgProcsPerMinute) / 60000.0f);
if (hand != EQ::invslot::slotPrimary) if (hand == EQ::invslot::slotSecondary)
ProcChance /= 2; ProcChance /= 2;
} }