diff --git a/common/ruletypes.h b/common/ruletypes.h index 3dac99657..8867d82e4 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -471,6 +471,7 @@ RULE_BOOL(Spells, DOTBonusDamageSplitOverDuration, true, "Disable to have Damage RULE_BOOL(Spells, HOTBonusHealingSplitOverDuration, true, "Disable to have Heal Over Time total bonus healing added to each tick instead of divided across duration") RULE_BOOL(Spells, UseLegacyFizzleCode, false, "Enable will turn on the legacy fizzle code which is far stricter and more accurate to 2001/2002 testing.") RULE_BOOL(Spells, LegacyManaburn, false, "Enable to have the legacy manaburn system from 2003 and earlier.") +RULE_BOOL(Spells, EvacClearAggroInSameZone, false, "Enable to clear aggro on clients when evacing in same zone.") RULE_CATEGORY_END() RULE_CATEGORY(Combat) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index cb6076e58..0954b2bbc 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -572,12 +572,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #ifdef SPELL_EFFECT_SPAM LogDebug("Succor/Evacuation Spell In Same Zone"); #endif - if(IsClient()) + if (IsClient()) { CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), x, y, z, heading, 0, EvacToSafeCoords); - else + } else { GMMove(x, y, z, heading); - } - else { + } + + if (RuleB(Spells, EvacClearAggroInSameZone)) { + entity_list.ClearAggro(this); + } + } else { #ifdef SPELL_EFFECT_SPAM LogDebug("Succor/Evacuation Spell To Another Zone"); #endif @@ -1514,6 +1518,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove int wipechance = 0; + if (RuleB(Spells, EvacClearAggroInSameZone) && !wipechance && IsClient()) { + entity_list.ClearAggro(this); + } + if (caster) { wipechance = caster->GetMemoryBlurChance(effect_value); }