diff --git a/zone/attack.cpp b/zone/attack.cpp index 4661a83e3..9ecfaa8a3 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2103,6 +2103,18 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes attack #endif //BOTS } + if(give_exp && give_exp->IsTempPet() && give_exp->IsPetOwnerClient()) { + + if (give_exp->IsNPC() && give_exp->CastToNPC()->GetSwarmOwner()){ + Mob* temp_owner = nullptr; + temp_owner = entity_list.GetMobID(give_exp->CastToNPC()->GetSwarmOwner()); + + if (temp_owner) + give_exp = temp_owner; + } + } + + int PlayerCount = 0; // QueryServ Player Counting Client *give_exp_client = nullptr;