[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:
Fryguy
2024-01-07 16:44:15 -05:00
committed by GitHub
parent 066b762e73
commit 6db6d7dca9
6 changed files with 50 additions and 12 deletions
+7 -1
View File
@@ -3545,14 +3545,20 @@ void EntityList::HalveAggro(Mob *who)
}
//removes "targ" from all hate lists, including feigned, in the zone
void EntityList::ClearAggro(Mob* targ)
void EntityList::ClearAggro(Mob* targ, bool clear_caster_id)
{
Client *c = nullptr;
if (targ->IsClient()) {
c = targ->CastToClient();
}
auto it = npc_list.begin();
while (it != npc_list.end()) {
if (clear_caster_id) {
it->second->BuffDetachCaster(targ);
}
if (it->second->CheckAggro(targ)) {
if (c) {
c->RemoveXTarget(it->second, false);