mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-16 01:01:30 +00:00
Fix stuns from beneficial spells (ex. Harvest)
This commit is contained in:
parent
b727cbbfe9
commit
4d9d50c9ac
@ -1,5 +1,8 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 01/02/2014 ==
|
||||
demonstar55: Stuns from beneficial spells (Harvest) ignore immunity
|
||||
|
||||
== 12/26/2013 ==
|
||||
demonstar55: Added classes_required to merchantlist (same bitmask as items)
|
||||
|
||||
|
||||
@ -788,25 +788,22 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
if (max_level == 0)
|
||||
max_level = RuleI(Spells, BaseImmunityLevel);
|
||||
// NPCs get to ignore max_level for their spells.
|
||||
if(GetSpecialAbility(UNSTUNABLE) ||
|
||||
((GetLevel() > max_level)
|
||||
&& caster && (!caster->IsNPC() || (caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity)))))
|
||||
// Ignore if spell is beneficial (ex. Harvest)
|
||||
if (IsDetrimentalSpell(spell.id) && (GetSpecialAbility(UNSTUNABLE) ||
|
||||
((GetLevel() > max_level) && caster && (!caster->IsNPC() ||
|
||||
(caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity)))))
|
||||
{
|
||||
caster->Message_StringID(MT_SpellFailure, IMMUNE_STUN);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
|
||||
if(IsClient())
|
||||
if (IsClient())
|
||||
stun_resist += aabonuses.StunResist;
|
||||
|
||||
if(stun_resist <= 0 || MakeRandomInt(0,99) >= stun_resist)
|
||||
{
|
||||
if (stun_resist <= 0 || MakeRandomInt(0,99) >= stun_resist) {
|
||||
mlog(COMBAT__HITS, "Stunned. We had %d percent resist chance.", stun_resist);
|
||||
Stun(effect_value);
|
||||
}
|
||||
else {
|
||||
if(IsClient())
|
||||
} else {
|
||||
if (IsClient())
|
||||
Message_StringID(MT_Stun, SHAKE_OFF_STUN);
|
||||
|
||||
mlog(COMBAT__HITS, "Stun Resisted. We had %d percent resist chance.", stun_resist);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user