From 7dad77c0805da0c75843a8f0e5c68d9f61719a71 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Wed, 17 Dec 2014 20:09:41 -0500 Subject: [PATCH] Clients will now receive exp / faction from their swarm pets kills ect. --- zone/attack.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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;