mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 02:31:03 +00:00
[Bug Fix] Depop Charm Pet and Detach Debuffs on Evacuate (#3888)
* [Bug Fix] depop charm pet and detach debuffs on evac. This will depop charm pets and deteach debuffs to prevent some social aggro issues and exploitable conditions with charming and pulling a mob across the zone with no aggro concerns. * Added Rules
This commit is contained in:
+20
-10
@@ -568,19 +568,25 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
// Greater Decession = 3244
|
||||
// Egress = 1566
|
||||
|
||||
if(!target_zone) {
|
||||
if (!target_zone) {
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
LogDebug("Succor/Evacuation Spell In Same Zone");
|
||||
#endif
|
||||
if (IsClient()) {
|
||||
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), x, y, z, heading, 0, EvacToSafeCoords);
|
||||
} else {
|
||||
GMMove(x, y, z, heading);
|
||||
}
|
||||
|
||||
if (RuleB(Spells, EvacClearAggroInSameZone)) {
|
||||
entity_list.ClearAggro(this);
|
||||
if (IsClient()) {
|
||||
if (HasPet()) {
|
||||
if (RuleB(Spells, EvacClearCharmPet) && GetPet()->IsCharmed()) {
|
||||
GetPet()->BuffFadeByEffect(SE_Charm);
|
||||
}
|
||||
}
|
||||
|
||||
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), x, y, z, heading, 0, EvacToSafeCoords);
|
||||
} else {
|
||||
GMMove(x, y, z, heading);
|
||||
}
|
||||
|
||||
if (RuleB(Spells, EvacClearAggroInSameZone)) {
|
||||
entity_list.ClearAggro(this);
|
||||
}
|
||||
} else {
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
LogDebug("Succor/Evacuation Spell To Another Zone");
|
||||
@@ -2214,7 +2220,11 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
// clear aggro when summoned in zone and further than aggro clear distance rule.
|
||||
if (RuleR(Spells, CallOfTheHeroAggroClearDist) == 0 || caster->CalculateDistance(GetX(), GetY(), GetZ()) >= RuleR(Spells, CallOfTheHeroAggroClearDist)) {
|
||||
entity_list.ClearAggro(this);
|
||||
if (RuleB(Spells, EvacClearCharmPet)) {
|
||||
entity_list.ClearAggro(this, true);
|
||||
} else {
|
||||
entity_list.ClearAggro(this);
|
||||
}
|
||||
}
|
||||
} else if (!RuleB(Combat, SummonMeleeRange) && caster->GetZoneID() == GetZoneID() && caster->CombatRange(this)) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user