From 28b1abe1a7eed50d0cefe095f3773d0d4dc57b9d Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Mon, 17 Jan 2022 09:10:37 -0500 Subject: [PATCH] [Bug Fix] Fixes Enchanter AA Doppleganger crash issue (#1931) * Fix crash bug * [Bug Fix] Fixes Enchanter AA Doppleganger crash issue --- zone/client.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/client.cpp b/zone/client.cpp index abfa0e8e0..60f7212a8 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -6482,11 +6482,12 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid swarm_pet_npc->StartSwarmTimer(pet_duration * 1000); swarm_pet_npc->GetSwarmInfo()->owner_id = GetID(); + swarm_pet_npc->SetFollowID(GetID()); // Give the pets alittle more agro than the caster and then agro them on the target target->AddToHateList(swarm_pet_npc, (target->GetHateAmount(this) + 100), (target->GetDamageAmount(this) + 100)); swarm_pet_npc->AddToHateList(target, 1000, 1000); - swarm_pet_npc->GetSwarmInfo()->target = target->GetID(); + swarm_pet_npc->GetSwarmInfo()->target = 0; //we allocated a new NPC type object, give the NPC ownership of that memory if(npc_dup != nullptr)