mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-26 22:52:24 +00:00
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:
parent
c1669299aa
commit
0a0d4fbb70
@ -5024,8 +5024,19 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SE_SpellResistReduction:
|
case SE_SpellResistReduction:
|
||||||
if (type == focusResistRate && focus_spell.base[i] > value)
|
if (type == focusResistRate) {
|
||||||
value = focus_spell.base[i];
|
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;
|
break;
|
||||||
|
|
||||||
case SE_SpellHateMod:
|
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
|
//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
|
//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;
|
rand_effectiveness = true;
|
||||||
|
|
||||||
//Check if item focus effect exists for the client.
|
//Check if item focus effect exists for the client.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user