mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
[Spells] Fear resistance effects edge case fixes and support for SPA 102 as an AA (#4848)
* Clean up for fear related bonus variables SPA 181 FearResistChance (% chance to outright resist fear) and SPA 102 Fearless (on live used only on pets for full fear immunity if presents) The way were calculating the bonuses was mixing the variables we used for each together in a way that could cause conflicts when combined with negate spell effect. While doing some live testing was able to confirm SPA102 when cast on pets will terminate the fear on the next tick which is consistent with how we have the mechanic coded. * Update spells.cpp --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+4
-10
@@ -5668,18 +5668,12 @@ int16 Mob::CalcResistChanceBonus()
|
||||
|
||||
int16 Mob::CalcFearResistChance()
|
||||
{
|
||||
int resistchance = spellbonuses.ResistFearChance + itembonuses.ResistFearChance;
|
||||
if (IsOfClientBot()) {
|
||||
resistchance += aabonuses.ResistFearChance;
|
||||
if (aabonuses.Fearless == true) {
|
||||
resistchance = 100;
|
||||
}
|
||||
}
|
||||
if (spellbonuses.Fearless == true || itembonuses.Fearless == true) {
|
||||
resistchance = 100;
|
||||
int resist_chance = spellbonuses.ResistFearChance + itembonuses.ResistFearChance + aabonuses.ResistFearChance;
|
||||
if (spellbonuses.Fearless || itembonuses.Fearless || aabonuses.Fearless) {
|
||||
resist_chance = 100;
|
||||
}
|
||||
|
||||
return resistchance;
|
||||
return resist_chance;
|
||||
}
|
||||
|
||||
float Mob::GetAOERange(uint16 spell_id)
|
||||
|
||||
Reference in New Issue
Block a user