mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +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:
+7
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user