SE_SpellResistReduction should be RNG

I think before there was an implied 1 to base now it's base to base2
This commit is contained in:
Michael Cook (mackal) 2017-06-12 16:57:35 -04:00
parent c1669299aa
commit 0a0d4fbb70

View File

@ -5024,8 +5024,19 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
break;
case SE_SpellResistReduction:
if (type == focusResistRate && focus_spell.base[i] > value)
value = focus_spell.base[i];
if (type == focusResistRate) {
if (best_focus) {
if (focus_spell.base2 != 0) {
value = focus_spell.base2[i];
} else {
value = focus_spell.base[i];
}
} else if (focus_spell.base2[i] == 0 || focus_spell.base[i] == focus_spell.base2[i]) {
value = focus_spell.base[i];
} else {
value = zone->random.Int(focus_spell.base[i], focus_spell.base2[i]);
}
}
break;
case SE_SpellHateMod:
@ -5319,7 +5330,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
//Improved Healing, Damage & Mana Reduction are handled differently in that some are random percentages
//In these cases we need to find the most powerful effect, so that each piece of gear wont get its own chance
if(RuleB(Spells, LiveLikeFocusEffects) && (type == focusManaCost || type == focusImprovedHeal || type == focusImprovedDamage || type == focusImprovedDamage2))
if(RuleB(Spells, LiveLikeFocusEffects) && (type == focusManaCost || type == focusImprovedHeal || type == focusImprovedDamage || type == focusImprovedDamage2 || type == focusResistRate))
rand_effectiveness = true;
//Check if item focus effect exists for the client.